【发布时间】:2013-11-17 15:05:16
【问题描述】:
我尝试使用 calabash-ios 测试框架来实现 UI 测试。我遵循了在不同站点上传播的所有方法和教程(xamarin testcloud 指南,在 github 上的 calabash-ios 框架,...)
在我的项目文件夹中,我使用calabash-ios gen 创建了功能目录
我的项目结构如下:(只是一些文件夹/文件
- Certificates
- Resources
- Solutions
- Source
|- B2.Device.Core.iOS
|- B2.Device.Service.iOS
|- B2.Device.iOS
|- AppDelegate.cs
|- B2.Device.iOS.csproj
|- Info.plist
|- MyFooViewController.cs
|- MyBarViewController.cs
|- bin
|- iPhone
|- iPhoneSimulator
|- Debug
|- *.dll
|- B2DeviceiOS.app
|- B2DeviceiOS.exe
|- features
|- my_first.freature
|- step_definitions
|- *.rb
|- support
在Source/B2.Device.iOS/ 内调用cucumber 会引发异常:
Dannys-MacBook-Air:B2.Device.iOS dannyyy$ cucumber
Feature: Running a test
As an iOS developer
I want to have a sample feature file
So I can begin testing quickly
Scenario: Example steps # features/my_first.feature:6
Unable to find *.xcodeproj in /Users/dannyyy/Projects/BauPlusMobile/Trunk/Source/B2.Device/B2.Device.iOS (RuntimeError)
/var/folders/6p/s4dwcb0x1yx9wjjk_51ds21r0000gn/T/Calabash-CA09BEA0-1735-4818-AB85-4874C6849183/Gems/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launch/simulator_helper.rb:61:in `derived_data_dir_for_project'
/var/folders/6p/s4dwcb0x1yx9wjjk_51ds21r0000gn/T/Calabash-CA09BEA0-1735-4818-AB85-4874C6849183/Gems/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launch/simulator_helper.rb:153:in `app_bundle_or_raise'
/var/folders/6p/s4dwcb0x1yx9wjjk_51ds21r0000gn/T/Calabash-CA09BEA0-1735-4818-AB85-4874C6849183/Gems/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:148:in `relaunch'
/Users/dannyyy/Projects/BauPlusMobile/Trunk/Source/B2.Device/B2.Device.iOS/features/support/01_launch.rb:29:in `Before'
Given I am on the Welcome Screen # features/step_definitions/my_first_steps.rb:1
Then I swipe left # calabash-cucumber-0.9.162/features/step_definitions/calabash_steps.rb:237
And I wait until I don't see "Please swipe left" # calabash-cucumber-0.9.162/features/step_definitions/calabash_steps.rb:168
And take picture # calabash-cucumber-0.9.162/features/step_definitions/calabash_steps.rb:232
Failing Scenarios:
cucumber features/my_first.feature:6 # Scenario: Example steps
1 scenario (1 failed)
4 steps (4 skipped)
0m1.043s
如果我使用 Xamarin.iOS 环境进行开发,怎么可能有一个 XCode 项目文件?我也尝试设置DEVICE_BUNDLE_PATH=~/Projects/BauPlusMobile/Trunk/Source/B2.Device/B2.Device.iOS/bin/iPhoneSimulator/Debug
但是当然会抛出同样的异常!
我看到的所有视频演示和截屏视频都使用 Xamarin.iOS 环境,但没有出现此错误。
进行测试的唯一方法是调用 cucumber NO_LAUNCH=1 并在 Xamarin Studio 中启动应用并附加调试器。
希望有人能帮帮我。
【问题讨论】:
标签: ios xamarin.ios cucumber xamarin calabash