Table of Contents
A simple ASP.NET Core 6.0 Blazor Server Web Application that allows users to create and manage test data configuration. This project serves as Kyle Julian's 2022 Summer Assignment for Software Development and DevOps module. This project serves to aid Quality Assurance and Automation Testers with managing, creating, and accessing test schemes and test scheme data items. A test scheme is a bundle of test items that relate to a specific test case.
This project is built using the below technologies. You will need to install them locally before developing the site.
Entity Framework Core is the ORM "Object relational mapper" that manages data access to the SQLite database. The Entity Framework Core CLI is needed to apply and revert migrations to the database.
-
Clone the repository
git clone https://github.com/kylejuliandev/test-data-manager-assignment.git
-
Open the folder where the repository has been cloned
-
Navigate to the Manager.Web folder
cd manager-web\src\Manager.Web
-
-
Run the Entity Framework tools to apply the migrations
dotnet ef database update
Below illustrates the initial database design and concept to fulfil the requirements of this project. The proposal includes two tables, namely: Schemes and SchemeData. Schemes is home to the grouping of a set of scheme data. Scheme data relates to a single test configuration (key/value pair).
Tables prefix with AspNet
are scaffolded by Visual Studio and provide the authentication and authorization capabilities.
CreatedById
is a foreign key that contains the AspNetUsers.Id
ModifiedById
is a foreign key that contains the AspNetUsers.Id
SchemeId
is a foreign key that contains the Schemes.Id
A Scheme will have many Scheme Data. A Scheme will have one CreatedBy AspNetUser. A Scheme will have one ModifiedBy AspNetUser.
A SchemeData will have one CreatedBy AspNetUser. A SchemeData will have one ModifiedBy AspNetUser.
This permits a AspNetUser having many Schemes and many SchemeData (one to many).
When changing the design (see Data files) you will need to generate a new migration file, that will contain the SQL definition of the changes being made.
dotnet ef migrations add MyNewMigrations
dotnet ef database update
To revert the migration, you can use the following. This will remove the latest migration made. You will need to rerun the database update command for this to be reflected in you database.
dotnet ef migrations remove
If you need to teardown the database you can use the following command
dotnet ef database drop
This is not reversible, and you will be asked to confirm before the deletion occurs.
Below depicates a sequence diagram of the steps involved for navigating to and loading content from the dev blog. The diagram neglects to illustrate the role of Internet Service Providers, Domain Name Servers, and Internet registrars, however it simply visualises a typical workflow through the web application.
sequenceDiagram
actor U as User
participant B as Browser
participant WS as Blazor
participant DB as SQLite
U->>+B: Navigate to dev
Note over U,B: testdatamanager.azurewebsites.net
B->>+WS: Request web page
WS->>+DB: Request schemes
DB->>-WS: Return paginated schemes
WS->>-B: Generate html content
B->>-U: Show rendered web page