I am using Visual Studio 2013.
Let's say I have a version 1.0 of a product which is currently using the NUnit Test Adapter.
I now want to move v1.0 to a branch and start working on v1.1. I want to upgrade from NUnit 2.6.4 to NUnit 3.0.0 for v1.1 but keep using NUnit 2.6.4 for v1.0 hotfixes.
To this end, I upgrade my test projects to NUnit 3.0.0 and install the new NUnit 3 Test Adapter in order for the tests to show up in Test Explorer.
I now have both of the NUnit Test Adapter and NUnit 3 Test Adapter extensions installed and enabled at the same time.
The result of this is that when I run the unit tests for v1.0 I get the following in the Output window:
------ Run test started ------
NUnit VS Adapter 2.0.0.0 executing tests is started
Loading tests from c:\OptivaV\_test\MyApplication.Test\bin\MyApplication.Test.dll
Run started: c:\OptivaV\_test\MyApplication.Test\bin\MyApplication.Test.dll
NUnit VS Adapter 2.0.0.0 executing tests is finished
NUnit Adapter 3.0.7.0 executing tests is started
Running all tests in c:\OptivaV\_test\MyApplication.Test\bin\MyApplication.Test.dll
NUnit failed to load c:\OptivaV\_test\MyApplication.Test\bin\MyApplication.Test.dll
========== Run test finished: 137 run (0:00:07,356) ==========
When I open the v1.1 solution and run the tests I get the following instead:
------ Run test started ------
NUnit VS Adapter 2.0.0.0 executing tests is started
Exception NUnit.Core.UnsupportedFrameworkException, Exception thrown executing tests in C:\OptivaVNU3\_test\MyApplication.Test\bin\MyApplication.Test.dll
NUnit VS Adapter 2.0.0.0 executing tests is finished
NUnit Adapter 3.0.7.0 executing tests is started
Running all tests in C:\OptivaVNU3\_test\MyApplication.Test\bin\MyApplication.Test.dll
Loading tests from C:\OptivaVNU3\_test\MyApplication.Test\bin\MyApplication.Test.dll
NUnit Adapter 3.0.7.0 executing tests is finished
========== Run test finished: 136 run (0:00:08,224) ==========
Is it possible to have both test adapters installed and enabled at the same time in order to support two solutions that are making use of different versions of NUnit?
In other words, I would like to be able to switch between solutions without having to disable the test adapter that does not fit the currently loaded solution.
Can each VS2013 solution be configured to only make use of a specific test adapter?
Aucun commentaire:
Enregistrer un commentaire