cucumber

Cucumber examples reuse in different features/scenarios

只愿长相守 提交于 2020-02-04 18:43:12
问题 I've been using cucumber for awhile and I've stumbled upon a problem: Actual question: Is there a solution to import the examples from a single file/db using cucumber specifically as examples? Or alternatively is there a way to define a variable while already in-step to be an example? Or alternatively again, is there an option to send the examples as variables when I launch the feature file/scenario? The Problem: I have a couple of scenarios where I would like to use exactly the same examples

Is it possible to write a gherkin step on multiple lines?

前提是你 提交于 2020-02-03 03:03:27
问题 I am new to the Gherkin language and this seems to me like very basic question but I could not find answer to it. I am aware that it is possible to write multi-line step argument in Gherking, like this: Given a blog post named "Random" with Markdown body """ Some Title, Eh? ============== Here is the first paragraph of my blog post. Lorem ipsum dolor sit amet, consectetur adipiscing elit. """ My question is about writing single step on multiple lines, something like this: Given that Gherkin

Cucumber on IronRuby incredibly slow to start?

一笑奈何 提交于 2020-02-02 12:50:28
问题 I'm using IronRuby 0.9.1 and cucumber 0.4.0. I also have MRI 1.8 installed. I've created the following wrapper script (icucumber.bat) to run cucumber on IronRuby @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 @"C:\ironruby\bin\ir.exe" "c:\ruby\bin\cucumber" %* Navigating to cucumber-0.4.0\examples\i18n\en and running: cucumber features // takes about 4 seconds to complete icucumber features // takes about 30 seconds to complete Cucumber on IR

Cucumber on IronRuby incredibly slow to start?

不羁的心 提交于 2020-02-02 12:50:06
问题 I'm using IronRuby 0.9.1 and cucumber 0.4.0. I also have MRI 1.8 installed. I've created the following wrapper script (icucumber.bat) to run cucumber on IronRuby @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 @"C:\ironruby\bin\ir.exe" "c:\ruby\bin\cucumber" %* Navigating to cucumber-0.4.0\examples\i18n\en and running: cucumber features // takes about 4 seconds to complete icucumber features // takes about 30 seconds to complete Cucumber on IR

how to scroll a web page using watir

老子叫甜甜 提交于 2020-01-31 04:31:15
问题 I am trying to scroll a web page to find and click on a content that is lazily loaded when the page is scrolled. I am using following command require 'watir-webdriver' @browser = Watir::new :firefox @browser.send_keys :space I am using web-driver with firefox and I am on ubuntu but it is not working. In the following ruby code I am trying to scroll the page down until I don't find the element with :id. The element is loading lazily. I am getting timeout after few seconds, any idea what is

Cucumber入门(一)------项目生成

老子叫甜甜 提交于 2020-01-26 14:39:28
文章目录 背景 简介 Cucumber使用 什么是Gherkin? 关键字 构建cucumber项目 背景 首次接触到cucumber是入职上家公司的时候,发现作为测试框架可以简洁明了的显示测试用例,后期维护方便,便喜欢上了这个框架。 简介 这个简介都是类似的,所以这里面就复制一下不在进行阐述了。 cucumber是BDD(Behavior-driven development,行为驱动开发)的一个自动化测试的副产品。它使用自然语言来描述测试,使得非程序员可以理解他们。Gherkin是这种自然语言测试的简单语法,而Cucumber是可以执行它们的工具。关于BDD有兴趣自行了解。官网链接和GitHub地址,里面也有关于BDD的信息。 cucumber本质上是使用根据正则表达式匹配自然语言,然后依次执行对应的方法,以达到测试的目的。 Cucumber使用 Cucumber 有很多种语言的实现版本,例如 Java、Ruby、.NET、NodeJS 等等,并且 Cucumber 可以和主流的测试框架很好地集成,以接口自动化为例,Cucumber很好的兼容现在主流的接口测试框架,例如RestAssured,Karate,REST Client 什么是Gherkin? 关键字 主要关键字有: 关键字 中文解释 feature “功能” background “背景” Rule “规则”

WebDriver element is returning false for isVisible/waitForForVisible

拟墨画扇 提交于 2020-01-25 11:52:29
问题 I am working on my first set of Cucumber tests in a Meteor app, but I cannot get the login step to work. My app uses a custom login plugin I wrote specifically for this project. Here is the step, as I currently have it defined with debug output: this.Given(/^I am logged in as a\/an "([^"]*)"$/, function(roleName, callback) { this.browser .url(url.resolve(process.env.HOST, '/')) .waitForExist('#appSignIn'); this.browser.getHTML('#appSignIn', function(err, html) { if (err) { console.log('err: '

Cucumber execution order in Jenkins

情到浓时终转凉″ 提交于 2020-01-25 08:14:34
问题 I have over 20 Cucumber features, when I execute test on my computer - test are running with alphabetic order, but when I execute test in remote Jenkins, order is always the same, but not in alphabetical order. Do you know how execution order in jenkins is set? I have problem with that because I have rerun class and I want to execute it at the end of tests 回答1: I have the same situation as you. But i create the order of execution from runner class in cucumber. In tags i identify the order of

Execution order of test cases in Cucumber

烂漫一生 提交于 2020-01-25 07:59:08
问题 Below is the structure how my Feature Files are divide. I have created Folders based on the functionalities and then added the scenarios inside them. Now, I have to tag few test cases among them as Smoke Test cases and get them executed. The point here is I need a specific order for that as in eg Add Asset Run Test Schedule Test Delete Asset Since I will add something first and then work on it and delete it at the end I know by default Cucumber executes test cases alphabetically but that

Cucumber::Undefined error something to worry about?

时光总嘲笑我的痴心妄想 提交于 2020-01-25 05:25:20
问题 My cucumber feature file is as follows Feature: Create and Manage Videos In order to record a video As a registered user I want to create and manage videos Scenario: sent videos list Given I have sent video titled "Happy Birthday" to "My Friend X" When I go to my outbox list of videos Then I should see "Happy Birthday" video And I should see "My Friend X" I run cucumber using the following command cucumber features I get the following output Using the default profile... Feature: Create and