MS Visual Studio Unit Tests take forever to close - even if there's no code in the test -
why happening? have no code in test:
[testclass] public class apiclienttest { [testmethod] public void apitestsampleusecase() { testcleanup(); } public void testcleanup() { //deleteusers(); } }
yet when run this, takes ~1 minute complete. passes, takes forever. set breakpoint after deleteusers , gets hit immediately; delay after test has completed.
check bin
directory - incomprehensible reason, mstest copies referenced assemblies new directory every time run tests. (these safe delete, though.) maybe else causes slow down after many runs... according this answer , this documentation, can disable behaviour.
i'd recommend switching nunit if possible, preferrably in combination fluentassertions (due not insignificant number of weird design decisions in mstest, such behaviour, lack of easy-to-use parameterized tests, , fact test run if [testinitialize]
throws exception).
Comments
Post a Comment