在我的项目文件夹中,我使用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 /中调用黄瓜会抛出异常:
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 `@R_361_4404@' /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:232Failing Scenarios:cucumber features/my_first.feature:6 # Scenario: Example steps1 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环境,但没有出现此错误.
进行测试的唯一方法是调用黄瓜NO_LAUNCH = 1并在附带调试器的Xamarin Studio中启动应用程序.
我希望有一个人可以帮助我.
解决方法 经过大量的尝试和错误后,我得到了解决问题的方法.我想我会解决一般用于使用Xamarin.iOS环境的用户的问题.>切换到包含* .csprojIn我的案例>的项目文件夹cd~ / Projects / MyProject / Trunk / Source / B2.Device / B2.Device.iOS
>生成功能目录> calabash-ios gen
>如果您还没有安装calabash-ios,请让我们开始> sudo gem安装calabash-cucumber
>创建配置目录并更改为> mkdir config> cd config
>创建一个名为cucumber.yml的文件
>将以下内容放入其中(可以更改配置文件名称以及其他环境变量以满足您的需要)
# 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
>返回项目目录并开始测试> calabash-ios -p ipad-sim
总结以上是内存溢出为你收集整理的黄瓜/ Calabash-iOS和Xamarin.iOS全部内容,希望文章能够帮你解决黄瓜/ Calabash-iOS和Xamarin.iOS所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)