Running Windows Phone 8.0 tests in a Continuous Integration environment - windows-phone-8

I have a VS 2013 solution with a WP8 App, a WP8 Library for my viewmodels, a WP8 Unit Test project to test my library and other standard unit tests projects. The solution is under TFS 2012 source control, the build controller is setup and it correctly build my solution.
But my WP8 specific tests are not ran after automatic build. All other standard Unit Tests projects run well.
Some additional infos:
the ".xap" package for the test project is well generated
the build process Template (Default Template) is setup to use "Visual Studio Test Runner"
the build agent is running interactively
when i launch vstest.console.exe from the command line, giving the ".xap" package as argument, the test are well discovered and executed
I'am i missing something in the configuration ?

Windows Phone apps are currently not supported on Team Build, as documented here.
Feature | Windows Phone | Windows Store App
Team Build support | Not supported. | Includes support for running unit tests as part of Team Build.
There are a few unsupported work-arounds to solve your issue, more an be found here.

Related

Sideloaded app requires package Microsoft.VCLibs.120.00 on my build server

In trying to run integration tests on my windows store app but the sideloading of my test appx file fails with error (0x80073CF3):
Windows cannot install package (my package GUID) because this package depends on another package that could not be found. This package requir
es minimum version 12.0.21005.1 of framework Microsoft.VCLibs.120.00 published by any publisher to install. Provide the framework along with this package..
The same procedure works fine on my dev machine (from powershell).
A Microsoft blog post states:
...In order to facilitate this scenario for sideloaded apps, we have made
the framework packages available here.
After downloading, and extracting the relevant architecture appx file, I installed it via powershell:
Add-AppxPackage "C:\temp\Microsoft.VCLibs.120.00_12.0.21005.1_x86__8wekyb3d8bbwe.appx"

Can't use XLabs prerelease packages in appstore builds

I am building an app with Xamarin Forms and XLabs plugins.
To be able to run everything smoothly on Android and Windows Phone, i've had to use a prerelease version of xlabs (2.2.0-pre05).
When I tried to create a Windows Phone appstore package the certification failed because the packages for 2.2.0-pre05 have been built in debug mode.
To overcome this, I cloned the git hub project for XLabs and built everything in release mode.
The problem is, when I try to build the project with the packages i've built, I get this error:
Payload file '..\packages\Mike Xlabs\XLabs.Platform.WinRT.Phone\FodyWeavers.xml' does not exist.
Also, the windows store certification checks fail because of libraries used by the prerelease package.I'm getting the following error:
Error Found: The supported APIs test detected the following errors:
This API is not supported for this application type - Api=D2D1GetGradientMeshInteriorPointsFromCoonsPatch. Module=d2d1.dll. File=SharpDX.Direct2D1.dll.
Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Phone Store apps violates the Windows Phone Store certification requirements.

Windows Store Certification Metadata test failes

When I run my program in debug mode, it runs nicely. Now that I want to upload it to the Windows Phone Store, it creates the App Package, but when running the Windows App Certification Kit, it returns the following error:
General metadata correctness test - failed
with the reason:
In the Winmd-File "myBackgroundPart.winmd" (that's my RunTime Component) there is missing "WindowsRuntime 1.3" or "WindowsRuntime 1.2" in the versionstring. The versionstring of the file is "WindowsRuntime 1.4;CLR v4.0.30319".
My environment is Visual Studio 2015 CTP5. The error message suggests, that my WinRT is too new for Store!? How do I downgrade it then?
Edit
This was an issue with VS2015 CTP5, with the new released CTP6 yesterday it was solved.
You need to build your app using Visual Studio 2013 (Update 4 is the latest). Note that Visual Studio 2015 does not have a "go live" license, meaning you can't use it for production purposes anyway. You need to wait until it is released.
Also, when you built the component, what Project Type did you choose? If you built a project for Windows 8.x then I don't think it should have used version 1.4 metadata. Did you build / test on Windows 10 Preview by any chance?

Error building Windows Phone 8.1 unit test in VS Online

I just set up a Windows Phone 8.1 project using VS 2013 update 2 and added it to a git repo in VS Online.
After configuring a build definition, I tried to run the build but it is erroring out on:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (1864): Could not find SDK "MSTestFramework, Version=12.0".
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (1864): Could not find SDK "TestPlatform, Version=12.0
The documentation for VS Online states that the WP8 SDK is installed, but there is no mention of WP8.1. http://www.visualstudio.com/en-us/get-started/hosted-build-controller-vs.aspx#software
Has anybody managed to get a WP 8.1 unit test project to build, and run the tests using VS Online?

Specified Gradle Installation (..) is not supported by this tooling API version (1.6, protocol version 4) [duplicate]

This question already has answers here:
Gradle build errors with Android Studio
(3 answers)
Closed 9 years ago.
I have just set up Android Studio 0.2.2 and updated my Android SDK to the latest version.
I have exported my Android project (android:minSdkVersion="8", android:targetSdkVersion="15") in Eclipse by 'Generate Gradle Build Files' without (visible) problems. And I can export/compile my app in Eclipse just fine, it also runs fine in the emulator.
However, in Android Studio, when trying to import my project, I am confronted with the above error message. "Gradle Home" is (IMO, correctly) displayed as "D:\Prog\Android-Studio\plugins\gradle".
Any idea how to make Android Studio feel more comfortable on my computer?..
I've encountered a similar problem where I can't import my project. There is at least one answer out there that may help; it requires the creation of a blank project in Android Studio and then copy files over from Eclipse. This ensures the creation by Android Studio of the necessary Gradle files, etc. Here's the link to the full answer: Gradle build errors with Android Studio
Look's like you should try to use the Gradle Wrapper rather than a local Gradle distribution. According to Gradle's website (http://www.gradle.org/docs/current/userguide/gradle_wrapper.html):
The wrapper is something you should check into version control. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with. Of course, this is also great for continuous integration servers (i.e. servers that regularly build your project) as it requires no configuration on the server.
You'll need to mimic the following structure in your project's directory:
simple/
gradlew
gradlew.bat
gradle/wrapper/
gradle-wrapper.jar
gradle-wrapper.properties
At that point, go to Settings (Windows) Preferences (Mac), click "Gradle" on the left hand side, choose "Use Gradle wrapper (recommended)". If that option isn't available, try restarting Android Studio or closing and reimporting your project. Checking this option should ensure that you always build with the correct Gradle distribution.