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

Notification

Icon
Error

Pin test that is excluded due to customized engine mode?
GreenMoose
#1 Posted : Tuesday, October 15, 2013 8:44:19 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)
v1.47

I've only recently discovered the awesomeness of custom engine modes. So I've created one which includes pinned tests, or only impacted tests but only if they do not explicitly use my Database resource attribute, i.e. condition:
Code:

                                __________full name matches regex [ .*CanExportScriptToFile.* ]
                               |
<nested contition> -------------OR
|                              |__________is pinned
|
OR
|
|                              __________does not have exclusive use of resource [ Database ]
|                             |
<nested contition>|------------AND
                              |__________is impacted


So now I wanted to explicitly run a test which has "Database" explicitly resource attribute set on the fixture itself.
This test is off course marked as "not covered", and I can't seem to find it in the tests window either. Can I somehow explicitly pin that test to make it run within my engine mode?

Thanks.
Remco
#2 Posted : Tuesday, October 15, 2013 9:05:42 AM(UTC)
Rank: NCrunch Developer

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

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

Thanks for the awesome picture :)

The engine mode filter only applies to the automatic pipelining of tests ... it shouldn't impact the visibility of the test in the Tests Window. If the test isn't showing, I think something else may be going on here. Check that the test is correctly attributed and the project containing it is building without problems.

You can explicitly pin unexecuted tests inline by finding their entry point (i.e. double click them in the tests window, or just go to their declaration), then right clicking on the '>' arrow and choosing to pin the test.

A suggestion regarding the regex expression: If you find that there are certain tests in your codebase that need to be specially exempted from the engine mode filter, you might find it easier to give these a category and use the category filter condition instead. In this way, if you have more 'magic' tests, it will be easier to manage them by simply adjusting categories instead of changing the engine mode. I'm not sure if this fits well for your specific scenario but I thought I'd mention it just in case!


Cheers,

Remco
GreenMoose
#3 Posted : Tuesday, October 15, 2013 10:06:16 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)
Ah yeah I forgot to remove redundant parameters in the test methods after splitting up TestCase into individual tests, thanks.

(Regarding regex, I only have 1 such test for now. Thanks for the tip.)
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