黄瓜/葫芦iOS和Xamarin.iOS
我尝试使用葫芦ios测试框架实现UI测试。我遵循了所有的howto,在不同网站上传播的教程(xamarin testcloud指南,github上的葫芦ios框架,…) 在我的项目文件夹中,我使用黄瓜/葫芦iOS和Xamarin.iOS,ios,xamarin.ios,cucumber,xamarin,calabash,Ios,Xamarin.ios,Cucumber,Xamarin,Calabash,我尝试使用葫芦ios测试框架实现UI测试。我遵循了所有的howto,在不同网站上传播的教程(xamarin testcloud指南,github上的葫芦ios框架,…) 在我的项目文件夹中,我使用calabash ios gen 我的项目结构如下:(只是一些文件夹/文件) 在Source/B2.Device.iOS/内部调用cucumber会引发异常: Dannys-MacBook-Air:B2.Device.iOS dannyyy$ cucumber Feature: Running a t
calabash ios gen
我的项目结构如下:(只是一些文件夹/文件)
在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\u BUNDLE\u PATH=~/Projects/BauPlusMobile/Trunk/Source/B2.DEVICE/B2.DEVICE.iOS/bin/iPhoneSimulator/Debug
当然,同样的异常也会被抛出
我看到的所有视频演示和屏幕广播都使用Xamarin.iOS环境,但没有出现此错误
运行测试的唯一方法是调用cucumber NO_LAUNCH=1
并在Xamarin Studio中启动附加了调试器的应用程序
我希望有人能帮助我。经过多次尝试和错误,我找到了解决问题的方法。我想我会为使用Xamarin.iOS环境的用户解决这个问题
*.csproj
光盘~/Projects/MyProject/Trunk/Source/B2.Device/B2.Device.iOS
功能
目录<葫芦ios gen
- 如果您还没有安装葫芦ios,让我们开始安装葫芦黄瓜
config
目录并更改为它
>葫芦ios-p ipad sim
谢谢,非常有帮助!
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
# YAML Template
---
ipad-sim: APP="~/Projects/MyProject/Trunk/Source/B2.Device/B2.Device.iOS/bin/iPhoneSimulator/Debug/B2DeviceiOS.app" BUNDLE_ID="tld.domain.project" SDK_VERSION=6.1