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

Notification

Icon
Error

"Impacted test" ignoring coverage filter?
GreenMoose
#1 Posted : Wednesday, February 13, 2019 4:08:27 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 449

Thanks: 122 times
Was thanked: 56 time(s) in 54 post(s)
Just realized that tests seems to be treated impacted (and executed in engine mode "if test is impacted") even if they are not part of my current code coverage filter.

Is this by design? (I for some reason had the impression that if I filter coverage to only show for 1 test, only that test will be considered impacted).

Thanks.
Remco
#2 Posted : Wednesday, February 13, 2019 9:04:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,646

Thanks: 734 times
Was thanked: 936 time(s) in 892 post(s)
This is intentional. The coverage filter is just a UI-based filter that blocks out coverage data from all other tests. It doesn't affect the internal behaviour of the engine.

It's possible to set up your own engine mode that has a coverage filter along with an execution filter, so you can easily configure to get both at the same time. Unless you're talking about the 'Show coverage for these tests only' filter, which is UI only.
1 user thanked Remco for this useful post.
GreenMoose on 2/14/2019(UTC)
GreenMoose
#3 Posted : Thursday, February 14, 2019 8:47:09 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 449

Thanks: 122 times
Was thanked: 56 time(s) in 54 post(s)
FWIW, added feature request at https://ncrunch.uservoic...test-is-included-in-cov
Quote:

Add engine mode condition "Test is included in coverage filter"

Related to https://forum.ncrunch.ne...ng-coverage-filter.aspx

I would like to create an engine mode which runs condition ("impacted tests" AND "included in coverage filter"). Where "included in coverage filter" is true if no UI coverage filter is used, or the tests is covered by such a filter.

Scenario: I have a lot of pinned tests and want to focus on say 3 tests to quickly verify a fix in a part of code so I filter on those tests. I would then like to have an engine mode only running these tests in filter, but still execute impacted tests (so I don't manually have to run them). When fix is verified I switch back engine mode (and/or turn off coverage filter) and rest of impacted tests are executed.
1 user thanked GreenMoose for this useful post.
Remco on 2/14/2019(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.057 seconds.