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

Notification

Icon
Error

NUnit 3 and OneTimeSetUpAttribute
TURNSKIN
#1 Posted : Monday, August 31, 2015 11:04:17 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/31/2015(UTC)
Posts: 18
Location: Lithuania

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Hi,
I'm using NCrunch 2.16.0.13 with NUnit.3.0.0-beta-4
We introduced Parallelizable attritube with OneTimeSetUp
NCrunch runs all new test as expected, but do not run method with OneTimeSetUp attribute

check attached screenshot. You can see white dots near method "FixtureSetup"

Screenshot: OneTimeSetUp

How can I this this?
Remco
#2 Posted : Monday, August 31, 2015 9:58:28 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

Right now NCrunch doesn't yet support the new NUnit (NUnit 3). This is a major revision of NUnit that is still under development and will require significant work to support. NCrunch will add support for this framework soon.
1 user thanked Remco for this useful post.
TURNSKIN on 9/1/2015(UTC)
mig01
#3 Posted : Tuesday, October 18, 2016 2:49:41 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/18/2016(UTC)
Posts: 1

Has this been resolved yet? I am still seeing this issue in 2.27.

Also would be beneficial to know if there is a way to run a test setup per assembly, e.g. database creation.
Remco
#4 Posted : Tuesday, October 18, 2016 9:52:39 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, this issue was resolved a very long time ago.

Is it possible you're encountering a different issue entirely?

Note that because of NCrunch's batching mechanics, it's possible that NUnit mechanisms to initialise an 'Assembly' prior to execute can be executed multiple times per process. See http://www.ncrunch.net/documentation/considerations-and-constraints_test-atomicity for more details.
CoolBreeze
#5 Posted : Friday, July 7, 2017 5:08:47 PM(UTC)
Rank: Advanced Member

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

Was thanked: 9 time(s) in 9 post(s)
Hi Remco,

My OneTimeSetup module is not being called.

This worked about 2 weeks ago. I did upgrade to newer versions of NUnit and ASP.NET Framework in the last two weeks or so.

NCrunch 3.9.01.
NUnit 3.7.1
NUnit 3 Test Adapter 3.7.0
VS 2017 Community Edition

One suggestion I saw to solve the problem of OneTimeSetup not being called is to install NUint 3 Test Adapter. I installed 3.7.0. That didn't fix anything.

Thanks, Ed
Remco
#6 Posted : Saturday, July 8, 2017 12:04:08 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Ed,

Thanks for sharing this problem. Are you able to share any code that I might be able to use to reproduce it? Presently all NCrunch tests around this are passing, so it may be a use case that I haven't been tracking.

Usually this sort of thing is all handled internally within NUnit. Does the OneTimeSetup module work correctly under a different test runner?
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.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download