Duplicate Unit Tests started showing up for me in Visual Studio 2019, which I recently upgraded from 2017. I’ve a side by side comparison of Visual Studio 2017 and 2019 below, which shows some test were duplicated and categorised under tests not run:
Cleaning the solution didn’t get rid of these tests and the only thing that did, was deleting the git repository and cloning it again.
Has anybody come across this issue and have a better solution that this sledge hammer approach?
Visual Studio 2019 version 16.3 and earlier To specify a run settings file in the IDE, select Test > Select Settings File. Browse to and select the . runsettings file. The file appears on the Test menu, and you can select or deselect it.
You need to close the Test Explorer Window to prevent automatic running.
Visual Studio Test Platform can run test assemblies in parallel.
Tests can be run from Test Explorer by right-clicking in the code editor on a test and selecting Run test or by using the default Test Explorer shortcuts in Visual Studio. Some of the shortcuts are context-based. This means that they run or debug tests based on where your cursor is in the code editor.
I was talking to a colleague who also came across the same issue and he suggested another solution that worked for him.
This resolved the issue for him and is a less drastic measure that a delete and clone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With