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

Notification

Icon
Error

Filter tests with build configuration
Tim__
#1 Posted : Tuesday, May 31, 2016 10:46:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/29/2015(UTC)
Posts: 6

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I currently use a customised engine mode to filter tests using a "Manual" test category.

Some of these "Manual" tests are integration tests that I don't want to run automatically, but I would like to run before deployment.

Is there a way to specify that a certain test category should only be run in a given build configuration, i.e. a filter such as [does not have category "Manual"] OR [build configuration is "Release"]?
Remco
#2 Posted : Tuesday, May 31, 2016 11:32:31 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi,

Thanks for posting!

There isn't anything in NCrunch at the moment that tracks the build configuration selected in VS. NCrunch doesn't make use of this value itself - it instead relies on the default values specified in your project files or the 'Use build configuration' project-level NCrunch configuration setting.

Generally, if you have a set of tests that you only want to run occasionally, there are two ways you can easily do this:
1. Hit the 'run all tests' button on the Tests Window. This will queue ALL tests regardless of whether the engine mode has selected them for automatic execution. There is also an IDE hotkey for this that you can find under the 'NCrunch' menu.
2. Create an engine mode that selects all the tests for automatic execution (or just use 'Run all tests automatically') and change to this engine mode when you want to run all the tests. NCrunch will detect the change and update its processing queue accordingly.

If you need additional features beyond this, you are welcome to request them in uservoice.
1 user thanked Remco for this useful post.
Tim__ on 6/1/2016(UTC)
Tim__
#3 Posted : Wednesday, June 1, 2016 1:16:31 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/29/2015(UTC)
Posts: 6

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

Thank you for the prompt and detailed reply.

Although your suggestions are useful, I have raised a uservoice feature for the following reasons:

I have 3 categories of test:
(A) Tests to run continuously.
(B) Tests to run before deployment (i.e. in Release Mode).
(C) Tests to only ever run manually.

Running all tests at once would execute the (C) category which I do not want.
Creating a seperate engine mode to run just (A) and (B) would work, but this would require manually changing the engine mode, running the tests, then changing back to the standard engine mode afterwards. These are manual steps I would like to avoid.
1 user thanked Tim__ for this useful post.
Remco on 6/1/2016(UTC)
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