cucumber-jvm

Maven/Junit Parallel Execution - Cucumber-JVM v4.0.0

筅森魡賤 提交于 2019-12-06 05:23:59
I'm struggling to get the new parallel execution feature of Cucumber-JVM v4.0.0 working with JUnit/Maven. As specified here , if you configure <parallel> and <threadCount> accordingly in your POM, and use dependency injection to share state (I'm using Pico Continer) then your Cucumber features should execute in parallel. However, it is still only executing one feature at a time when i run Maven. I've included my complete POM below - Can anybody help? <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache

Parallel Test run with cucumber

蓝咒 提交于 2019-12-06 04:20:44
I am currently trying to achieve parallel test run with cucumber. I managed to run two different runners at the same time with the sure-fire plugin. Now I want to check whether is it possible to run SingleRunner file multiple times in parallel. Ex: I have SignUpRunnerTest.java so I need to run this against few platforms parally.Is it possible? This is my Runner file import cucumber.api.CucumberOptions; import cucumber.api.cli.Main; import cucumber.api.junit.Cucumber; import java.util.List; import javax.management.MXBean; import org.junit.Before; import org.junit.Test; import org.junit.runner

Unable to run cucumber feature feature

自作多情 提交于 2019-12-06 04:05:46
问题 I am unable to run the feature file. whenever i tried to run the file i am getting the below stack trace Exception in thread "main" Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+ Options: -g, --glue PATH Where glue code (step definitions and hooks) is loaded from. -f, --format FORMAT[:PATH_OR_URL] How to format results. Goes to STDOUT unless PATH_OR_URL is specified. Built-in FORMAT types: junit, html, pretty, progress, json. FORMAT can also be a fully qualified

java - Cucumber on JUnit Test Failure Hook

不羁的心 提交于 2019-12-06 01:03:40
问题 We use Cucumber-JVM to script our acceptance tests and JUnit to execute them (via the JUnit Cucumber runner). As these tests involve Selenium WebDriver, I want to be able to take a screenshot should my test fail (which I have the code for). If I simply add a WebDriver onException hook, the screenshot won't be taken when an assertion fails. I want to be able to add a JUnit execution listener to the Cucumber runner, but the API doesn't seem to support this (no addListener method on Cucumber

Maven + Cucumber-jvm - How to run different subset of the features depending on environment

巧了我就是萌 提交于 2019-12-05 18:50:19
I am strugging to achieve this: I want to configure a maven project so that it runs different subsets of the cucumber features depending on the selected profile (dev | pro) For instance, I have a couple of feature files to test web navigation, using tags to specify the environment: PRO @pro Feature: Nav Pro Scenario: navigate to home Given access / Then it should be at the home page DEV @dev Feature: Nav Dev Scenario: navigate to login and log user correctly Given access /login When the user enters xxxx yyyy Then it should be logged I created two Test java classes, one for each environment:

cucumber.json report getting overwritten by rerun scenario report

烈酒焚心 提交于 2019-12-05 18:41:21
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> . Both these have their own version of cucumber-java and cucumber-jvm dependencies. My POM.XML looks

@DirtiesContext tears context down after every cucumber test scenario, not class

故事扮演 提交于 2019-12-05 11:28:05
Integration test executed by cucumber tends to leave behind context that causes problems with subsequent tests. Obvious solution appeared to be Spring's @DirtiesContext , but instead of tearing down the context after all the cucumber features have been run, it does this after each and every scenario, thus making the test execution time rather lengthy. Tried also with @TestExecutionListeners , but no luck. @RunWith( SpringJUnit4ClassRunner.class ) @ContextConfiguration( classes = { MyApplication.class, MyTestComponent.class }, loader = SpringApplicationContextLoader.class ) @ActiveProfiles( {

Cucumber-JVM ant task

随声附和 提交于 2019-12-05 04:02:26
问题 How do i tell ant to execute all cucumber tests (features, implementations) in a folder? I'm stuck using this example <target name="runcukes" depends="compile-test"> <mkdir dir="target/cucumber-junit-report"/> <java classname="cucumber.cli.Main" fork="true" failonerror="false" resultproperty="cucumber.exitstatus"> <classpath refid="classpath"/> <arg value="--format"/> <arg value="junit:target/cucumber-junit-report/allcukes.xml"/> <arg value="--format"/> <arg value="pretty"/> <arg value="-

How do I run my cucumber-jvm features in parallel? (with maven using cucumber-jvm-parallel-plugin)

浪尽此生 提交于 2019-12-05 03:35:29
问题 I am trying to incorporate a maven plugin cucumber-jvm-parallel-plugin into my Cucumber-JVM code and am running into some problems... I think I have configured my pom.xml properly, but my cucumber features are still getting ran one by one instead of in parallel . How do I configure my pom.xml to make my cucumber features run in parallel? I have some feature files that block execution and I don't want to have to wait for them to finish in order to start testing the other features. I followed

Parallel execution of features files : maven-failsafe-plugin vs cucumber-jvm-parallel-plugin

谁都会走 提交于 2019-12-04 21:25:09
Currently I'm using maven-failsafe-plugin to run multiple feature files in parallel with Selenium Grid + nodes ( all running in docker containers ) I'm basic questions as below when to use cucumber-jvm-parallel-plugin ? what benefits / disadvantages of cucumber-jvm-parallel-plugin over maven-failsafe-plugin parallel execution ? Thanks in advance. Below is the answer "A common approach for running Cucumber features in parallel is to create a suite of Cucumber runners, one for each suite of tests you wish to run in parallel. For maximum parallelism, there should be a runner per feature file.