0

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

应用程序:我有 iOS 应用程序的源代码(XCode 项目),我通过向应用程序添加 calabash.framework 链接到葫芦(由于本教程)虽然我找到了很多应用程序需要的信息Xamarin.Calabash.Start(),但我还没有添加它任何地方,因为实际上,我不确定应该将它放在 XCode 项目中的何处以及如何放置。我对此的谦虚看法:由于简化了将应用程序链接到 calabash.framework,因此仅用 Xamarin Studio 本身编写的应用程序才需要此字符串。

要在 BaseTest.class 中开始测试,我只添加了:

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

将 .ipa 文件提供给 Xamarin 工作室后,它会崩溃:

/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(内部版本 1821) NUnit:2.6.4 Xamarin.UITest:2.0.7 Mac OS:10.12.3 (16D32)

请帮助解决这个问题。

4

1 回答 1

0

我已经解决了这个问题。正如@Kent.Green 提到的,这是应用程序的 .ipa 文件的问题,我只是忘记在压缩之前将 .app 放在“Payload”文件夹中。ps 感谢 Xamarin 测试云支持,Kent 帮助我成为 Pro :)

于 2017-03-12T11:01:45.873 回答