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

Notification

Icon
Error

TestContext.CurrentTestOutcome contains weird values
jisotupa
#1 Posted : Tuesday, June 2, 2015 6:45:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/2/2015(UTC)
Posts: 1
Location: Finland

We have a custom base class, which we to use provide extendability to otherwise missing extendability of MSTest. In the [TestCleanup] method of the base class, the TestContext.CurrentTestOutcome is investigated to find out whether the test passed or failed.

Now, when running the test with NCrunch, the CurrentTestOutcome seems to contain a seemingly random integer instead one of the appropriate enum values. It even appears to change its value each call:

[img=(- BROKEN LINK -)]TestOutcome having a funny value[/img]

What's up?

Remco
#2 Posted : Tuesday, June 2, 2015 10:29:31 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi,

Thanks for sharing this issue.

NCrunch's support for MSTest is emulated (rather than integrated), which means that it is a complete re-implementation of the MSTest engine from the ground up.

The drawback of such an approach has the potential for compatibility holes. You've managed to find one of them.

I'll need to look into why this is happening, but it will likely require a code-fix to NCrunch's MSTest support. For the time being I recommend adjusting your implementation to work around this limitation.
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.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download