Hi Remco,
We're evaluating nCrunch before purchasing and I found two issues with displaying coverage info, which are not critical, but still confusing..
1. [Behaviors] and Behaves_like<> support
External image
If I'm using standard assertions, nCrunch marks passing tests with green ">" symbol, which is good (green mark on screenshot), but as soon as I'm using Behaves_like<>, nCrunch marks this line as uncovered (red mark on screenshot), which is wrong. Inside [Behaviors] classes, everything is OK, all "It"s are marked with green ">" symbols, as expected. Tests are shown in test window, so they are executed, it's only problem with displaying coverage information.
2. We're using classes for sharing configuration between tests and inheriting test classes from them. Somehow one line in these classes is displayed as not covered:
External image
Inside of test classes everything is OK, see first screenshot, both classes there are inherited from this "WithTokenRequest" class, there are no dots on "Establish" lines.
VS2012.3, ReSharper 8.0.1, machine.specifications 0.5.16, machine.fakes 1.7.0.
Could you, please, check if it's possible to fix these issues? Tell me if you need any additional info.
Thanks!
Remco NCrunch Developer
#4714
12 Oct 2013 21:25 UTC
Hi, thanks for sharing this issue!
This is because the 'Establish context' assignment is a declaration that is executed prior to the test being run, so it's still code, but it isn't executed as part of the test. NCrunch has a workaround implemented for the MSpec test methods themselves to prevent this from happening, but this workaround has not been extended to include Behaves_like and 'Establish context'. This is definitely fixable, and I've noted it down to be addressed in a future release.
Cheers,
Remco
This is because the 'Establish context' assignment is a declaration that is executed prior to the test being run, so it's still code, but it isn't executed as part of the test. NCrunch has a workaround implemented for the MSpec test methods themselves to prevent this from happening, but this workaround has not been extended to include Behaves_like and 'Establish context'. This is definitely fixable, and I've noted it down to be addressed in a future release.
Cheers,
Remco
Post a reply
Log in to reply.