Build/Test Issues

MSpec and IAssemblyContext

Started by Der-Albert.com on 6,427 views

Is NCrunch supporting IAssemblyContext assembly specific Setups and Teardowns?

https://github.com/machine/machine.specifications/blob/master/Source/Machine.Specifications/IAssemblyContext.cs
And supports it ICleanupAfterEveryContextInAssembly
Yes. NCrunch does support IAssemblyContext, and I'm fairly certain it should also support ICleanupAfterEveryContextInAssembly, assuming that these features are provided by MSpec itself.

NCrunch calls into MSpec and uses it as a provider to execute tests, so in theory any features implemented (other than test discovery) should be handled by the test runner.

You'll likely notice though that code blocks executed through IAssemblyContext won't be marked as covered by NCrunch. This is because they are not executed by any specific test, so NCrunch has nothing to associate the coverage with. This issue also applies to other frameworks that use global initialise/teardown structures.

Post a reply

Log in to reply.