2016-10-14 79 views
0

在我的Xamarin項目中,我的UI測試適用於所有本地設備(也適用於Android 4.0,5.0和6.0),但不幸的是,當我在Xamarin中運行它們時測試雲只會在Android 6.0版本上失敗。無法在Android 6.0設備雲中運行Xamarin UI測試

這是錯誤:

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.

回答

1

這是權限的問題。您必須先授予權限。

從Xamarin測試頁:

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

相關問題