cucumber-jvm

How to install Cucumber-JVM on Eclipse

╄→гoц情女王★ 提交于 2019-11-28 03:08:47
问题 I have searched all over the internet but a newbie on java I cant figure out how to simply install Cucumber-jvm on Eclipse. What files do I need to download? I already installed Eclipse. What do I need to do to get Cucumber-JVM on Eclipse? 回答1: If you mean the Cucumber plugin for Eclipse you can do this by: Open Eclipse, Click Help → Install New Software. Click Add button at right side of 'Work with' field. Give the Name say cucumber-eclipse and input the URL http://cucumber.github.com

Cucumber JVM undefined step

谁说胖子不能爱 提交于 2019-11-28 02:47:32
问题 I can't execute a simple test with cucumber for a project. I am on Intellij 13 Community, with cucumber plugin. I wrote my feature file in my features directory, I have also implemented my steps, creating them with the help of the plugin. And my steps in the feature files are recognized by intellij, which can navigate and go to the step implementation. But when I try to run my scenario, it always fails because for each step, it says "Undefined step : ". Here is how is organized my project :

How to get name of scenario in cucumber java?

ぃ、小莉子 提交于 2019-11-27 23:02:28
问题 I would like to get name of scenario to have meaningful logs and to generate custom report at run-time in java. Scenario class have only has getStatus() and getSourceTagNames() methods. I don't find a way to get scenario name. Can someone help me to get this resolved ? 回答1: From version 1.6, in addition to, getStatus() and getSourceTagNames() , there is another method, getName() that returns the scenario's description. For example, for a scenario as follows: Scenario: verify number of topics

Execute Cucumber step before/after a specific feature

删除回忆录丶 提交于 2019-11-27 22:58:47
问题 I want to specify certain setup and tear down steps for each specific feature file. I've seen hooks that allows code to execute before every scenario, and hooks to execute code before each feature, but I want to specify code to run once before and after all scenarios run for one specific feature. Is this possible? 回答1: Do you use cucumber-jvm? I found an article that fits your requirement. http://zsoltfabok.com/blog/2012/09/cucumber-jvm-hooks/ Basically, do not use JUnit @BeforeClass and

Is it possible to migrate from cucumber-jvm to QAF?

霸气de小男生 提交于 2019-11-27 17:03:01
问题 we already have automated testcases using cucumber-gherkin feature files with WebDriver. Right now we are able to execute feature files parallel, however we are not able to execute parallel at scenario/scenario outline level. By this way we want to minimize the execution time and utilize the cloud service at maximum level. I read this post, which claims one can run gherkin as QAF scenario so it will have features like run configuration, reporting, parallel execution, step listener . Before

Maven running cucumber specific feature files or folders

和自甴很熟 提交于 2019-11-27 13:58:12
问题 How is it possible to use the cucumber feature option from maven command line . Of a tree full of features (tests), I'm trying to run only individual features. In my case - all feature files in a selected folder. I've tried to use the following syntax: mvn install -Dcucumber.options="classpath:com/company/regression/features/administration/" It runs all tests. No errors and no comments. I tried several other options and none worked! Any help here will be greatly appreciated. 回答1: I changed my

Sharing same selenium WebDriver between step definition files

岁酱吖の 提交于 2019-11-27 13:50:00
Right now we're working on adopting Cucumber to run functional tests on our Java8/Spring app. We want our step definition files to remain as DRY as possible and as such plan on using the same step definitions in different feature files. Since we are using a selenium WebDriver to drive our tests, we need to share the same driver between step definitions. To demonstrate why having multiple drivers is an issue for us, imagine a feature file that defines two steps: one to navigate to a page, and another to assert that a line appears on that page. If both steps happen to be defined in separate

continue running cucumber steps after a failure

左心房为你撑大大i 提交于 2019-11-27 07:23:11
问题 Is there any way to continue executing Cucumber Steps even when one of the steps fails. In my current setup when a step fails , cucumber skips remaining steps....I wonder if there is some way to twick cucumber runner setup.. I could comment out failing steps but its not practical when you dont know which step will fail...If i could continue with remaining step i would know complete set of failing Tests in one shot....rather than going in cycle over cycle... Environment: Cucumber JVM , R ,

Good practice to pass variables between cucumber-jvm steps

大憨熊 提交于 2019-11-27 06:57:58
To pass variables between steps now I'm doing something like the example as follows: Feature: Demo Scenario: Create user Given User creation form management When Create user with name "TEST" Then User is created successfully Java class with steps definitions: public class CreateUserSteps { private String userName; @Given("^User creation form management$") public void User_creation_form_management() throws Throwable { // ... } @When("^Create user with name \"([^\"]*)\"$") public void Create_user_with_name(String userName) throws Throwable { //... this.userName = userName; } @Then("^User is

Get @CucumberOptions tag property using System.getProperty()

旧巷老猫 提交于 2019-11-27 03:53:50
问题 I am running a maven project in Eclipse for my Cucumber tests. My test runner class looks like this: @RunWith(Cucumber.class) @CucumberOptions( tags = { "@Now" }, // tags = { "@Ready" }, // tags = { "@Draft" }, features = { "src/test/java/com/myCompany/FaultReporting/Features" }, glue = { "com.myCompany.myApp.StepDefinitions" } ) public class RunnerTest { } Instead of having to hard code the tags into the test runner, I am keen to pass them in using the .command file. (i.e. using System