Hi, thanks for posting.
The easiest way I can think of doing this is to introduce assembly-level category attributes in your test project which are controlled by framework-specific compile switches.
For example:
#if NETCOREAPP2_2
[assembly: NCrunch.Framework.Category("NetCore2_2")]
#endif
#if NETCOREAPP3_0
[assembly: NCrunch.Framework.Category("NetCore3_0")]
#endif
#if NET48
[assembly: NCrunch.Framework.Category("Net48")]
#endif
In this way, every test in the assembly will have a category assigned to it that is tied to the platform it targets.
You can then set the
Tests to execute automatically setting with consideration to the above categories, ideally doing so with some
custom engine modes. This way you can set the engine to run tests for specific platforms depending on your selected engine mode.