سؤال

I am setting up Frank and have done most of the setup. I am trying to run the built in cucumber test that simply rotates the device.

I do cucumber -d while in MyProject/Frank/ and get this:

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

Just confused, and hoping I am setting things up right. Thanks for any answers.

هل كانت مفيدة؟

المحلول 2

I figured it out a bit ago. I ran cucumber -d doing a "dry run" instead of just cucumber like a should have. When I run cucumber everything works fine.

نصائح أخرى

To use the Frank predefined steps, you should include the following line in the beginning of your "launch_steps.rb" file, which is normally located under "yourAppWorkspace/Frank/features/step_definitions":

require 'frank-cucumber/core_frank_steps.rb'

Then, if you run "cucumber" under the features directory your steps should run correctly.

You can also see all the predefined steps here: https://github.com/moredip/Frank/blob/master/gem/lib/frank-cucumber/core_frank_steps.rb

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top