This maybe a misunderstanding in how NCrunch either works or displays it's test counts...I've got a series of categories on some XUnit tests (via traits) at the assembly level.
- Unit
- Integration
- Environment (these rely on having things like the CosmosDb and Azure Storage emulators running)
I'm trying to duplicate the 'Run impacted tests automatically, others manually` engine mode, but supplementing it with a `Tests to execute on this machine` filter of `does not have category = Environment`.
Initially, the previous failed test runs still displayed in the list which was confusing. I'd have thought that their state would have reset to 'ignore' which would have been hidden.
Trying various things, including
- The restart NCrunch and rebuild button on the toolbar
- Manually deleting the solution's NCrunch cache folder
I eventually cleared them using the `Reset selected test status` under the `Advanced` context menu.
So now the ignored (Trait - Category=Environment) tests don't show... however, the count of tests is still displaying the total number of tests in the solution (with the message `no tests ignored`), but the actual ignored test count as `queued for execution` which never changes.
This is the ncrunchsolution file:
Code:
<EngineModes>
<EngineMode>
<Name>Run impacted tests automatically, others manually (Excludes Environment)</Name>
<Settings>
<AlignOutOfDateStatusWithImpactStatus>True</AlignOutOfDateStatusWithImpactStatus>
<TestFilter>DoesNotHaveCategory 'Environment'</TestFilter>
<TestsToExecuteAutomatically>IsImpacted</TestsToExecuteAutomatically>
</Settings>
</EngineMode>
</EngineModes>