cucumber

“rake” runs all my Cucumber tests fine but “cucumber” doesn't have the steps

时光总嘲笑我的痴心妄想 提交于 2019-12-18 07:33:43
问题 I've inherited a Rails (3) app and am trying to get to grips with the existing Cucumber tests. I've got the following setup in the app's 'features' folder (I've missed out any files which aren't relevant, eg extra features and steps) /features /people new-person.feature /step_definitions people_steps.rb web_steps.rb /support env.rb paths.rb selectors.rb If I run 'rake' then it runs all the features in features/people/new-person.feature, correctly using the steps listed in step_definitions.

unable to connect to chromedriver http://127.0.0.1:46050 (Selenium::WebDriver::Error::WebDriverError)

蓝咒 提交于 2019-12-18 06:55:26
问题 I get this error when I run my cucumber tests: "* Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome (Selenium::WebDriver::Error::UnknownError) * " I downloaded the chromdriver, unzip it, copy it to the path (/opt/google/chrome/google-chrome ) and sudo chmod +x /opt/google/chrome/google-chrome. which google-chrome : /usr/bin/google-chrome which chromedriver : /usr/share/ruby-rvm/gems/ruby-1.9.2

How to run cucumber feature file from java code not from JUnit Runner

不羁岁月 提交于 2019-12-18 06:51:41
问题 I want to run cucumber feature file from java code. currently we are running form JUnit Runner package com.compareglobalgroup.testscript; import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests; @CucumberOptions(features = { "src/test/resources/feature/BB" }, glue = { "com.compareglobalgroup.stepdefs.BB", "com.compareglobalgroup.cucumber.hooks" }, plugin = { "json:cucumberreport/json/cucumberreport.json" }, tags = { "" + "@Test" }) public class TestRunnerBB

Protractor Cucumber BDD Tests Show Pass before Execution

杀马特。学长 韩版系。学妹 提交于 2019-12-18 04:23:22
问题 I have a sample BDD test using Protractor with Cucumber. On executing the code, the console immediately shows the result as passed and the code actually begins executing only after that. I wish execution status display to be in sync with actual execution.(e.g Console displays - ' Given I launch the protractor demo page ' and the code underneath is executed, then console displays next step and so on) I know it has got something to do with Async coding and callbacks, not able to figure out the

How do I fake OpenID login in RSpec user story/Cucumber when using open_id_authentication plugin

旧时模样 提交于 2019-12-18 03:40:56
问题 I'm trying to write a Cucumber scenario that requires me to have a logged in user - that would normally be quite simple but I'm only using OpenID authentication (curtosy of the authentication plugin). However after digging through the open_id_authentication plugins guts I'm not sure how I could achieve this within Cucumber. 回答1: I've figured out a way, if you place this in your features/support/env.rb: ActionController::Base.class_eval do private def begin_open_id_authentication(identity_url,

Cucumber scenario outline and examples with generic step definitions

a 夏天 提交于 2019-12-18 00:07:18
问题 I have a Feature file which is as below: Scenario Outline: Create ABC Given I open the application When I enter username as <username> And I enter password as <password> Then I enter title as <title> And press submit Examples: | username | password | title | | Rob | xyz1 | title1 | | Bob | xyz1 | title2 | This mandates me to have step definitions for each of these values. Can i instead have a generic step definition that can be mapped for every username or password or title values in the

Cucumber scenario outline and examples with generic step definitions

╄→гoц情女王★ 提交于 2019-12-18 00:06:07
问题 I have a Feature file which is as below: Scenario Outline: Create ABC Given I open the application When I enter username as <username> And I enter password as <password> Then I enter title as <title> And press submit Examples: | username | password | title | | Rob | xyz1 | title1 | | Bob | xyz1 | title2 | This mandates me to have step definitions for each of these values. Can i instead have a generic step definition that can be mapped for every username or password or title values in the

Intellij IDEA Run configurations for Cucumber runner class

人盡茶涼 提交于 2019-12-17 20:56:05
问题 I am new to Intellij IDEA. I have a POM based cucumber-selenium project, where I've created cucumber runner classes for each feature file. While working with Eclipse I was able to execute these runner classes by Right click. However in Intellij IDEA (licensed version), even when cucumber-for-java and junit plugins are enabled in Settings window, I dont get Run option. Also in Run/Debug configurations window -> Cucumber java -> what should be the main class? My main class has code to launch

Cucumber Selenium using Excel File as Data Table

允我心安 提交于 2019-12-17 20:28:00
问题 I am using Cucumber-Selenium and Excel as my Data file, my question is how can I run my feature file multiple time based on the data I have on the Excel. For Example I have 10 rows of data in Excel and wanted to run it one by one, after the first row of data it will move to the next row and execute it. Feature File: Scenario: Login Given I open the browser and access this URL When I enter the "<Username>" and "<Password>" Then I am able to login Step Definition: public class Login { WebDriver

java.lang.NoClassDefFoundError exception while running cucumber test using JUnit

六眼飞鱼酱① 提交于 2019-12-17 20:07:36
问题 I'm trying to run a cucumber test with JUnit and I'm getting java.lang.NoClassDefFoundError exception. JUnit code: package ctest; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions( features = "Feature" ,glue={"stepDefinition"} ) public class Runner { } Exception: java.lang.NoClassDefFoundError: gherkin/formatter/Formatter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang