无法在测试云上 运行 Xamarin.UITest:当前 JsonReader 项目不是对象
Can't run Xamarin.UITest on Test Cloud: Current JsonReader item is not an object
我在 Xamarin.TestCloud 运行 Xamarin.UITest 测试中遇到了问题,尽管它在模拟器和真实 iPad 上完美通过。
应用程序:我有 iOS 应用程序的源代码(XCode 项目),我通过向应用程序添加 calabash.framework 链接到葫芦(由于这个 tutorial)
虽然我发现应用程序需要 Xamarin.Calabash.Start()
的很多信息,但我没有将它添加到任何地方,因为实际上,我不确定我应该把它放在 XCode 项目的什么地方以及如何。我对此的谦虚看法:由于将应用程序链接到 calabash.framework.
的简化,只有在 Xamarin Studio 本身编写的应用程序才需要此字符串
要在 BaseTest.class 中开始测试,我只添加了:
app = ConfigureApp.
.iOS
.EnableLocalScreenshots()
.InstalledApp("com.ios.dev")
.StartApp();
将 .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
事先,我不使用任何 JSON 对象或至少隐含的任何内容。
测试项目中额外使用的包只有CsvHelper,
Xamarin 版本:6.2(内部版本 1821)
N单位:2.6.4
Xamarin.UITest:2.0.7
Mac OS: 10.12.3 (16D32)
请帮忙解决这个问题。
我已经解决了这个问题。正如@Kent.Green 提到的,这是应用程序的 .ipa 文件的问题,我只是忘记在压缩之前将 .app 放在 "Payload" 文件夹中。
p.s。感谢 Xamarin 测试云支持,Kent 作为专业人士帮助了我:)
我在 Xamarin.TestCloud 运行 Xamarin.UITest 测试中遇到了问题,尽管它在模拟器和真实 iPad 上完美通过。
应用程序:我有 iOS 应用程序的源代码(XCode 项目),我通过向应用程序添加 calabash.framework 链接到葫芦(由于这个 tutorial)
虽然我发现应用程序需要 Xamarin.Calabash.Start()
的很多信息,但我没有将它添加到任何地方,因为实际上,我不确定我应该把它放在 XCode 项目的什么地方以及如何。我对此的谦虚看法:由于将应用程序链接到 calabash.framework.
要在 BaseTest.class 中开始测试,我只添加了:
app = ConfigureApp.
.iOS
.EnableLocalScreenshots()
.InstalledApp("com.ios.dev")
.StartApp();
将 .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
事先,我不使用任何 JSON 对象或至少隐含的任何内容。
测试项目中额外使用的包只有CsvHelper,
Xamarin 版本:6.2(内部版本 1821) N单位:2.6.4 Xamarin.UITest:2.0.7 Mac OS: 10.12.3 (16D32)
请帮忙解决这个问题。
我已经解决了这个问题。正如@Kent.Green 提到的,这是应用程序的 .ipa 文件的问题,我只是忘记在压缩之前将 .app 放在 "Payload" 文件夹中。 p.s。感谢 Xamarin 测试云支持,Kent 作为专业人士帮助了我:)