Closed seesharprun closed 2 years ago
I just finished getting all of the unit tests running, and correctly skipping the functional tests for projects that require connection strings. I was able to validate all of these functional tests projects against development databases using the instructions in the test.md file:
I was unable to validate these functional test projects:
In response to #156, this PR is an attempt to get all tests running in the project.
The tests are broken down into two categories:
Functional tests
These tests required you to configure connection strings to run. This is not a great experience for a new developer forking the project for the first time. The tests also used a TestSettings file that is:
To fix this, I removed the dependency on the solution-level TestSettings file and added a .runsettings file to each functional test project. By default, this file is configured with a blank value for each connection string. If the test runner detects a blank connection string, it will mark the test as inconclusive and skip the test.
If the test runner detects a connection string, it will attempt to run the test.
Unit tests
Originally, these tests required a TestSettings file with connection strings to run. This shouldn't be a blocker, so I removed that requirement so that the unit tests can run immediately after you fork or clone the repository.
Documentation
This PR also includes a tests.md with documentation on the tests, and examples of how to run each functional test package.
Looking forward
Wouldn't it be nice if we created a .devcontainer file with all of the functional tests passing at launch? Just a nice thought for a future PR after this.