Mittchel Mittchel - 30 days ago 30
C# Question

Mobile Center UITest exit code 20

I've been trying to run a UI test via Visual Studio Mobile center for a while now, but I'm getting the following error:

Preparing tests... failed.
Error: Cannot prepare UI Test artifacts. Returning exit code 20.

I looked on the mobile-center-cli github page and found that error codes 1 until 63 are reserved for TestCloud. There is really no documentation about this error so I hope someone is able to point me into the right direction.

Command used:

mobile-center test run uitest --app "MyAppName" --devices d5c95903 --app-path "pathToApk" --test-series "master" --locale "en_US" --build-dir "PathToBinRelease"

Answer Source

It sounds like you may be specifying the wrong folder for your --build-dir.

The --build-dir should be the bin/Debug folder of your Xamarin.UITest project, something like this:


Can you please try the above and let me know if it resolves the issue?