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

Notification

Icon
Error

Run a single Ignored test
rlarno
#1 Posted : Tuesday, February 28, 2012 3:22:22 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/27/2011(UTC)
Posts: 27
Location: Belgium

Thanks: 6 times
Was thanked: 5 time(s) in 5 post(s)
I have some Integration Tests that are ignored for NCrunch. I was under the impression that I could select an ignored test in the Tests window and select 'Run/Prioritise selected test'. But that does not seem to be the case. 'Debug selected test' also does nothing. Is this the expected behaviour?
Remco
#2 Posted : Tuesday, February 28, 2012 8:39:21 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Yes, this is the expected behaviour. The idea behind the 'ignore tests' option was to give people a progressive approach to implementing NCrunch on large complex projects. I expect that as time goes by and NCrunch becomes more sophisticated, this feature will become less used.

When 1.38b is released, it will have the ability to customise engine modes. The engine modes will allow you to specify very flexible criteria to describe the tests that should be run continuously. This means you should be able to create a special category for the tests you've described above, and use this category to exclude them from the continuous behaviour.

I'm aiming for the 1.38b release at the end of this week :)
rlarno
#3 Posted : Thursday, March 1, 2012 1:56:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/27/2011(UTC)
Posts: 27
Location: Belgium

Thanks: 6 times
Was thanked: 5 time(s) in 5 post(s)
Hi Remco,

as from other feature requests, I figured something more configurable is coming.

Yet, I think my request is actually a little bit different. I know this is not a much used strategy, but I often write a 'unit test' that will set up the database or even set up a specific scenario (for manual testing purposes then). I also have some integration 'validation' tests. some of these are all basically 'tests' that are not to be run regularly, but are rather run only on 'request'. (e.g. call a 3rd party web service, to validate it still works like we expect, yet we do not want their service to be bombarded while we run our test-suite)

Now these are tests that I mark as 'Ignored'. And they also have the TestCategory["Manual Integration"]. (So hoping I can use the 1.38b features to set this category up as Ignored by default). Now I can of course run these tests manually using the regular (VS) test runner, so I figured I could just select this test in the Test window and run it separately.
Since I'm a bit getting addicted to having NCrunch being so fast in running the tests, I start to want it to do everything I possible can do with the tests ;-).

So no worries, if at all interesting to you, just put it on the backlog. I'll just have to use the VS test runner (Ctrl-R, T) and wait for it to compile, spin up the test runner domain, run the test and report back.
rlarno
#4 Posted : Thursday, March 1, 2012 1:59:22 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/27/2011(UTC)
Posts: 27
Location: Belgium

Thanks: 6 times
Was thanked: 5 time(s) in 5 post(s)
Still regarding ignored tests. When I refactor the name of the testmethod, it is no longer ignored. I'm not sure if you can capture this though.
Remco
#5 Posted : Thursday, March 1, 2012 8:51:23 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
The testing approach you've described is one that I'm also using myself for NCrunch. I have a number of very heavy integration tests that I often find better to kick off manually, and the new configuration feature in 1.38b was designed to handle exactly this situation.

The nice thing that you have with this approach is that NCrunch also will do code coverage and performance analysis for these tests - even when they're kicked off manually .. and of course this data is remembered persistently across instances of Visual Studio.. so you'll always have this information available to you while you work.

Dealing with renamed tests is particularly hard, as NCrunch can't tell the difference between a renamed test and tests that are added/removed. The 'ignore test' feature works at the level you apply it though, so if you ignore a fixture then any renamed tests underneath that fixture will still be ignored. The best thing I can suggest if you're renaming ignored tests would be to temporarily switch engine mode so that NCrunch won't kick off the tests before you can re-ignore them.
Remco
#9 Posted : Wednesday, March 7, 2012 12:22:56 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
For anyone interested, the feature described above (custom engine modes) has just been released with NCrunch 1.38b.
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