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

Notification

Icon
Error

Tests ignored with RegexTestSelector are being executed since upgrade to NCrunch 2
shamp00
#1 Posted : Thursday, February 27, 2014 12:23:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/25/2012(UTC)
Posts: 3
Location: London, United Kingdom

Thanks: 1 times
In v1.48 I was excluding many tests with RegexTestSelectors such as these:

Code:

<ProjectConfiguration>
  ...
  <IgnoredTests>
    <RegexTestSelector>
      <RegularExpression>BasicHealth\.Server\..*</RegularExpression>
    </RegexTestSelector>
    <RegexTestSelector>
      <RegularExpression>BasicHealth\.NoServer\.UnitTests\.ConfigEncryptionTests\..*</RegularExpression>
    </RegexTestSelector>
  </IgnoredTests>
</ProjectConfiguration>

Since upgrading to NCrunch2 these tests are being executed. How can I ignore tests via regex in v2?
Remco
#2 Posted : Thursday, February 27, 2014 12:54:14 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Make sure that when making changes to configuration, you do so to the PROJECT.v2.ncrunchproject file. v1.48 used a different name for this configuration file - PROJECT.ncrunchproject

NCrunch automatically migrates the configuration over to the V2 file when you first use V2 on a solution.

In V2 the RegexTestSelector is no longer written by the engine, as it doesn't work correctly with the new Tests Window grouping structures and the slow regex scanning was annihilating the performance of the engine. The engine will still read and make use of the Regex selectors inside your configuration file, but it will usually try to migrate these to the much more efficient AllTestsSelector and FixtureTestSelector.

You may find it possible to make the RegexTestSelector work, but I would recommend you instead use the 'Ignore Tests' button in the Tests Window, as this ensures the configuration is entered using supported selectors that work efficiently with the core engine. The test selectors were never intended to be manually edited or manipulated directly through the configuration files - they are basically an internal and undocumented system that can change at any time with new versions of NCrunch.

If the wildcard selectors used by the Tests Window aren't sufficient for your needs, you may wish to look at setting up a custom engine mode or test filter to control which tests can be executed by NCrunch.
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.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download