-
Notifications
You must be signed in to change notification settings - Fork 477
Automated tests
The Pitstop solution contains 2 types of tests: unit-tests and UI tests.
Unit-tests exist for the WorkshopManagementAPI (core domain) and are situated in the WorkshopManagement.UnitTests project. There are tests for the domain classes and for the command-handlers. You can run the tests by executing the following steps:
- Open a command-prompt.
- Change the current-folder to the src/WorkshopManagement.UnitTests folder within the repo.
- Execute the following command:
dotnet test
.
The UI tests are situated in the UITest project. This project contains some tests that test the following functionality: all the menu-buttons in the UI, adding a customer, adding a vehicle, adding a maintenance-job and finishing a maintenance-job. It does this by automating the browser using the Selenium Chrome web-driver (so it only works with Chrome for now). These tests are mainly used for integration-/regression-testing. You can run the tests by executing the following steps:
- Start the application as described above.
- Open a command-prompt.
- Change the current-folder to the src/UITest folder within the repo.
- Execute the following command:
dotnet test
.
Several browser-windows will be opened and automated by the Selenium web-driver.
Make sure the Chromedriver major version specified in the
UITest.csproj
matches the major version of Chrome you have installed on your machine. See the compatibility chart for more info. You can find the version of Chrome by clicking on the Menu icon in the upper right corner of the Chrome screen, clicking on Help and then About Google Chrome.
Table of contents
- Startpage
- Functionality
- Solution
- Running the application
- Repository