3
votes

Before I'd used usual way to run my test suites of Coded UI tests using MS Test Manager and 'd used Lab definition templates.

In my vNext build definition next workflow contains 5 steps:

  1. Visual Studio Build Task
  2. Push Build Artifacts
  3. Windows Machine File Copy
  4. Visual Studio Test Agent Deployment
  5. Visual Studio Test using Test Agent

So problem is: how can I run Coded UI tests with using test plans or test suites or it's impossible?

3
It's now possible using Run Functional Tests Task with TFS 2015 Update 3 - MushyPeas

3 Answers

0
votes

Don't know how exactly to setup your build but you'll have to run the agent in interactive mode (i.e. not as a service) according to Microsoft's documentation.

See on this MSDN page in Q&A "Why would I want to run a build agent in interactive mode?"

0
votes

No, currently it is not allowed to run MTM test cases in TFS vNext build system, only .dll test assemblies(contains Coded UI test methods) can be specified.

So, instead of choosing vNext build system, you need to use XAML build. In the build definition, choose the LabDefaultTemplate, and select the Test Plan and Test Suite which contains test cases you would like to run. Please check this msdn article for the details: https://msdn.microsoft.com/en-us/library/hh873102.aspx

0
votes

This should be all you need to know.

https://blogs.msdn.microsoft.com/visualstudioalm/2016/03/31/executing-automated-tests-in-build-vnext-using-test-plan-test-suites/

As a helpful addition:

Before the tests run you can have the build automatically add or update tests with tcm. The variables are set to the batch file from the build step using positional parameters.

tcm testcase /import /collection:%collection% /teamproject:%teamproject% /storage:%storagePath%  /category:%category% /syncsuite:%syncsuit%