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

Notification

Icon
Error

How does NCrunch run tests?
nguyette
#1 Posted : Tuesday, May 8, 2018 3:46:18 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/8/2018(UTC)
Posts: 8
Location: United States of America

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
If I'm using the MSTest framework with a TestInitialize and a TestCleanup attribute, does NCrunch run these three methods in a separate process?
Remco
#2 Posted : Tuesday, May 8, 2018 10:08:36 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting.

NCrunch runs MSTest-based tests using an emulator that behaves very similar to VSTest, but with much higher performance.

As under VSTest, the TestInitialize and TestCleanup methods are just considered to be extensions of the test method itself. They are run directly before and after the test method inside the same test process as is used for the test method. So the execution steps are:

1. Create test process
2. Create test fixture class instance
3. Run TestInitialize
4. Run test method
5. Run TestCleanup
6. Tear down test process (potentially much later, as processes can be re-used to improve performance)
1 user thanked Remco for this useful post.
nguyette on 5/9/2018(UTC)
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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download