Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Trying to Run All Tests; Icons are Changed
CoolBreeze
#1 Posted : Thursday, April 21, 2022 5:18:37 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2014(UTC)
Posts: 77
Location: United States of America

Was thanked: 9 time(s) in 9 post(s)
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
#2 Posted : Friday, April 22, 2022 12:46:53 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,571

Thanks: 862 times
Was thanked: 1176 time(s) in 1097 post(s)
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download