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 NCrunch Developer
#12159
08 May 2018 22:08 UTC
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)
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)
Post a reply
Log in to reply.