nunit / nunit3-vs-adapter

NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
https://nunit.org
MIT License
205 stars 106 forks source link

Running particular test folders causing other test folders not selected to run. #1187

Closed nsangeetha-bright closed 4 months ago

nsangeetha-bright commented 4 months ago

When reporting a bug, please provide the following information to speed up triage:

image

OsirisTerje commented 4 months ago

What are your folders in this case? Projects?
You can look at your grouping settings for the Test Explorer.
image You find Grouping at (1), ensure that in the dialog, the grouping is set as shown (2).

Note also that NUnit doesn't select what tests to run. It accepts what comes from the test explorer. You can check that using a .runsettings file, and enable the Dumps there, see https://docs.nunit.org/articles/vs-test-adapter/Tips-And-Tricks.html and https://docs.nunit.org/articles/vs-test-adapter/Tips-And-Tricks.html#dumpxmltestdiscovery-and-dumpxmltestresults

nsangeetha-bright commented 4 months ago

This issue happened only when use Grouping as 'Traits' Attached image regarding what grouping have used for your reference

image

OsirisTerje commented 4 months ago

If a test has two categories, in this case both Integration and Unit, it may look like this.

Check the filter being sent to the adapter, in the dump file. Then look at some of the tests that have run and check what their categories are.

If it still looks wrong, then upload a small repro project. But again, the adapter just runs what is being sent down to it from the Test Explorer.