简体   繁体   English

无法在测试云上运行Xamarin.UITest:当前JsonReader项不是对象

[英]Can't run Xamarin.UITest on Test Cloud: Current JsonReader item is not an object

I have a trouble with running Xamarin.UITest tests in the Xamarin.TestCloud, although it passes on simulators and real iPads perfectly. 我很难在Xamarin.TestCloud中运行Xamarin.UITest测试,尽管它可以完美地通过模拟器和真实的iPad。

Application: I have the iOS app's source code(XCode project), which I linked to calabash via adding calabash.framework to the app(due to this tutorial ) Although I found a lot of info that app needs Xamarin.Calabash.Start() , I haven't added it anywhere because actually, I am not sure where and how I should put it in the XCode project. 应用程序:我有iOS应用程序的源代码(XCode项目),我通过向该应用程序添加calabash.framework将其链接到Xamarin.Calabash.Start()由于本教程的缘故),尽管我发现很多信息表明该应用程序需要Xamarin.Calabash.Start() ,我没有在任何地方添加它,因为实际上,我不确定应该将其放在XCode项目中的位置和方式。 My modest opinion about it: this string is needed only for an application written in Xamarin Studio itself due to the simplification of linking the app to the calabash.framework. 我对此持谦虚意见:由于简化了将应用程序链接到calabash.framework的操作,因此仅用Xamarin Studio本身编写的应用程序才需要此字符串。

To start tests in the BaseTest.class I added only: 要在BaseTest.class中开始测试,我仅添加了:

app = ConfigureApp.
.iOS
.EnableLocalScreenshots()
.InstalledApp("com.ios.dev")
.StartApp();

After giving to Xamarin studio the .ipa file, it crashes with: 将.ipa文件提供给Xamarin studio之后,它崩溃并显示为:

/Library/Frameworks/Mono.framework/Versions/4.8.0/bin/mono "/Users/pavlo.shtefanesku/Xamarin/fieldforcetest/packages/Xamarin.UITest.2.0.7/tools/test-cloud.exe" asubmit "/Users/pavlo.shtefanesku/Documents/appStore/MobileField.ipa" --async --fixture QLFieldForceiOSUITests.LoginTests.LoginForTheFirstTime --assembly-dir "/Users/pavlo.shtefanesku/Xamarin/fieldforcetest/QLFieldForceiOSUITests/bin/Debug"
Negotiating file upload to Xamarin Test Cloud.
Posting to https://testcloud.xamarin.com/ci/anonymous_uploads

Uploading Xamarin.UITest.dll ... Already uploaded.
Uploading nunit.framework.dll ... Already uploaded.

Uploading MobileField.ipa... 10%
Uploading MobileField.ipa... 20%
Uploading MobileField.ipa... 30%
Uploading MobileField.ipa... 40%
Uploading MobileField.ipa... 50%
Uploading MobileField.ipa... 60%
Uploading MobileField.ipa... 70%
Uploading MobileField.ipa... 80%
Uploading MobileField.ipa... 91%
Uploading MobileField.ipa... 100%

Uploading CsvHelper.dll... 41%
Uploading CsvHelper.dll... 83%
Uploading CsvHelper.dll... 100%
Uploading CsvHelper.dll... 100%

Uploading QLFieldForceiOSUITests.dll... 98%
Uploading QLFieldForceiOSUITests.dll... 100%
Error reading JObject from JsonReader. Current JsonReader item is not an object: Integer. Path '', line 1, position 3.
The application was terminated by a signal: SIGHUP

in advance, I don't use any JSON objects or whatever implicitly at least. 事先,我至少没有隐式使用任何JSON对象。

The additional packages used in the test project is only CsvHelper, 测试项目中使用的其他软件包只有CsvHelper,

Xamarin version: 6.2(build 1821) NUnit: 2.6.4 Xamarin.UITest: 2.0.7 Mac OS: 10.12.3 (16D32) Xamarin版本:6.2(内部版本1821)NUnit:2.6.4 Xamarin.UITest:2.0.7 Mac OS:10.12.3(16D32)

Please help with this issue. 请帮助解决此问题。

I have already resolved this issue. 我已经解决了这个问题。 As @Kent.Green mentioned it was the problem with the .ipa file of the app, I've just forgotten to put the .app in the "Payload" folder before zipping it. 正如@ Kent.Green提到的那样,该应用程序的.ipa文件存在问题,我只是忘了在压缩该应用程序之前将其放入“有效载荷”文件夹中。 ps Thanks to Xamarin Test cloud support, Kent helped me as a Pro:) ps感谢Xamarin Test云的支持,Kent帮助我成为了Pro :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM