I'm trying to run all tests in my solution.
Suppose I have these test projects:
TESTS_BLL
TESTS_Controls
TESTS_Library
I select the NCrunch Tests window. I enter TESTS_BD_BLL into the search text box.
I see the selected test project and the test classes under the TESTS_BLL.
There are about 34 test classes and 206 tests in TESTS_BLL.
I click "Run selected tests in new task runner process." for TESTS_BLL project.
NCrunch begins running some tests.
I see red circle by the TESTS_BLL project node.
I see the green circle by some tests.
A few tests complete with a green checkmark.
A few tests fail with a red X. (The failed tests timed out and displayed "Test canceled by user".)
But then something happens.
NCrunch stops running the remaining tests.
The green checkmarks turn into green question marks.
The red checkmarks turn into red question marks.
Only a small handful of tests are actually run.
Test Run #2
I have some slow running tests. I wondered if the slow running tests interfered somehow with the display of icons in the Tests window. I added <Category("Slow")> to the slow running tests.
I ran the fast running tests. NCrunch runs the tests and puts green checkmarks against almost all the tests.
Then NCrunch runs the tests in the first two test classes in the TESTS_BLL project. Then NCrunch changes all the green checkmarks on the just run test classes to green question marks, and then finishes running the tests in the first two test classes.
Then put green checkmarks against the first two test classes.
I was expecting all passing test classes to have green checkmarks.
I wish I could insert images directly into these posts. I think image would more clearly communicate
what I'm actually seeing.
Remco NCrunch Developer
#16095
22 Apr 2022 00:46 UTC
Hi, thanks for sharing this.
I strongly suspect that the code being run by these tests is modifying something in your foreground solution. Most probably there is an absolute file path somewhere. The consequence of this is that running the test causes the codebase (or a related resource) to change, which invalidates the results of the other tests.
If you move your solution to a different directory on disk, then try running the tests, does anything break?
There's a documentation page for troubleshooting this specific problem: absolute file references
I strongly suspect that the code being run by these tests is modifying something in your foreground solution. Most probably there is an absolute file path somewhere. The consequence of this is that running the test causes the codebase (or a related resource) to change, which invalidates the results of the other tests.
If you move your solution to a different directory on disk, then try running the tests, does anything break?
There's a documentation page for troubleshooting this specific problem: absolute file references
Post a reply
Log in to reply.