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

Notification

Icon
Error

MSpec issues
algra
#1 Posted : Saturday, October 12, 2013 3:24:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/12/2013(UTC)
Posts: 1
Location: Germany

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



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:



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
#2 Posted : Saturday, October 12, 2013 9:25:23 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download