简体   繁体   中英

Force visual studio 2015 to test in single folder with CodedUI

I am trying to run tests in Visual Studio Ultimate 2015. These tests were running in 2013 and we need to keep using the testing dlls (Microsoft.VisualStudio.TestTools.UITest.Common.dll...) from 2013.

I have gotten all the references to remain at 2013, but the tests refuse to run on a local machine because it will cannot find the testing dlls in GAC and refuses to copy them into the output folder.

The test seems to completely ignore the .runsettings file (CodedUI)

I have tried setting up a .testsettings file, and the files are copied, but then new dlls are required.

DeploymentItem is ignored

<add key="TestFiles" value="C:\ACESQA\TestAutomation\SabreTestAutomation\TestResults"/> 

is ignored.

Any suggestions?

My solution for this is to create a NuGet package with the required 2013 .dlls. If you use these as the reference and exclude the 2015 .dlls it should work, though you'll have to wade through your .csproj files multiple times. Consider using something like SlowCheetah to manage your references, it removes a lot of headaches.

If this doesn't work, consider installing the 2013 agent on your machine. This will install things in the GAC. I would only try this if I couldn't get the tests to run using the .dlls in a NuGet package though, as you can quickly find yourself in .dll hell.

DeploymentItem is absolutely useless. It barely works, and is broken in TFS2015 in a lot of cases anyway.

Runsettings files are ignored by CodedUI tests. They only work for Unit tests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM