androidrubyxamarinxamarin-test-cloud

Can't run Xamarin UI Tests in Cloud for Android 6.0 devices


In my Xamarin project I have UI Tests that works on all my local devices (also with Android 4.0, 5.0 and 6.0), but unfortunately when I run them in Xamarin Test Cloud they fail always only for Android 6.0 version.

This is the error:

1) SetUp Error : App.UITests.Droid.Tests.BuildTest(Android).Check_Build
SetUp : System.Exception : App installation failed with output: /Volumes/Data/xamarin/pipeline/versions/7ddfc8e043c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:in connect': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc8e043c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:613:in query': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc84322c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:in parse_header': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc8e0022c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:986:in read_body_chunked': Object#timeout is deprecated, use Timeout.timeout instead. Failure. Expected Package Name: XXX. Adb Packages Output: /Volumes/Data/xamarin/pipeline/versions/7ddfc8e0342c82182471a14f3136c778635e1620/adt/sdk/platform-tools/adb:402: warning: already initialized constant ARGV /Volumes/Data/xamarin/pipeline/versions/7ddfc343c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:in connect': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc43022c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:613:in query': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc84322c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:in parse_header': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc432c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:986:in read_body_chunked': Object#timeout is deprecated, use Timeout.timeout instead.


Solution

  • That is a problem with permissions. You have to grant permission first.

    From the Xamarin Test Page:

    When the IDE installs an Android 6.0 app for the first time, it does not grant all permissions required by the application. The workaround for this is to use UITest to install and start the application:

    ConfigureApp.Android.Debug().ApkFile(apkpath).StartApp ()
    

    Link to the Xamarin.UITest Cheat Sheet # Android 6.0 page