I've only recently discovered the awesomeness of custom engine modes. So I've created one which includes pinned tests, or only impacted tests but only if they do not explicitly use my Database resource attribute, i.e. condition:
__________full name matches regex [ .*CanExportScriptToFile.* ]
|
<nested contition> -------------OR
| |__________is pinned
|
OR
|
| __________does not have exclusive use of resource [ Database ]
| |
<nested contition>|------------AND
|__________is impacted
So now I wanted to explicitly run a test which has "Database" explicitly resource attribute set on the fixture itself.
This test is off course marked as "not covered", and I can't seem to find it in the tests window either. Can I somehow explicitly pin that test to make it run within my engine mode?
The engine mode filter only applies to the automatic pipelining of tests ... it shouldn't impact the visibility of the test in the Tests Window. If the test isn't showing, I think something else may be going on here. Check that the test is correctly attributed and the project containing it is building without problems.
You can explicitly pin unexecuted tests inline by finding their entry point (i.e. double click them in the tests window, or just go to their declaration), then right clicking on the '>' arrow and choosing to pin the test.
A suggestion regarding the regex expression: If you find that there are certain tests in your codebase that need to be specially exempted from the engine mode filter, you might find it easier to give these a category and use the category filter condition instead. In this way, if you have more 'magic' tests, it will be easier to manage them by simply adjusting categories instead of changing the engine mode. I'm not sure if this fits well for your specific scenario but I thought I'd mention it just in case!