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

Notification

Icon
Error

Support nunit [TestCase] attribute
martinkruitz
#1 Posted : Tuesday, April 9, 2013 1:14:30 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/9/2013(UTC)
Posts: 1
Location: Netherlands

Hi,

In a previous post (5 months ago) from Yanglee talked about the ability to show markers in front of the TestCase attribute.
It would be nice to have these, it shortens test code enormously.
Remco
#2 Posted : Wednesday, April 10, 2013 10:40:17 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting!

I did look into doing this, as there would be clear value behind such a feature. However, the reason it hasn't been implemented is because it is really, really, really hard to do. Currently NCrunch finds code using debugging information emitted by the compiler. Custom attributes (such as TestCaseAttribute) don't emit this information, so there's no way to map them back to the source code.

There are future possibilities though. Roslyn may be a bit of a game changer in this area, so be assured that I will be keeping this in mind :)


Cheers,

Remco
GreenMoose
#3 Posted : Tuesday, June 11, 2013 1:43:38 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
Is it likewise hard to do to show the different test cases as different tests in the NCrunch Tests window? E.g. if I have a test with 5 test cases, I see only 1 test in NCrunch tests and I must re-run/debug all test cases to track down test failure caused by 1 specific test case.

Also currently it is very hard to tell if a test case succeeded or not if test produces a lot of log output. This since the only way to tell them apart is peering through the output log of all test cases.
Remco
#4 Posted : Tuesday, June 11, 2013 9:45:24 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
This was introduced in NCrunch back in v1.36. When you have your Framework utilisation type for NUnit set to 'DynamicAnalysis' (which is the default setting), it will split test cases into separate tests so that they are individually visible and runnable in the Tests Window.

And yes, it was very, very, insanely, hard to do :)

The post at the top of this thread discusses placing markers next to the [TestCase] attribute itself, which is something that isn't really possible with the engine in its current state.
GreenMoose
#5 Posted : Wednesday, June 12, 2013 7:59:39 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
Remco;4242 wrote:
This was introduced in NCrunch back in v1.36. When you have your Framework utilisation type for NUnit set to 'DynamicAnalysis' (which is the default setting), it will split test cases into separate tests so that they are individually visible and runnable in the Tests Window.
...

Ah thanks, I had apparently set that setting to static a while back ago while hunting for better performance. Will enable it again and re-evaluate performance.
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.037 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download