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

Notification

Icon
Error

NCurnch does not recognize MSpec tests with Behavior when Behavior is defined in a separate assembly
User1
#1 Posted : Tuesday, January 19, 2016 8:28:43 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/19/2016(UTC)
Posts: 1

If SomeBehavior is defined in a different assembly then the test itself. In this case, the the spec containing Behaves_like member does not seem to be recognized by NCrunch. The spec is not on the list of executed tests, coverage markers stay white.


[Subject(typeof(X))]
public class when_X {

Establish context = () => {
// some init code
};

#pragma warning disable 0169
Behaves_like<SomeBehavior> behaves_as_expected;
#pragma warning restore 0169
}



NCrunch 2.19.0.4.
Visual Studio Professional 2015
.NET 4.6 project
MSpec is latest: https://www.nuget.org/pa...ifications-Signed/0.9.3


The same exact test is recognized by ReSharper.
Remco
#2 Posted : Tuesday, January 19, 2016 9:29:25 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Thanks for sharing this problem. This looks to be an issue with the static analysis. I've noted it down for review.

To work around the problem, change the 'Framework utilisation type for MSpec' solution-level configuration option to 'DynamicAnalysis'.
Remco
#3 Posted : Monday, March 21, 2016 2:17:00 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
For anyone interested, this issue has been resolved in the just released v2.20 - http://www.ncrunch.net/download.
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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download