Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run VSTest.Console.exe from a Windows or non interactive service for a Windows Phone Project

I installed the Visual Studio 2012 Update 2 and successfully run a set of Windows Phone tests from the command line

I then tried to do this from Jenkins (using the VSTest Plug In) and received the following message which apparently has something to do with sandboxing..

Starting test execution, please wait... Error: Could not start test run for unit tests for Windows Phone app: Unit tests for Windows Store apps cannot be run from a service or non interactive process. Please run unit tests from an interactive process..

Any ideas...

like image 877
John Parr Avatar asked Nov 12 '22 07:11

John Parr


1 Answers

there's this commandline utility vstest.console.exe that's also able to run 3rdparty unit tests, if it has the right adapter(s). You have to use the /UseVsixExtensions option to vstest.console.exe. Additonally, to enable code coverage analysis I supply the /EnableCodeCoverage option.

 "C:\Program Files (x86)\Microsoft Visual Studio 11.0
 \Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
 /UseVsixExtensions:true /EnableCodeCoverage "C:\Users\Arve\Documents\Visual Studio
 2012\Projects\MyApp\MyApp.Tests\bin\Debug\MyApp.Tests.dll"

The above command produces a a file with the suffix .coverage beneath the directory 'TestResults'.

like image 137
Robert Avatar answered Dec 10 '22 11:12

Robert