简体   繁体   中英

Installed TFS Console 2015 and have both VS2015 and VS2013 on my VM.Need to run Tests(2013 and 2015) on Same VM

In our project we have Unit tests specific to VS2013 and VS2015.We have a requirement of using one build definition (Virtual machine) to run both VS2013 and VS2015 Tests on different timings.

I have installed on that VM Team Foundation Server 2015 Console and created one controller and 2 agents(each for specific version of visual studio).

We are using 2013 build template.

I have ran successfully 2015 UTs on that Virtual Machine(VM) but when I try to run VS2013 specific UTs it is picking up 2015 vstest.exe and throwing exception.

Is there any way to achieve this??

I tried to include MTest Activity build template.Activity is running but it is saying no tests to execute.

I even tried to run throught batch file invoke,this way it is running but through MSTest Activity it is not running scripts.Below is snapshot of TFS log for MSTEST activity

在此输入图像描述

By default, TFS calls the corresponding version of VS to run tests. There is no way to specify the VS version for a test in XAML build with default build process template. You would need to customize your build process template by adding InvokeProcess activity to invoke 2013 vstest.exe to run tests.

Since you are using TFS 2015, I'd like to suggest you use new build system, which is tasks based. In new build system, you can add Visual Studio Test task to run tests. In this task, you can specify VSTest version:

在此输入图像描述

Check this article for more information: https://www.visualstudio.com/en-us/docs/test/continuous-testing/getting-started/getting-started-with-continuous-testing

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