Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Teamcity and Unit Testing Windows Store apps

I've been struggling to make Teamcity 9 compile and run Unit Tests for my Visual Studio solution.

I have a Windows Phone 8.1 (WinRT, not silverlight) project and a "MyProject.Common.dll" portable class library with common functionality.

I created a "Windows Phone Unit Test App" project. If i run it from VS, it runs on the emulator and runs my unit tests. All is Ok.

If i want to run the unit tests from a console i use this command:

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe MyProject.Tests_1.0.0.1_x86.appx /InIsolation /settings:RunOnEmu.runsettings"

It works. It launches the emulator, deploys the appx and run unit tests.

Now the problem: using Teamcity 9, i configure a command line build step runner using the same command , and i get this error:

Error: Could not start test run for the 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..

Is there a way to bypass this error?

like image 261
Herno Avatar asked Oct 19 '25 02:10

Herno


1 Answers

In the end, i made a custom script to launch vstest.console.exe and run the unit test appx and then another Build Step to load the tests results into TeamCity.

like image 137
Herno Avatar answered Oct 21 '25 20:10

Herno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!