无法在Test Cloud上运行Xamarin.UITest:当前的JsonReader项不是对象

时间:2017-03-07 09:34:47

标签: c# xamarin-test-cloud xamarin.uitest ios10.2

我在Xamarin.TestCloud中运行Xamarin.UITest测试时遇到了麻烦,尽管它完美地传递了模拟器和真正的iPad。

应用程序:我有iOS应用程序的源代码(XCode项目),我通过将calabash.framework添加到应用程序来链接到calabash(由于此tutorial) 虽然我发现应用程序需要Xamarin.Calabash.Start()的很多信息,但我没有在任何地方添加它,因为实际上,我不知道我应该把它放在XCode项目中的哪个位置和方式。我对它的谦虚看法:由于将应用程序链接到calabash.framework的简化,只需要在Xamarin Studio本身编写的应用程序中使用此字符串。

要在BaseTest.class中启动测试,我只添加了:

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

在向Xamarin studio提供.ipa文件后,它崩溃了:

/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

事先,我至少不会隐式地使用任何JSON对象。

测试项目中使用的其他包只是CsvHelper,

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

请帮助解决这个问题。

1 个答案:

答案 0 :(得分:0)

我已经解决了这个问题。正如@ Kent.Green所提到的那样,应用程序的.ipa文件存在问题,我只是忘了将.app放入" Payload"压缩它之前的文件夹。 附:感谢Xamarin测试云支持,Kent帮我作为专业人士:)