Unlike what the documentation says.
Build/Test Issues
There is no way to ignore categories in the engine mode
Started by Amir Kolsky on 857 views
Remco NCrunch Developer
#18681
26 Feb 2026 22:59 UTC
This is absolutely possible.
Go to NCrunch->Set Engine Mode->Customise Engine Modes
Then choose the engine mode you want to ignore categories in.
On the bottom pane, under 'Settings to be overidden by this engine mode', go to Filters->Tests to execute automatically.
Click the pencil.
Click add condition.
Use 'does not have category', and enter the name of your category. Save all changes.
When this engine mode is active, the engine will not automatically execute tests marked with the specified category.
Go to NCrunch->Set Engine Mode->Customise Engine Modes
Then choose the engine mode you want to ignore categories in.
On the bottom pane, under 'Settings to be overidden by this engine mode', go to Filters->Tests to execute automatically.
Click the pencil.
Click add condition.
Use 'does not have category', and enter the name of your category. Save all changes.
When this engine mode is active, the engine will not automatically execute tests marked with the specified category.
So I have done exactly that. I have the [TestCategory("Playwright")] on both "Tests to execute automatically" and "Tests to execute on this machine" I have "When DoesNotHaveCategory 'Playwright'.
Verified that the Engine mode is 'Run impacted tests automatically, others manually. Ignore Playwright tests.'
None of the Playwright tests are ignore whether the category is on the class or on the method.
In the code it looks like this - [TestCategory("Playwright")]
[TestMethod]
public async Task ConnectButtonDisabledWithDefaultValue_Playwright()
Verified that the Engine mode is 'Run impacted tests automatically, others manually. Ignore Playwright tests.'
None of the Playwright tests are ignore whether the category is on the class or on the method.
In the code it looks like this - [TestCategory("Playwright")]
[TestMethod]
public async Task ConnectButtonDisabledWithDefaultValue_Playwright()
Edited 02 Mar 2026 00:37 UTC
Remco NCrunch Developer
#18693
02 Mar 2026 03:01 UTC
Thanks for sending through the bug report. This was very useful!
The report indicates values for the two major settings you're working with under your engine mode:
Tests to execute automatically = 'True'
Tests to execute on this machine = 'DoesNotHaveCategory 'Playright''
It looks like there's a typo in the second setting. The first doesn't seem to be effective at the moment ('True' will just run every test).
I'm wondering if you've also been able to check the Category column in the Tests Window to make sure the category is being correctly applied to the tests in question. There's a bit of complexity around how categories are assigned, especially when inheritance is involved, so this is worth checking. Note that the evaluation for category names in NCrunch's execution plan is not case sensitive, but it does need to be precise (i.e. no trailing or leading spaces, etc).
The report indicates values for the two major settings you're working with under your engine mode:
Tests to execute automatically = 'True'
Tests to execute on this machine = 'DoesNotHaveCategory 'Playright''
It looks like there's a typo in the second setting. The first doesn't seem to be effective at the moment ('True' will just run every test).
I'm wondering if you've also been able to check the Category column in the Tests Window to make sure the category is being correctly applied to the tests in question. There's a bit of complexity around how categories are assigned, especially when inheritance is involved, so this is worth checking. Note that the evaluation for category names in NCrunch's execution plan is not case sensitive, but it does need to be precise (i.e. no trailing or leading spaces, etc).
This is strange, as when I look at the filter in the engine mode (both of them) it shows Playwright. In the configuration i did have Playright. So the value in the configuration overrides the engine mode. Got it. I'll try to see if the tests still run. Thank you.
Edited 03 Mar 2026 02:35 UTC
Remco NCrunch Developer
#18697
03 Mar 2026 02:52 UTC
Sometimes it can be worth experimenting with a small sample solution with minimal complexity to see if you can make the settings work in the way you expect them to. This can also be useful for reporting defective behaviour, as you can just submit the test solution through the NCrunch contact form and I'll be able to use it to reproduce the issue.
Deleted post
#18783
27 Apr 2026 17:22 UTC
Deleted post
#18784
28 Apr 2026 07:18 UTC
Post a reply
Log in to reply.