Why is the xUnit Runner not finding my tests

TL;DR your Test Classes must be public (but your Test Methods can be private and/or static) For reasons of efficiency, the xUnit authors have opted to not use BindingFlags.NonPublic when searching for Test Classes in the runner (the MSIL metadata tables don’t index private(/internal) classes to the same degree hence there is a significant performance … Read more

How to terminate a program when it crashes? (which should just fail a unit test instead of getting stuck forever)

A summary from the answers by jdehaan and Eric Brown, as well as this question (see also this question): N.B. These solutions may affect other error reporting as well, e.g. failure to load a DLL or open a file. Option 1: Disable globally Works globally on the entire user account or machine, which can be … Read more

Visual Studio 2015 or 2017 does not discover unit tests

To my surprise, clearing temp files located in the %TEMP% directory resolved the issue for me. Note: This path is generally at C:\Users\(yourusername)\AppData\Local\Temp As @Warren-P included, you can navigate to the temp folder by putting in %temp% in Start Menu, or launch “File Explorer” and enter %temp% in the address bar.

What are the differences between unit tests, integration tests, smoke tests, and regression tests? [closed]

Unit test: Specify and test one point of the contract of single method of a class. This should have a very narrow and well defined scope. Complex dependencies and interactions to the outside world are stubbed or mocked. Integration test: Test the correct inter-operation of multiple subsystems. There is whole spectrum there, from testing integration … Read more