Testing and Known Issues - canton7/Stylet GitHub Wiki

Testing

Stylet has a large and comprehensive unit test suite, and an integration test suite which covers the corners that the unit tests can't get to.

The test coverage at the time of writing is > 99%, with > 450 unit tests.

If you open the main Stylet.sln solution, you'll get both the unit test and integration test suites.

The unit tests are written with NUnit, and use Moq as the mocking framework. To run them, build the project, then either:

  1. Install the NUnit Test Adapter extension (Tools -> Extensions and Updates -> Online), then open Test -> Window -> Test Explorer.
  2. Open packages/NUnit.Runners.2.6.3/tools/nunit.exe, then File -> Open Project, open StyletUnitTests.dll, and hit Run.
  3. Run rake test or rake nunit from the command-line, after setting up Rake.

The integration tests exist as a standalone WPF application, which includes instructions on the things you need to click on and the results you should expect to see. Simply run the StyletUnitTests project.

Code Coverage

To generate the code coverage, you'll need to setup Rake. Once you've done that, run rake cover:unit, to run code coverage for just the unit tests, rake cover:integration to run the coverage for just the integration tests, or rake cover:all to run code coverage for both.

Note that rake cover:integration and rake cover:all will open up a new window, which will be unfocused by default. Find it on your taskbar, and interact with it per the instructions. Once you've finished, close the application, and the code coverage will complete.

Known Issues

Any known issues will be documented in the bug tracker.

Documentation TODOs are held in Docs TODO.