Wednesday, 29 July 2015

Execute CodedUI TestMethod() through command prompt

Input the path of the dll in the Developer Command Prompt for VS2012/13..
cd C:\Users\...\Documents\Visual Studio 2012\Projects\CodedUITestProject\CodedUITestProject\bin\Debug
Using VSTest.Console.exe like this:
VSTest.Console.exe CodedUITestProject.dll /Tests:TestMethod1,testMethod2 /UseVsixExtensions:true  /Logger:trx
Note There is no /resultsfile option in VSTest.Console.exe command line. You need to use /Logger.trx if you want to generate a trx file.

Note The /Tests command line option cannot be used with the /TestCaseFilter command line option.

Usage  of /TestCaseFilter
Examples of /TestCaseFilter usage with filter as Priority

Examples of /TestCaseFilter usage with filter as Test Category

Examples of /TestCaseFilter usage with multiple filters using "|"

No comments:

Post a comment