在我的Xamarin项目中,我的UI测试适用于我所有的本地设备(也适用于Android 4.0,5.0和6.0),但不幸的是,当我在Xamarin测试云中运行它们时,它们总是只能用于Android 6.0版本。
这是错误:
1)SetUp错误: App.UITests.Droid.Tests.BuildTest(安卓).Check_Build
SetUp:System.Exception:应用程序安装失败并带有输出: /Volumes/Data/xamarin/pipeline/versions/7ddfc8e043c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:inconnect': 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,而是使用Timeout.timeout。 /Volumes/Data/xamarin/pipeline/versions/7ddfc84322c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:inparse_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,使用Timeout.timeout 代替。失败。预期包裹名称:XXX。亚行 包输出: /卷/数据/ xamarin /管道/版本/ 7ddfc8e0342c82182471a14f3136c778635e1620 / ADT / SDK /平台工具/ ADB:402: 警告:已初始化常量ARGV /Volumes/Data/xamarin/pipeline/versions/7ddfc343c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:inconnect': 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,而是使用Timeout.timeout。 /Volumes/Data/xamarin/pipeline/versions/7ddfc84322c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:inparse_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,使用Timeout.timeout 代替。
答案 0 :(得分:1)
这是权限问题。您必须先授予许可。
来自Xamarin测试页面:
当IDE首次安装Android 6.0应用程序时,它不会授予应用程序所需的所有权限。解决方法是使用UITest来安装和启动应用程序:
CREATE TEMPORARY TABLE IF NOT EXISTS
tblorders(orderid,ordername,orderemail,orderphone,ordercountry,orderdate) AS (
SELECT 1,'ORD01','adent@hog.com' ,'9-991' ,'UK', DATE '2017-01-01'
UNION ALL SELECT 2,'ORD02','tricia@hog.com','9-992' ,'UK', DATE '2017-01-02'
UNION ALL SELECT 3,'ORD03','ford@hog.com' ,'9-993' ,'UK', DATE '2017-01-03'
UNION ALL SELECT 4,'ORD04','zaphod@hog.com','9-9943','UK', DATE '2017-01-04'
UNION ALL SELECT 5,'ORD05','marvin@hog.com','9-9942','UK', DATE '2017-01-05'
UNION ALL SELECT 6,'ORD06','ford@hog.com' ,'9-993' ,'UK', DATE '2017-01-06'
UNION ALL SELECT 7,'ORD07','tricia@hog.com','9-992' ,'UK', DATE '2017-01-07'
UNION ALL SELECT 8,'ORD08','benji@hog.com' ,'9-995' ,'UK', DATE '2017-01-08'
UNION ALL SELECT 9,'ORD09','benji@hog.com' ,'9-995' ,'UK', DATE '2017-01-09'
UNION ALL SELECT 10,'ORD10','ford@hog.com' ,'9-993' ,'UK', DATE '2017-01-10'
)
;
SELECT
tblOrders.OrderID
, tblOrders.OrderName
, tblOrders.OrderEmail
, tblOrders.OrderPhone
, tblOrders.OrderCountry
, tblOrders.OrderDate
FROM tblOrders
JOIN (
SELECT
OrderEmail
FROM tblOrders
GROUP BY
OrderEmail
HAVING COUNT(*) = 1
) singleOrders
ON singleOrders.OrderEmail = tblOrders.OrderEmail
ORDER BY OrderID
;
OrderID|OrderName|OrderEmail |OrderPhone|OrderCountry|OrderDate
1|ORD01 |adent@hog.com |9-991 |UK |2017-01-01
4|ORD04 |zaphod@hog.com|9-9943 |UK |2017-01-04
5|ORD05 |marvin@hog.com|9-9942 |UK |2017-01-05