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

Notification

Icon
Error

Don't know how to fix constant "This test was not executed during a planned execution run."
jnm236
#1 Posted : Friday, September 8, 2017 11:37:45 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/25/2015(UTC)
Posts: 57
Location: United States of America

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
If you were regularly getting this message on 200 tests:

Quote:
This test was not executed during a planned execution run. Ensure your test project is stable and does not contain issues in initialisation/teardown fixtures.


but any individual test you run succeeds, how would you go about diagnosing?
There is no other error message in the tests window.

Using NUnit 3.7.1, some tests with TestCaseSource, some non-parameterized, all behaving the same.

No setup or teardown methods. No errors in ReSharper's runner or NUnit console runs.
Remco
#2 Posted : Friday, September 8, 2017 11:50:10 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Something is going seriously wrong in the test process when it tries to execute your tests.

If you can send through a bug report after you've had this happen, I should be able to advise further. If there's an error, this should show up in the logs. If you set your 'Log Verbosity' setting to 'Detailed', there should be more detailed information available about the run inside the test tasks in the Processing Queue Window.
jnm236
#3 Posted : Saturday, September 9, 2017 12:04:40 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/25/2015(UTC)
Posts: 57
Location: United States of America

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Sent the bug report.

I don't see anything obviously wrong in the processing queue log with the verbosity detailed, but then again it is huge.
Remco
#4 Posted : Saturday, September 9, 2017 12:15:13 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks for the report.

Something is going seriously haywire in the way that NUnit is reporting results here. Everything is being reported very badly out of sequence.

Are you using any NUnit plugins? Do you have any specially coded settings that might cause NUnit to try to implement concurrent or parallel execution?
jnm236
#5 Posted : Saturday, September 9, 2017 12:27:20 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/25/2015(UTC)
Posts: 57
Location: United States of America

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Oh yes! There is that. I have [assembly: Parallelizable(ParallelScope.Children)] and I very definitely like it that way. It's terribly convenient when using ReSharper and when using NUnit Console.

So that makes sense. I would expect NCrunch to be fine with that, though.
Remco
#6 Posted : Saturday, September 9, 2017 3:44:49 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
You'll need to disable this attribute when working under NCrunch. For example:

#if !NCRUNCH
[assembly: Parallelizable(ParallelScope.Children)]
#endif

Tracking code coverage data is impossible when tests are being run concurrently in the same process, because there is no way to differentiate one test run from another. Code coverage tracking is heavily reliant on global state (think multi-threaded tests), so when you have multi-threaded state being updated by different tests at the same time, there's no way to know which test is actually responsible for touching the code.

Because NCrunch parallelises things at a much higher level, it's fairly useless to do this in-process anyway. For these reasons, NUnit parallelization cannot work with NCrunch and never will.

I've made a note to add an error when this attribute is detected under NCrunch, so that these problems are bit less cryptic.
1 user thanked Remco for this useful post.
fourpastmidnight on 9/9/2017(UTC)
jnm236
#7 Posted : Saturday, September 9, 2017 4:02:05 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/25/2015(UTC)
Posts: 57
Location: United States of America

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
That's understandable and that'll work. Thanks for the help!
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.040 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download