cucumber

How to skip Cucumber steps?

ぃ、小莉子 提交于 2020-01-01 10:10:13
问题 I have the scenario like: Given I go to this page When I type cucumber And I click Then I should see the text And I should not see the line If I run this scenario it will execute all the 5 steps. But I want to skip the 4th step (Then I should see the text) and execute the 5th step. Please give me your suggestions. Thanks in advance. :) 回答1: TL;DR - don't do it - you're (probably) getting it wrong. And you can't (easily) do it. As Aslak wrote (one of Cucumber main creators): A step can have

How do I find an image generated by Dragonfly with Cucumber/Capybara?

怎甘沉沦 提交于 2020-01-01 07:20:27
问题 In the comments to the solution for How do I find an image on a page with Cucumber/Capybara, somebody asked: I can't seem to figure how to get this to work with URLs generated by Dragonfly. They look like this: /media/BAh_some_long_string_AwIw/12_11_52_810_5x5.jpg?s=7e360000, where 5x5.jpg is my file name. I've tried something like: //img[@src="/media/ / #{image}?s=*"] but it doesn't work. Got any tips? – Ramon Tayag Feb 25 at 4:18 I have a similar problem, only worse - in my case, the

Running Serenity -Cucumber Test cases in parallel

做~自己de王妃 提交于 2020-01-01 07:06:10
问题 I'm new to Serenity and BDD. I've a small demo project based on Serenity-Cucumber and Page Based model. Below is the structure of the project: The Login and Logout features have around 8 scenarios. I want to be able to run the feature files in parallel. What is the easiest and most effective way to achieve this? So far I have Created separate Runner class for each feature and then used failsafe or surefire plugin - This is something I don't want as I don't want a new runner for each feature

Why are my cucumber scenarios failing when steps are run together, but pass when run singularly?

那年仲夏 提交于 2020-01-01 05:46:13
问题 When I run my cucumber scenarios as a whole, or with the command: cucumber I get 7 failing steps. When I run them individually with the work in progress tag they pass fine. I don't think it's a database state issue.. I'm running with transactions and I also tried running without and cleaning the database with database cleaner.... still does not help. I tried to run the debugger but it does not seem to work when I run the command cucumber. It only works when I run with the work in progress tag

cucumber vs. RSpec

泪湿孤枕 提交于 2019-12-31 09:15:10
问题 I want to start diving into BDD. I have never used TDD before and am not sure if I should start by learning RSpec and then jump to Cucumber or just go straight to using Cucumber. I have been reading on the internet about both and it seems to me that Cucumber could be a 'replacement' for RSpec. Am I right or should be one used for certain things and the other one for others? 回答1: Yes, cucumber and rspec are both used for BDD. I personally prefer Cucumber, but some people find it offputting,

Selenium Java Webdriver: Adding a string to an Xpath

守給你的承諾、 提交于 2019-12-31 06:24:13
问题 I have the folllowing piece of Java in which I want to add a String inside a statement: @and ("^I want to change fieldnumber \"([^\"]*)\" , remove whats inside and add the following text: \"([^\"]*)\"$") public void testscenario12345(String number, String text) throws Throwable { driver.findElement(By.xpath("//*[contains(@name,'template:view:<INSERT NUMBER STRING HERE>:item:view:1:item:')]")).clear(); driver.findElement(By.xpath("//*[contains(@name,'template:view:<INSERT NUMBER STRING HERE>

Maven compilation error when run through command line - Cucumber Maven Project

妖精的绣舞 提交于 2019-12-31 05:48:08
问题 mvn clean test running from command line says , No Compiler is provided in this environment , perhaps you are running on JRE rather than a JDK. Selected Installed JRE's as latest JDK in preferences, still am getting the above error. When running single feature file , the old code is being executed (i.e. though i comment out few steps from the scenario , they are being executed) Same code when building with Jenkins is working fine. 回答1: Assuming windows and your actual directories may vary,

promise chaining vs promise.all

限于喜欢 提交于 2019-12-31 05:34:10
问题 i have a task to enter the notification date using protractor where i need to clear contents before entering so i have came up with this code this.Then(/^I should enter "Notification Date"$/, () => { const d = new Date(); return orderCheckOutPage.pageElements.recipientNotificationDateMonth.clear().then(() => { return orderCheckOutPage.pageElements.recipientNotificationDateMonth.sendKeys(d.getMonth() + 1).then(() => { return orderCheckOutPage.pageElements.recipientNotificationDateDay.clear()

How to implement and run cucumber test files using testng

点点圈 提交于 2019-12-31 03:12:10
问题 Trying to implement selenium + Cucumber + Testng instead of Junit. My queries are What is the alternate for @Runwith(Cucumber.class) in testng How to run the class file which contains the path to feature file package runner; import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests; @CucumberOptions(features="src/main/java/testCases/Cucumber/Login_Cucumber.Feature",glue="") public class TestRunner extends AbstractTestNGCucumberTests { } 回答1: TestNg uses

Configuration in Allure to Cucumber in Ruby

核能气质少年 提交于 2019-12-30 10:55:07
问题 I need to configure the following params: environment, trend, history, executors, retries, etc. I need these params for cucumber to work with ruby. I searched in a lot of places and I did not find much. I would appreciate if you can provide these params. 回答1: History Allure stores history information to allure-report/history folder during report generation. So you need to copy such folder from previous launch into your allure-results before you generate the report. History features are