Welcome To Model App
Intro to Model App¶
The Model App is sample MVC application used internally for testing Azure App Service pipelines and deployments. This simple application is built on .NET Core 3.1 and utilizes an SQLite database for storing application data. The primary features of this webapp are:
- Provide a form for users to enter personal details(name, email, category)
- Render an entry list page to view previous submissions
This is NOT a production application so keep that in mind when considering project complexity. However it has the basic requirements we'll need to develop new Functional UI tests and verify existing functionality. As we work through these exercises, keep in mind your own team's application and how we can apply lessons learned here.
Configure Local Environment for Model App Development¶
-
Using either Git Bash or Powershell terminal, clone the Model App to your local machine.
-
Take a quick look at the project to get familiar with the repo structure.
-
Open the
README
to learn about the project and how to get the app running locally.
Callouts for Project Structure
Make sure the team understands the basic directory structure. If no one asks directly make sure to highlight:
README
with basic info for newcomers to get started- Dedicated folders for app logic:
ModelApp/
-> Contains source code for Web App. Builds a simple form and presents submitted dataModelApp.FunctionalTests
-> Contains existing Functional TestsModelApp.Tests
-> Contains existing Unit Tests(not covered in this lab, but the difference should quickly be highlighted)- An Azure Repos pipeline(
azure-pipelines.yml
) containing CI logic
Point out how the logical separation keeps tests outside of source code allowing for parallel work
Gotchas with running app locally
- Make sure users set
ASPNETCORE_ENVIRONMENT=Development
within the SAME terminal they will be runningdotnet run
! - Users must update their local database prior to build
dotnet ef database update ModelApp/DotNetCoreSqlDb.csproj
- Since we'll eventually need to run the functional tests in another shell, it can be helpful to have two Git Bash shells side-by-side. Try either:
- Opening two Git Bash shell windows and place them side-by-side
- VSCode supports splitting terminal windows:
- CTRL + `(open terminal pane) -> +∨ -> Split > Bash
Make sure you can navigate to http://localhost:5000. If you can see the web application you're good to go! In the next section we'll try running an existing functional test to verify the validity of the web app content.