gpt4 book ai didi

iphone - 弗兰克设置完成,但 cucumber 测试不工作

转载 作者:行者123 更新时间:2023-11-28 21:32:10 24 4
gpt4 key购买 nike

我正在设置 Frank 并且已经完成了大部分设置。我正在尝试运行仅旋转设备的内置 cucumber 测试。

我在 MyProject/Frank/ 中执行 cucumber -d 并得到这个:

cucumber -d
Feature:
As an iOS developer
I want to have a sample feature file
So I can see what my next step is in the wonderful world of Frank/Cucumber testing

Scenario: # features/my_first.feature:6
Rotating the simulator for demonstration purposes
Given I launch the app # features/step_definitions/launch_steps.rb:5
Given the device is in landscape orientation # features/my_first.feature:9
Given the device is in portrait orientation # features/my_first.feature:10
Given the device is in landscape orientation # features/my_first.feature:11
Given the device is in portrait orientation # features/my_first.feature:12

1 scenario (1 skipped)
5 steps (1 skipped, 4 undefined)
0m0.002s

You can implement step definitions for undefined steps with these snippets:

Given(/^the device is in landscape orientation$/) do
pending # express the regexp above with the code you wish you had
end

Given(/^the device is in portrait orientation$/) do
pending # express the regexp above with the code you wish you had
end

只是感到困惑,希望我的设置是正确的。感谢您的回答。

最佳答案

要使用 Frank 预定义步骤,您应该在“launch_steps.rb”文件的开头包含以下行,该文件通常位于“yourAppWorkspace/Frank/features/step_definitions”下:

require 'frank-cucumber/core_frank_steps.rb'

然后,如果您在 features 目录下运行“cucumber”,您的步骤应该会正确运行。

您还可以在此处查看所有预定义步骤:https://github.com/moredip/Frank/blob/master/gem/lib/frank-cucumber/core_frank_steps.rb

关于iphone - 弗兰克设置完成,但 cucumber 测试不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16177454/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com