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

Notification

Icon
Error

Use Wildcard in the TestName element in NCRUNCHPROJECT file
DHirani
#1 Posted : Monday, January 31, 2022 4:48:12 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/17/2021(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
Is it possible I can use a wildcard in the TestName element because I have test written by another team that is using Guid's and in the object the ToString method uses it so each time I try to ignore it comes back and then my NCRUNCHPROJECT file is growing with different Guid's?

<IgnoredTests>
<NamedTestSelector>
<TestName>MyTests.RunQuick&lt;Customer&gt;(Guid: af1c2675-74a2-42e4-b1e2-036be96aee61)</TestName>
</NamedTestSelector>


If this could be possible
<IgnoredTests>
<NamedTestSelector>
<TestName>MyTests.RunQuick&lt;Customer&gt;(Guid: *)</TestName>
</NamedTestSelector>
Remco
#2 Posted : Monday, January 31, 2022 11:04:48 PM(UTC)
Rank: NCrunch Developer

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

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

Unfortunately, this doesn't work, as the IgnoredTests selectors are designed to be simplified names that can be sensibly manipulated by the NCrunch UI. Having wildcards in the expressions creates confusion for the UI as it then becomes much more difficulty to sensibly switch them on and off with a button.

The problem of having a GUID in the test name is going to give you much bigger problems than difficulty with the ignored test selectors. You might be able to work around this with a test category but I very strongly recommend that you fix this test. More information about this problem.


Edit: Ignoring the fixture containing the test might let you shut it off without needing to specify the GUID.
1 user thanked Remco for this useful post.
DHirani on 2/1/2022(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.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download