cucumber

Move the headings from top of Cucumber's Data Table to side - Python

风流意气都作罢 提交于 2020-01-07 04:07:40
问题 I am looking for the ways to change the headings of Cucumber's Data Table to the side. So it will make the feature file readable. Ordinary way: | Name | Email | Phone No. | ......... | | John | i@g.net | 098765644 | ......... | It can be a very wide data table and I would have to scroll back and forth. Desired way: | Name | John | | Email | i@g.net | | Phone No. | 098765444 | . . . There are a small number of examples in Java and Ruby. But I am working with Python. I had tried many different

Rails, Cucumber: make object and its associations

99封情书 提交于 2020-01-07 03:42:08
问题 I'm using mongoid, machinist 2 and pickle. But I think, that question is more common. I have an Account model: class Account include Mongoid::Document include Mongoid::Timestamps referenced_in :user end and User: class User include Mongoid::Document include Mongoid::Timestamps references_one :account end I have the following scenario(I set reference_one association): Scenario: Client views his account Given a user with id: "4ceede9b5e6f991aef000007" And the following accounts exist: | user_id

[Cucumber][JVM][Maven]Tests dosen't run from command line through maven

☆樱花仙子☆ 提交于 2020-01-07 03:00:18
问题 I am running tests using java, cucumber with Maven. I am using Eclipse IDE. Also the pom.xml has cucumber dependencies. I am running tests in two ways. From Eclipse IDE: I run tests as Junit tests and the test results are successful. 2: From command promt: My test failed and below is the result. Here is the Pom.xml: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 <groupId>CCIRA_Test_Auto</groupId> <artifactId>CCIRA_Test_Auto</artifactId> <version>0.0.1</version> <packaging>jar</packaging>

How do I use same Cucumber step definitions for android and iOS

半腔热情 提交于 2020-01-07 02:57:07
问题 I'm currently beginning an automation project for an app that is identical in flow and design for both Android and iOS. I'm using Ruby with the Cucumber framework. I have begun automating Android and essentially what I need to do is each step definition to have separate code for android and ios kind of like this pseudo-code: Then (/^I click the Login Button$/) do if mobile_platform = android #android locators and code here else #iOS locators and code here end end How would I go about setting

Handling cucumber scenario examples as one scenario

大憨熊 提交于 2020-01-07 02:42:13
问题 I'm having a problem with Cucumber - right now I'm doing a mobile automation and I have features that use scenario outlines - I have a few variables in the scenario : Scenario Outline: Menu items Given the user is on the hamburger menu And the language is <language> Then menu item is <menu item> Examples: | menu item | language | | Search | EN | | Zoeken | NL | | Recherche | FR | | Saved properties | EN | | Bewaarde zoekertjes | NL | | Biens sauvés | FR | | Saved searches | EN | | Bewaarde

How to make Cucumber test continue running scenarios when RSpec ExpectationnotMet is thrown

会有一股神秘感。 提交于 2020-01-06 18:07:47
问题 I'm running scenarios with Cucumber/Ruby and every time the test runs, RSpec catches the error. All remaining steps (step definitions) are skipped. I don't want them to skip. I would like the program to run completely and only report that the issues happened. Any ideas on how I can get this working? It looks kind of like this: RSpec::Expectations::ExpectationNotMetError: expected "something" not to include "something else" Skipped step Skipped step Skipped step Skipped step Skipped step

Inconsistently getting error (Watir::Wait::TimeoutError)

◇◆丶佛笑我妖孽 提交于 2020-01-06 08:25:10
问题 I am new to cucumber,while running script at times I am getting error (Watir::Wait::TimeoutError) I am not finding any particular pattern to it. Any help will be dearly appreciated. Many thanks 回答1: First, ensure you're requiring the proper library for watir-webdriver/wait. require "watir-webdriver/wait" Watir has a few methods of declaring wait times on objects, for example (via Watir Webdriver/Waiting): Explicit waits There are four built in methods that you can use to make your waiting

How to maintain folder structure while exporting to Runnable Jar in Eclipse?

匆匆过客 提交于 2020-01-06 06:31:07
问题 I am trying to find a solution for this from the past one week and have posted a question regarding the same. I have created a simple Maven Project. And have written a feature file which is open browser, go to facebook and close the browser. First of all, below is the project structure, Project Structure Below is my feature file. Name of the feature file is Testing.feature Feature: Open FB Scenario: Open FB Given User opens "facebookURL" on "ChromeBr" When User is on facebook Then close the

Cucumber::ArityMismatchError error after Transform

徘徊边缘 提交于 2020-01-06 05:00:46
问题 my step definition Transform /^user "([^"]*)"$/ do | email | Person.find_by_email(email) end Given /^login as (user "([^"]*)")$/ do | user | login_as email end my feature login as user "ca@example.org" I am getting this error And user "ca@example.org" has security role "contact" # features/step_definitions/security_role_steps.rb:14 And login as user "ca@example.org" # features/step_definitions/security_role_steps.rb:10 Your block takes 1 argument, but the Regexp matched 2 arguments. (Cucumber

Cucumber failing to work after bundle update

ε祈祈猫儿з 提交于 2020-01-06 02:38:07
问题 After running bundle update I have suddenly found that my cucumber tests are failing to get going. Running cucumber features gives me: $ cucumber features Using the default profile... uninitialized constant ActiveRecord (NameError) /Library/Ruby/Gems/1.8/gems/rspec-expectations-2.3.0/lib/rspec/expectations/backward_compatibility.rb:6:in `const_missing' /Library/Ruby/Gems/1.8/gems/default_value_for-1.0.1/lib/rails.rb:23 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original