1

I am trying to run UI TestScripts for Xamarin iOS app on Test cloud, so I filled all the details.

App file : **/*.ipa

Test Assembly Directory: $(build.binariesdirectory)/$(BuildConfiguration)/test-assembly

dSYM file, I uploaded into Git and it was stored as zip file. I tried using that in VSTS but it was failing so I am not sure how to load dSYM(Any advise?), so I am not using dSYM file. But even without dSYM file, the step is failing without much information. I am getting the following error.

2016-06-30T17:25:36.773Z: [command]/usr/local/bin/mono /Users/vso112561/vsts-agent/_work/2/s/x/packages/Xamarin.UITest.1.3.8/tools/test-cloud.exe submit /Users/vso112561/vsts-agent/_work/2/s/a/b/bin/iPhone/Release/c 2016-06-30 10-25-30/com.iOS.ipa 42f8ebe979ca524827575208c706ecef --user abc@xy.com --devices XXXXXX --series master --locale en_US --assembly-dir /Users/vso112561/vsts-agent/_work/2/Release/test-assembly **/packages/**/tools/test-cloud.exe --nunit-xml /Users/vso112561/vsts-agent/_work/2/Release/test-assembly/xamarintest_211.0.xml
2016-06-30T17:25:36.988Z: Usage:
2016-06-30T17:25:36.988Z:   test-cloud.exe submit <apk-ipa> <api-key> [options] [--include <nunit-category> | --category <nunit-category> | --exclude <nunit-category> | --fixture <nunit-fixture> | --data <file-or-directory>] ...
2016-06-30T17:25:36.988Z:   test-cloud.exe submit <apk-ipa> <api-key> keystore <storefile> <storepass> <keyalias> <keypass> [options] [--include <nunit-category> | --category <nunit-category> | --exclude <nunit-category> | --fixture <nunit-fixture> | --data <file-or-directory>] ...
2016-06-30T17:25:36.988Z: Run 'test-cloud.exe help submit' for more details.
2016-06-30T17:25:37.007Z: [command]/usr/local/bin/mono /Users/vso112561/vsts-agent/_work/2/s/x/packages/Xamarin.UITest.1.3.8/tools/test-cloud.exe submit /Users/vso112561/vsts-agent/_work/2/s/x/y/bin/iPhone/Release/xx 2016-06-30 10-20-46/iOS.ipa 42f8ebe979ca524827575208c706ecef --user xyz@abc.com --devices XXXXXXX --series master --locale en_US --assembly-dir /Users/vso112561/vsts-agent/_work/2/Release/test-assembly **/packages/**/tools/test-cloud.exe --nunit-xml /Users/vso112561/vsts-agent/_work/2/Release/test-assembly/xamarintest_211.1.xml
2016-06-30T17:25:37.217Z: Usage:
2016-06-30T17:25:37.217Z:   test-cloud.exe submit <apk-ipa> <api-key> [options] [--include <nunit-category> | --category <nunit-category> | --exclude <nunit-category> | --fixture <nunit-fixture> | --data <file-or-directory>] ...
2016-06-30T17:25:37.217Z:   test-cloud.exe submit <apk-ipa> <api-key> keystore <storefile> <storepass> <keyalias> <keypass> [options] [--include <nunit-category> | --category <nunit-category> | --exclude <nunit-category> | --fixture <nunit-fixture> | --data <file-or-directory>] ...
2016-06-30T17:25:37.218Z: Run 'test-cloud.exe help submit' for more details.
##[Error] 2016-06-30T17:25:37.263Z: Return code: 1
2016-06-30T17:25:37.437Z:  
2016-06-30T17:25:37.438Z: Start: Results.Publish async Command
2016-06-30T17:25:37.438Z: End: Results.Publish async Command
2016-06-30T17:25:37.438Z:   

I am looking into the test script and the path but not able to get it work.Can anyone point out the reason for the error?

TheDeveloper
  • 1,127
  • 1
  • 18
  • 55

1 Answers1

2

It looks like your commands are using paths that have spaces. You'll need to wrap any paths with spaces in quotation marks.

Change

/Users/vso112561/vsts-agent/_work/2/s/a/b/bin/iPhone/Release/c 2016-06-30 10-25-30/com.iOS.ipa

To

"/Users/vso112561/vsts-agent/_work/2/s/a/b/bin/iPhone/Release/c 2016-06-30 10-25-30/com.iOS.ipa"

Also, the path used for --assembly-dir looks incorrect. This should be a path to the .dll that contains your UITests and not test-cloud.exe. Make sure that you wrap it in quotation marks too, once fixed.

therealjohn
  • 2,378
  • 3
  • 23
  • 39
  • I am not able to add quotes as the VSTS is prefixing "/Users/vso112561/vsts-agent/_work/2/s" to what ever I pass. If I add quotes its throwing error. I modified my assembly dir as you mentioned and still getting the same error. Any suggestions? – TheDeveloper Jul 01 '16 at 15:02
  • `[command]/usr/local/bin/mono /Users/vso112561/vsts-agent/_work/2/s/a/packages/Xamarin.UITest.1.3.10/tools/test-cloud.exe submit /Users/vso112561/vsts-agent/_work/2/s/a/c/bin/iPhone/Release/iOS 2016-07-01 07-46-18/com.xyz.ipa 42f8ebe979ca524827575208c706ecef --user a@b.com --devices xxxxxxx --series master --locale en_US --assembly-dir /Users/vso112561/vsts-agent/_work/2/s/a/b/obj/Release/UITest.dll **/packages/**/tools/test-cloud.exe --nunit-xml /Users/vso112561/vsts-agent/_work/2/s/a/b/obj/Release/UITest.dll/xamarintest_229.0.xml` – TheDeveloper Jul 01 '16 at 15:02
  • The issue you are seeing is related to the discussions [here](https://bugzilla.xamarin.com/show_bug.cgi?id=41963), which deal with the naming conventions of the sub-directory for the .ipa file. You'll need to remove any spaces in the path, which seem to be the IPA folder. You can use the workarounds in that bug report to do this. – therealjohn Jul 01 '16 at 15:08
  • Turns out I was passing some parameters under optional arguments which were not needed. I removed that and its working fine now.. Thank you John – TheDeveloper Jul 01 '16 at 15:57