cucumber-jvm

Which is correct combination of versions of cucumber-jvm parallel, maven surefire and compiler to be configured for running test cases in parallel

不羁岁月 提交于 2019-12-11 00:23:03
问题 I am new to cucumber-jvm parallel plugin and want to understand 2 things basically - First - Which is correct combination of version i shall choose of cucumber-jvm parallel plugin, maven surefire and compiler plugin Second - what is difference between cucumber-jvm implementation supporting parallel execution from V 4.0 and cucumber-jvm-parallel plugin There are 2 phases people configure in cucumber-jvm-parallel plugin. Goal as validate or generateRunners. Can someone guide me whts the

How to share variables across multiple cucumber step definition files with groovy

*爱你&永不变心* 提交于 2019-12-10 21:53:50
问题 I am using cucumber jvm to write tests with groovy. Up until now, I have had all of my step definitions in one file, and everything has worked perfectly. I am now looking to move the step definitions to seperate files, as I have a lot of them. The problem I am having is with instance variables. I tried to make my step definitions as generic as possible, so any annotated with @when returned an object called response, and any definitions annotated with @then asserted something on the response.

How to run cucumber jvm test scenarios in parallel using Gradle?

ε祈祈猫儿з 提交于 2019-12-10 21:35:26
问题 I couldn't find best solution for running cucumber test scenarios in parallel using gradle The best possible solution found so far is this.. but I can't run it locally successfully Any help much appreciated!! Thanks in advance. 回答1: Take a look at Courgette-JVM You can execute this with a gradle task. It has added capabilities to run cucumber tests in parallel on a feature level or on a scenario level . It also provides an option to automatically re-run failed scenarios. Usage @RunWith

Gradle doesn't pick up Cucumber-jvm

倾然丶 夕夏残阳落幕 提交于 2019-12-10 18:12:32
问题 I am trying to run Cucumber-jvm from Gradle. However no matter what I do I cannot get the features to actually run. They are always skipped while other JUnit tests are run. My features are in src/test/resources and I have a JUnit test in src/test/java with @RunWith(Cucumber.class) and @Feature(Myfeature.feature) attributes specified. Here is my Gradle script: repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.+' testCompile group: 'info.cukes

Cant run feature in Cucumber

て烟熏妆下的殇ゞ 提交于 2019-12-10 17:25:55
问题 Im having issues running a feature in Cucumber, the feature is very basic as it's from a tutorial. It is not defined and is as follows: Feature: Proof that my concept works Scenario: My first test Given this is my first step When this is my second step Then this is my final step My Cucumber runner class is as follows: package cucumber; import org.junit.runner.RunWith; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @Cucumber.Options( format = {"pretty", "json:target/"}, features

Is it possible to pass Java-Enum as argument from cucumber feature file

牧云@^-^@ 提交于 2019-12-10 15:15:38
问题 I am currently using selenium with Java,And want to implement cucumber to make test script more readable. Currently facing issue while passing argument to java method where Enum is expected as parameter. I would also like to know if there are any other known limitaions of cucumber-java befor migrating current framework. As i'm new on cucumber If any one knowing good source for learing cucumber in details please give me a link. 回答1: The answer is: Yes You can use all kind of different types in

How to load a value from . properties file in Cucumber-jvm step class

孤人 提交于 2019-12-10 14:59:11
问题 I have written a cucumber integration tests and it is running ok. And then i wanted some class variables from the step.java to get their values from .properties values public class cucumberStepClass { @Value("${value.from.propertiesfile}") private String variable //rest of integration test } Does anyone know how can i inject those values so my test can use them? 回答1: Have you enabled integration with spring dependency injection? You need to add the cucumber-spring dependency for that. See

How to integrate cucumber-jvm with maven build

怎甘沉沦 提交于 2019-12-10 12:20:07
问题 i'm trying to put some bdd into my eclipse plugin project, but can't figure out how to run my integration tests during maven build fase. To write my tests i'm using SWTBot framework. I already did the feature generation fase, and setup my tests. How do i setup my pom to run my integration tests? 回答1: I use below configuration and run mvn clean verify . If you don't want to run tests in parallel, remove parallel , perCoreThreadCount and threadCountClasses tags. Make sure to update the regular

setUp and tearDown for Scenrio outline (cucumber-jvm)

大兔子大兔子 提交于 2019-12-10 11:36:29
问题 i'm using scenario outline in my code and wanted to execute some code before the start of scenario outline and some code after the scenario outline execution has completed. I know there are @Before and @After annotations in cucumber but these gets executed before and after every scneario. So if I have a scenario outline and 3 rows of example data then @Before and @After will be executed each of then i.e. total 3 times each. But I want to execute it only once, @Before scenario outline and

cucumber.json report getting overwritten by rerun scenario report

时光怂恿深爱的人放手 提交于 2019-12-10 10:25:46
问题 I have got UI Test project and a API test project with same technology stack (JAVA1.8, Cucumber-JVM, JUnit, Maven) and both projects are showing me this problem. Probably because same set of dependencies are present in both. I have employed the Flaky test re-run mechanism using maven-surefire-plugin build-in functionality <rerunFailingTestsCount>1</rerunFailingTestsCount> . Also, I have cucumber dependencies added based on <groupId>io.cucumber</groupId> and not <groupId>info.cukes</groupId> .