2

我很难确定导致 AppCenter 中的“应用程序启动”测试失败的原因。这是我得到的日志:

NUnit-Console version 2.6.3.13283
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment - 
   OS Version: Unix 17.4.0.0
  CLR Version: 4.0.30319.42000 ( Mono 4.0 ( 5.2.0.224 (d15-3/14f2c81 Thu Aug 24 10:33:52 EDT 2017) ) )

ProcessModel: Default    DomainUsage: Single
Execution Runtime: mono-4.0
Installing test cloud reporter.
Connected to Xamarin.UITest.
Run list: runlist.txt
.15-03-2018 13:05:06.922 +01:00 - 0 - Full log file: /Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/tmp/uitest/log-2018-03-15_13-05-06-914.txt
15-03-2018 13:05:07.047 +01:00 - 124 - Android test running Xamarin.UITest version: 2.2.1
15-03-2018 13:05:07.076 +01:00 - 153 - Using XAMARIN_TEST_CLOUD configuration override.
15-03-2018 13:05:07.996 +01:00 - 1073 - Initializing Android app with apk: /Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/app.apk
FTook final screenshot. { Title: "After test", FileName: "/Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/screenshot-final-99776814e79442b7b1a0fba447e5c853.png", ElapsedMilliseconds: 12250 }
Completed run. 19 events collected.

[[[  XTC-Output-Path: '/Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/tmp/TestRun-20180315-120905-6895' ]]]


Tests run: 1, Errors: 1, Failures: 0, Inconclusive: 0, Time: 239.2881854 seconds
  Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0

Errors and Failures:
1) SetUp Error : AppCenter.UITest.Android.Tests.AppDoesLaunch
   SetUp : System.Exception : Failed to execute: /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb shell am instrument -e "target_package" "com.companyname.MeStudentV1" -e "main_activity" "null" -e "debug" "false" -e "test_server_port" "37777" -e "class" "sh.calaba.instrumentationbackend.InstrumentationBackend" com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner - exit code: 1
/Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb:407: warning: already initialized constant ARGV
Parse am instrument -e target_package com.companyname.MeStudentV1 -e main_activity null -e debug false -e test_server_port 37777 -e class sh.calaba.instrumentationbackend.InstrumentationBackend com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
{:instrumentation=>"com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :instrumentation_name=>"sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :main_activity=>"null", :class=>"sh.calaba.instrumentationbackend.InstrumentationBackend", :target_package=>"com.companyname.MeStudentV1", :package_name=>"com.companyname.MeStudentV1.test"}
Parse am instrument -e target_package com.companyname.MeStudentV1 -e main_activity null -e debug false -e test_server_port 37777 -e class sh.calaba.instrumentationbackend.InstrumentationBackend com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
{:instrumentation=>"com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :instrumentation_name=>"sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :main_activity=>"null", :class=>"sh.calaba.instrumentationbackend.InstrumentationBackend", :target_package=>"com.companyname.MeStudentV1", :package_name=>"com.companyname.MeStudentV1.test"}
/Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb:117:in `shel': Error while starting {"message"=>"Waited for Calabash server on 37280. Did not launch.", "device_id"=>"88b18273-1f47-476c-be16-6d0c7ce1c349", "error_code"=>104}, 503, {"message":"Waited for Calabash server on 37280. Did not launch.","device_id":"88b18273-1f47-476c-be16-6d0c7ce1c349","error_code":104}. (RuntimeError)
    from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb:413:in `<main>'
  at Xamarin.UITest.Shared.Processes.ProcessRunner.Run (System.String path, System.String arguments, System.Collections.Generic.IEnumerable`1[T] noExceptionOnExitCodes) [0x00059] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Shared.Android.Adb.AdbProcessRunner.Run (System.String adbArguments, System.Int32[] noExceptionsOnExitCodes) [0x00011] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Shared.Android.Commands.CommandAdbInstrument.Execute (Xamarin.UITest.Shared.Android.Adb.AdbProcessRunner processRunner) [0x00081] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Shared.Execution.Executor.Execute[TDep1] (Xamarin.UITest.Shared.Execution.ICommand`1[TDep1] command) [0x0000c] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Shared.Android.TestCloudAndroidAppLifeCycle.LaunchApp (Xamarin.UITest.Shared.Android.ApkFile appApkFile, Xamarin.UITest.Shared.Android.ApkFile testServerApkFile, System.Int32 testServerPort) [0x0004c] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Android.AndroidApp..ctor (Xamarin.UITest.Configuration.IAndroidAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x001c1] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Android.AndroidApp..ctor (Xamarin.UITest.Configuration.IAndroidAppConfiguration appConfiguration) [0x00000] in <5745119407a04120bc96f6ab09d7913e>:0 
  at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <5745119407a04120bc96f6ab09d7913e>:0 
  at AppCenter.UITest.Android.Tests.SetUp () [0x00010] in <bcdaf2f196224d76ad22fb1c6eb5ef28>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <48b95f3df5804531818f80e28ec60191>:0 


WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

尝试在具有相同设备型号(Google PIXEL XL)和操作系统版本(Android 8.0)的模拟器上复制场景,并在我的模拟器上成功部署

4

1 回答 1

1

在咨询 AppCenter 的支持团队后。他们建议我将应用程序的 TargetFrameworkVersion 从 8.1 降低到 8.0,因为它目前不受支持。

于 2018-03-19T06:47:45.570 回答