I'm new to CI/CD and can't find any information on the internet on how to use AppCenter Test with TFS 2018. I have my Xamarin projects in TFS but I want to test them within the device cloud of AppCenter Test.
There are a couple documents on MS's docs that make it look like it's possible but for a newbie they give ZERO information on how to implement it. HERE is an example. If you look up top this document is relavant to TFS 2018.
Here is what I did to get it working. No idea if it's correct or not, but hey, it works!
Xamarin.UITest
First go to Tools > Options > Test > General > Active Solution then uncheck
For improved performance, only use test adapters in test assembly folder or as specified in runsettings file
Deploy your agent on a development windows box. Follow these instructions: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops
TFS 2018 Configuration
List of my build tasks
Nuget Tool Installer
version of nuget to install
:4.9.3
(this is what I noticed my VS was using).NET Core
restore
**/*.csproj
Nuget
custom
restore -MsbuildPath "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
Xamarin.Android
**/*Droid*.csproj
$(build.binariesdirectory)\$(BuildConfiguration)
$(BuildConfiguration)
Specify Location
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
MSBuild
**/*UITest*.csproj
$(BuildConfiguration)
/p:OutputPath="$(build.binariesdirectory)\$(BuildConfiguration)\test-assembly"
Android Signing
$(build.binariesdirectory)\$(BuildConfiguration)\*.apk
-verbose -sigalg MD5withRSA -digestalg SHA1
Node Tool Installer
10.11.0
Nuget
custom
install Xamarin.UITest -Version $(XamarinUITestVer) -OutputDirectory "$(Agent.BuildDirectory)\Nuget"
App Center Test
$(build.binariesdirectory)\$(BuildConfiguration)\*.apk
$(Build.ArtifactStagingDirectory)\AppCenterTest
Xamarin UI Test
$(build.binariesdirectory)\$(BuildConfiguration)\test-assembly
$(Agent.BuildDirectory)\Nuget\Xamarin.UITest.$(XamarinUITestVer)\tools\
Run Tests
App Center Connection
New Test Run
, select device(s), selectNext
and chooseXamarin.UITest
and hitNext
. Down below you'll see the--app
string and this is what you use for this field.New Test Run
, select device(s), selectNext
and chooseXamarin.UITest
and hitNext
. Down below you'll see the--devices
string and this is what you use for this field.