We use TestCaseSource a lot, but it didn't give us much trouble so far. However, today I added a couple of tests that do little more than checking whether the commandline help file contains an entry for a given commandline option.
All tests should succeed, however:
- On first run, one or two tests fail
- On second run, more tests fail
- On later runs, all tests fail
- Running it again, in a new task runner or in the same, they will always fail
- Clicking "reload and return selected component" sometimes helps, but only for the first run
If I remove the TestCaseSource, or even if I leave it in, but do not use it inside the test, the tests succeed. The strange thing is, we have around a thousand tests that use TestCaseSource and they all run fine with NCrunch. This particular case is dramatically simpler, but now they fail.
I thought for a moment it had to do with the order in which the tests are executed, or with multithreading, but the same behavior appears when I run only one test, even if I disable all other tests in the same block.
The error is internal to NCrunch and does not come from my test, which seems to suggest I encountered a bug:
Quote:The parent fixture of this test experienced a failure during test execution
I read this post, but I don't think it applies:
http://forum.ncrunch.net...Unit-TestCaseSource.aspx