0
我已经使用Ruby在Calabash中编写了各种测试。我已经在模拟器和物理设备上本地尝试过测试,并且没有任何问题,但是当我尝试在Xamarin测试云上执行它们时,它会引发与Calabash启动器相关的错误。我已经多次更改了01_launch.rb文件,并且错误仍然存在。这是日志文件:执行葫芦iOS测试时出错Xamarin测试云
{"type":"install","last_exception":{"class":"XTCOperationalError","message":"500\n{\"message\":\"undefined method `strip' for nil:NilClass\",\"app_id\”:\”XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"}","backtrace":null}} (XTCOperationalError)
./xtc-sandbox-runtime-lib/xtc/formatter/patches/calabash_common_patch.rb:64:in `raise_operational_error'
./xtc-sandbox-runtime-lib/xtc/formatter/patches/calabash_ios_patch.rb:223:in `xtc_install_app'
./xtc-sandbox-runtime-lib/xtc/formatter/patches/calabash_ios_patch.rb:129:in `relaunch'
./features/support/01_launch.rb:98:in `launch'
./features/support/01_launch.rb:340:in `Before'
我一直在寻找这个问题,但我没有找到任何相关的。我正在尝试测试该平台,以便在CI环境中为大型iOS和Android应用程序使用它。任何帮助将受到欢迎。
更新: 我已经能够使用这些设置,但Xamarin测试云测试仍然失败我的本地机器上运行在物理设备上进行测试。 出现故障的线路是在之前钩:
launcher.relaunch(options)
这是01_launch.rb文件:
# encoding: utf-8
require 'calabash-cucumber/launcher'
module LaunchControl
@@launcher = nil
def self.launcher
@@launcher ||= Calabash::Cucumber::Launcher.new
end
def self.launcher=(launcher)
@@launcher = launcher
end
def self.xcode
Calabash::Cucumber::Environment.xcode
end
def self.instruments
Calabash::Cucumber::Environment.instruments
end
def self.simctl
Calabash::Cucumber::Environment.simctl
end
def self.environment
{
:simctl => self.simctl,
:instruments => self.instruments,
:xcode => self.xcode
}
end
def self.target
ENV['DEVICE_TARGET'] || RunLoop::Core.default_simulator
end
def self.target_is_simulator?
self.launcher.simulator_target?
end
def self.target_is_physical_device?
self.launcher.device_target?
end
end
# Delete user data after a scenario tagged with '@reset_settings'
After('@reset_settings') do
if xamarin_test_cloud?
ENV['RESET_BETWEEN_SCENARIOS'] = '1'
elsif LaunchControl.target_is_simulator?
target = LaunchControl.target
device = RunLoop::Device.device_with_identifier(target, LaunchControl.environment)
RunLoop::CoreSimulator.erase(device)
else
LaunchControl.install_on_physical_device
end
end
Before do |scenario|
launcher = LaunchControl.launcher
options = {
}
launcher.relaunch(options)
end
After do |scenario|
if launcher.quit_app_after_scenario?
calabash_exit
end
end
我用葫芦,黄瓜(0.20.3)和run_loop( 2.2.2)宝石。
谢谢。 P.S:app_id被省略,在测试中真正的app_id设置正确。
谢谢,我用一些代码和更多的信息更新了这个问题。我希望它有帮助。 –
请给我一个链接,您的测试云运行。你可以私信给我。 – jmoody
https://testcloud.xamarin.com/test/eon-espana-sl-tu-oficina-online-pre_48d384c5-429a-4ef0-8c47-8cd3d797060d/ –