Cucumber for the JVM

Overview

Cucumber JVM

OpenCollective OpenCollective

Maven Central Build Status Coverage Status

Cucumber-JVM is a pure Java implementation of Cucumber. You can run it with the tool of your choice.

Cucumber-JVM also integrates with all the popular Dependency Injection containers.

Getting started

Questions, Problems, Help needed?

Please ask on

Bugs and Feature requests

You can register bugs and feature requests in the Github Issue Tracker.

Please bear in mind that this project is almost entirely developed by volunteers. If you do not provide the implementation yourself (or pay someone to do it for you), the bug might never get fixed. If it is a serious bug, other people than you might care enough to provide a fix.

Contributing

If you'd like to contribute to the documentation, checkout cucumber/docs.cucumber.io otherwise see our CONTRIBUTING.md.

Issues
  • Add @BeforeAll and @AfterAll hooks

    Add @BeforeAll and @AfterAll hooks

    People keep asking for BeforeAll and AfterAll hooks. I haven't had a big need for them myself, but it seems to me this would be sufficient:

    public class GlobalHooks {
        private static boolean dunit = false;
    
        @Before
        public void beforeAll() {
            if(!dunit) {
                Runtime.getRuntime().addShutdownHook(afterAllThread);
                // do the beforeAll stuff...
                dunit = true;
            }
        }
    }
    

    If this doesn't cut it for you, please explain in this ticket, and maybe we'll add special support for it.

    :cucumber: core team :dollar: bounty $1000 :safety_pin: pinned 
    opened by aslakhellesoy 128
  • [Core] Parallel cukes

    [Core] Parallel cukes

    Notice

    This PR replaces Parallel support #1357 and relies on Refactor Runtime #1367

    Outline

    I’ve previously used another implementation to deliver parallel execution of cucumber tests, however it basically wrapped up the creation and execution of Runtime’s, followed by the need to merge the multiple JSON/HTML etc reports that followed.

    I reviewed the current implementation and also took note of comments in Support concurrent executions of scenarios also I perused all tickets related to running in parallel cukes for other insights

    Main changes

    Added --threads argument to runtime options

    Allows users to specify the (max) number of threads to be used to run the tests

    The actual number of threads used will be the smaller of the given --threads value and the number of features to be executed

    Tests are placed into a Queue and consumed by each thread when needed, resulting in a more performant usage of the threads & less deterministic order of Features being run

    New formatter introduced TimelineFormatter

    Which produces reports using vsjis.org timeline to highlight which feature was run on which Thread and when.
    Note: the resources (js, html etc) are currently within cucumber-core if the PR is accepted then I’d imagine these would have to be moved out into its own project, similarly to cucumber-html. timelineformatter example.zip

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue).
    • [x] New feature (non-breaking change which adds functionality).
    • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected). ~~- Runtime constructor now private Runtime.Builder introduce to hide away boiler plate setup/instantiation code~~

    Checklist:

    • [x] I've added tests for my code.
    • [x] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    opened by boaty82 65
  • cucumber-java8 fails on OpenJDK 1.8.0

    cucumber-java8 fails on OpenJDK 1.8.0

    Cucumber-Java8 depends on internals of the implementation of Oracle's JDK8. When I started experimenting with it I just always got the following exception:

    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.056 sec <<< FAILURE! - in soy.wimmer.CucumberIT
    Feature: Cucumber with Java8  Time elapsed: 0.047 sec  <<< ERROR!            
    cucumber.runtime.CucumberException: Failed to instantiate class soy.wimmer.CucumberStepdefs
    […]                                                                          
    Caused by: java.lang.reflect.InvocationTargetException: null                 
    […]                                                                          
    Caused by: cucumber.runtime.CucumberException: java.lang.IllegalArgumentException: Wrong type at constant pool index
    […]                                                                          
    Caused by: java.lang.IllegalArgumentException: Wrong type at constant pool index
        at sun.reflect.ConstantPool.getMemberRefInfoAt0(Native Method)           
        at sun.reflect.ConstantPool.getMemberRefInfoAt(ConstantPool.java:47)     
        at cucumber.runtime.java8.ConstantPoolTypeIntrospector.getTypeString(ConstantPoolTypeIntrospector.java:37)
        at cucumber.runtime.java8.ConstantPoolTypeIntrospector.getGenericTypes(ConstantPoolTypeIntrospector.java:27)
        at cucumber.runtime.java.Java8StepDefinition.<init>(Java8StepDefinition.java:45)
        at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:162)
        at cucumber.api.java8.En.Given(En.java:190)                              
        at soy.wimmer.CucumberStepdefs.<init>(CucumberStepdefs.java:8)           
    […]
    

    The test project causing this output is available at https://github.com/mawis/cucumber-java8-test

    While it fails on OpenJDK8 it works without problems on Oracle JDK8. I consider this to be a bug, as I don't think that cucumber should depend on a specific implementation of the compiler.

    opened by mawis 63
  • [Core] Implement cucumber expressions

    [Core] Implement cucumber expressions

    Summary

    • Implements Cucumber expressions
    • Removes XStream
    • Adds DataTables from https://github.com/cucumber/cucumber/pull/291
    • Introduces the concept of StepExpressions which combines a CucumberExpression and DataTable expression. Currently data table expressions are limited to a name or java type. Currently only the implicit type derived from the method argument is used.

    For a working example check the calculator examples.

    How to build

    Install (mvn install) datatables/java from cucumber/cucumber Then install this branch. If it fails you may need to remove pax-exam from examples/pom,xml. This is okay.

    Todo

    • [x] Fix android examples ~~* [ ] Add link to configuration docs in exceptions~~
    • [x] Test SnippetGenerators and StepdefGenerator icm Idea ~~* [ ] Update documentation~~
    • [x] Write blog post ~~* [ ] File IDEA bug about "Pattern expected" warning~~
    • [x] Undefined parameter type error should be similarly friendly as missing table type

    This closes #1041

    opened by mpkorstanje 63
  • [Core] Add Before and AfterStep hooks

    [Core] Add Before and AfterStep hooks

    This PR adds a new feature of AfterStep. Methods annotated with AfterStep will be executed after every step. For HTML Reports to work properly after this change , this PR requires to be merged

    Motivation and Context

    This change was requested by users of cucumber-jvm

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue).
    • [x] New feature (non-breaking change which adds functionality).
    • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected).

    Checklist:

    • [x] I've added tests for my code.
    • [x] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    opened by coding-yogi 53
  • International keywords

    International keywords

    Hi,

    I have problems switching the examples to Swedish international keywords. I've tried helloworld as well as java-calculator and both are having problems when I change to the following import statements:

    import cucumber.api.java.sv.Så; import cucumber.api.java.sv.När;

    It seems that Eclipse is not recognizing these packages in the repositories. I'm using everything else "as-is" from github (cucumber-jvm 1.1.3).

    Please note that I have no problems with:

    import cucumber.api.java.sv.Givet;

    which makes me suspect something related to the special Swedish characters.

    opened by hangvar 51
  • Support step hooks

    Support step hooks

    Feature: https://github.com/cucumber/cucumber/wiki/Hooks

    I am surprised that cucumber-jvm does not support step hooks. For example, when I use cucumber-jvm to build web application acceptance tests, I'd like to take screenshot after each step. Without step hooks, I have to invoke the method in every single step. painful.

    Any reason don't include this feature?

    :hourglass: stale :zap: enhancement 
    opened by ShijunK 44
  • Add command line option support for Android

    Add command line option support for Android

    This will enable cucumber-android test projects that are started through the activity manager (adb shell am instrument) to receive additional Cucumber options from the command line.

    General A normal test project would be started like this:

    adb shell am instrument -w com.mypackage.app.test/cucumber.api.android.CucumberInstrumentation
    

    The activity manager (am) supports additional extras for the instrument command:

    adb shell am instrument -w -e key value com.mypackage.app.test/cucumber.api.android.CucumberInstrumentation
    

    Multiple extras can be passed like this: -e key1 value1 -e key2 value2

    Supported Cucumber options

    am instrument argumentCucumber option
    -e glue PATH--glue PATH
    -e format FORMAT[:PATH_OR_URL]--format FORMAT[:PATH_OR_URL]
    -e tags TAG_EXPRESSION--tags TAG_EXPRESSION
    -e name REGEXP--name REGEXP
    -e dryRun true
    -e noDryRun true
    --[no-]-dry-run
    -e monochrome true
    -e noMonochrome true
    --[no-]-monochrome
    -e strict true
    -e noStrict true
    --[no-]-strict
    -e snippets [underscore|camelcase]--snippets [underscore|camelcase]
    -e dotcucumber PATH_OR_URL--dotcucumber PATH_OR_URL
    -e features [ [FILE|DIR][:LINE[:LINE]*] ]+[ [FILE|DIR][:LINE[:LINE]*] ]+

    Single argument for Cucumber options A single argument extra for the Cucumber options is also supported:

    adb shell am instrument -w -e cucumberOptions "--dry-run --name 'My Test'" com.mypackage.app.test/cucumber.api.android.CucumberInstrumentation
    

    When using cucumberOptions all other Cucumber option extras will be ignored.

    A few things to note

    • You cannot pass just a key without a value, that means a boolean option such as --strict would have to be passed like this: -e strict true
    • Feature references can be passed: -e features [ [FILE|DIR][:LINE[:LINE]*] ]+
    • Values containing spaces need to be passed like this: -e name "'My Feature'"
    • It is not possible to pass the same key multiple times, e. g. -e name Feature1 -e name Feature2 would result in the first name argument being overwritten by the second name argument: The test app would only see Feature2. In order to pass options more than once, you would need to separate the values by two dashes --, like this: -e name Feature1--Feature2

    This pull request also adds support for the following legacy test runner arguments

    am instrument argumentDescription
    -e count trueCount the number of tests (scenarios)
    -e debug trueWait for a debugger to attach before starting to execute the tests.
    Note: This was added by PR #613 already.
    -e log trueEnable Cucumber dry-run (same as --e dryRun true)
    -e coverage trueEnable EMMA code coverage
    -e coverageFile "/path/coverage.ec"Set the file name and path of the EMMA coverage report

    Asking for comments from the community, especially on the selection of the option value separator. I don't particularly like the two dashes, but it works. Does anyone have a better suggestion?

    The requirements are simple: It has to be a character or separator that is

    1. command line compatible (that means & and | will not work)
    2. not already used by Cucumber (e. g. , as in --tags @tag1,@tag2
    3. unlikely to appear in any feature name, file/path/url name, or tag name

    Thanks

    opened by friederbluemle 44
  • Add JUnit 5 Support

    Add JUnit 5 Support

    Summary

    Provide a JUnit 5 extension for cucumber.

    Expected Behavior

    When writing a test with JUnit 5 in our environment, we need to replicate a base environment in a way that we use different Extensions in order to to run tests. So we like to have a Scenario something like this:

    @ExtendWith(CucumberExtension.class)
    @ExtendWith(MockitoExtension.class)
    @ExtendWith(BaseBusinessEnvironmentExtension.class)
    class MyBusinessTest {
       @BeforeEach
        void init(@Mock Person person) {
            when(person.getName()).thenReturn("Dilbert");
        }
    
        @Test
        void simpleTestWithInjectedMock(@Mock Person person) {
            assertEquals("Dilbert", person.getName());
        }
    }
    

    Current Behavior

    At the moment under JUnit 4 we needed to tweak the Cucumber runner in order to call default JUnit 4 annotations.

    Possible Solution

    We like to help create an CucumberExtension that handles the Cucumber specific annotations for JUnit 5 as an JUnit 5 extension, so that it can be combined with other extensions as for example mocking frameworks.

    :safety_pin: pinned :zap: enhancement 
    opened by reinhapa 42
  • Support concurrent executions of scenarios

    Support concurrent executions of scenarios

    Currently it's only possible to execute feature classes in parallel. In case you have independent scenarios (and you really should) it would be nice to run them concurrently. The current codebase does not support this. First of all the reporting is inherently sequential and there is some state in the Runtime class (skipNextStep and scenarioResult). I would be happily contributing a patch, but this would require a major change of some of the internal structure.

    opened by whiskeysierra 37
  • Sonatype High Vulnerability Finding due to vis-timeline

    Sonatype High Vulnerability Finding due to vis-timeline

    Summary

    Sonatype registers a High Vulnerability issue with io.cucumber : cucumber-core : 6.10.3

    Expected Behavior

    Threat Level 6, Problem Code CVE-2020-28487 Related to using vis-timeline before 7.4.4 library

    See below for Sonatype's description of the error

    Possible Solution

    Upgrade vis-timeline to the latest and most secure version.

    Sonatype Documenation

    DESCRIPTION FROM CVE

    This affects the package vis-timeline before 7.4.4. An attacker with the ability to control the items of a Timeline element can inject additional script code into the generated application.

    EXPLANATION

    The vis-timeline package is vulnerable to Cross-Site Scripting (XSS) attacks. The functions in the files listed below fail to sanitize certain user-supplied parameters before rendering their values in HTML. A remote attacker who can influence Timeline elements can exploit this vulnerability by crafting a request containing malicious JavaScript in any affected parameter. The attacker can then entice a victim into submitting the request or interacting with the injection if it is stored. This will result in script execution when the resulting response is rendered by the victim's browser.

    Vulnerable File(s) and Function(s):

    package/lib/shared/Configurator.js

    _makeHeader() _makeLabel() _setupPopup() package/lib/shared/Popup.js

    setText() package/lib/timeline/Timeline.js

    constructor() package/lib/timeline/component/CustomTime.js

    setCustomMarker() package/lib/timeline/component/DataAxis.js

    _redrawLabel() _redrawTitle() package/lib/timeline/component/Group.js

    setData() package/lib/timeline/component/Legend.js

    function() package/lib/timeline/component/TimeAxis.js

    _repaintMinorText() _repaintMajorText() package/lib/timeline/component/item/Item.js

    _repaintOnItemUpdateTimeTooltip() _updateContents() package/dist/vis-timeline-graph2d.esm.js

    package/esnext/esm/vis-timeline-graph2d.js

    package/esnext/umd/vis-timeline-graph2d.js

    package/peer/esm/vis-timeline-graph2d.js

    package/peer/umd/vis-timeline-graph2d.js

    package/standalone/esm/vis-timeline-graph2d.js

    package/standalone/umd/vis-timeline-graph2d.js

    package/dist/vis-timeline-graph2d.min.js

    package/esnext/esm/vis-timeline-graph2d.min.js

    package/esnext/umd/vis-timeline-graph2d.min.js

    package/peer/esm/vis-timeline-graph2d.min.js

    package/peer/umd/vis-timeline-graph2d.min.js

    package/standalone/esm/vis-timeline-graph2d.min.js

    package/standalone/umd/vis-timeline-graph2d.min.js

    DETECTION

    The application is vulnerable by using this component.

    RECOMMENDATION

    We recommend upgrading to a version of this component that is not vulnerable to this specific issue.

    Note: If this component is included as a bundled/transitive dependency of another component, there may not be an upgrade path. In this instance, we recommend contacting the maintainers who included the vulnerable package. Alternatively, we recommend investigating alternative components or a potential mitigating control.

    ROOT CAUSE

    cucumber-core-6.10.3.jario/cucumber/core/plugin/timeline/vis.min.js[0.3.0, 5.0.0) ADVISORIES Project:https://github.com/visjs/vis-timeline/issues/838 Project:https://github.com/visjs/vis-timeline/pull/840 CVSS DETAILS CVE CVSS 3:6.8 CVSS Vector:CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L

    security vulnerability 
    opened by aslansservant42 4
  • [ERROR]AbstractTestNGCucumberTests.tearDownClass:53

    [ERROR]AbstractTestNGCucumberTests.tearDownClass:53

    Describe the bug Getting below error while using cucumber TestNG parallel execution

    [ERROR] tearDownClass(com.testrunners.ParallelRunner) Time elapsed: 362.452 s <<< FAILURE! java.lang.ClassCastException: io.cucumber.messages.Messages$GherkinDocument$Feature$TableRow cannot be cast to io.cucumber.messages.Messages$GherkinDocument$Feature$Step

    ParallelRunner --> This is my parallel execution runner class. Below is the snippet

    import org.testng.annotations.DataProvider;
    import io.cucumber.testng.AbstractTestNGCucumberTests;
    import io.cucumber.testng.CucumberOptions;
    
    @CucumberOptions(plugin = { "json:target/cucumber/Cucumber.json",
    		"rerun:reports/rerun.txt" }, features = "src/test/resources", glue = "com.stepdefinitions", tags = "@Different")
    
    public class ParallelRunner extends AbstractTestNGCucumberTests {
    	@Override
    	@DataProvider(parallel = true)
    	public Object[][] scenarios() {
    		return super.scenarios();
    	}
    }
    

    To Reproduce Every time I am not getting that error. It's kind of an intermittent issue not sure how to reproduce it. I have more than 10 jobs with different Tags and not every time I am getting this error in same job.

    Expected behavior At the end of execution as I mentioned my snipped it should generate Cucumber.json and rerun.txt file. Because of that error, both files are generating as null.

    Context & Motivation

    1. Using the Cucumber.json I am generating a cucumber report in Jenkins because of the empty file report generation is failing.
    2. Using the rerun.txt file I am trying to rerun the failed scenarios in the Jenkins to reduce the failures of scenarios.

    StackTrace

    ERROR-1:

    AbstractTestNGCucumberTests.tearDownClass:53 
    [ERROR] tearDownClass(com.testrunners.ParallelRunner)  Time elapsed: 362.452 s  <<< FAILURE!
    java.lang.ClassCastException: io.cucumber.messages.Messages$GherkinDocument$Feature$TableRow cannot be cast to io.cucumber.messages.Messages$GherkinDocument$Feature$Step
    

    ERROR-2:

    AbstractTestNGCucumberTests.tearDownClass:53 » NullPointer
    [ERROR] tearDownClass(com.testrunners.ParallelRunner)  Time elapsed: 302.141 s  <<< FAILURE!
    java.lang.NullPointerException
    

    Note: These 2 errors I am getting intermittently for different runs in jenkins.

    Your Environment

    • Versions used - [6.10.2]
    • Build tool [Maven and Jenkins]

    Additional context #2287 Earlier raised the request since it was closed I am raising it again with a full stack trace and removed the plugin = { "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:", even after removing it I am facing same issue.

    :baby_bottle: incomplete :bug: bug 
    opened by Liyakath2704 12
  • Update groovy.version to v3 (major)

    Update groovy.version to v3 (major)

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.codehaus.groovy:groovy-templates (source) | 2.5.14 -> 3.0.8 | age | adoption | passing | confidence | | org.codehaus.groovy:groovy-ant (source) | 2.5.14 -> 3.0.8 | age | adoption | passing | confidence |


    Configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    :robot: dependencies 
    opened by renovate[bot] 0
  • Allow using a HTTP proxy to send results

    Allow using a HTTP proxy to send results

    We should allow users behind a HTTP(S) proxy to publish results. See https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html

    :white_check_mark: accepted :zap: enhancement 
    opened by aslakhellesoy 10
  • Update dependency org.glassfish.jaxb:jaxb-runtime to v2.3.4

    Update dependency org.glassfish.jaxb:jaxb-runtime to v2.3.4

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.glassfish.jaxb:jaxb-runtime | 2.3.1 -> 2.3.4 | age | adoption | passing | confidence |


    Configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled due to failing status checks.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    :robot: dependencies 
    opened by renovate[bot] 1
  • [Core] Extract throwable collector

    [Core] Extract throwable collector

    Try and clean up the logic around throwing/re-throwing exceptions at various abstraction levels a bit

    :bank: debt 
    opened by mpkorstanje 0
  • Consider cucumber-lambda as a replacement for cucumber-java8

    Consider cucumber-lambda as a replacement for cucumber-java8

    cucumber-java8 allows step definitions to be defined as lambda's. This is really nice because it removes the need to type your step definition twice as you would with cucumber-java. So there is a good reason to use lambda's to define step definitions.

    Compare:

    Given("A gherkin and a zukini", () -> { 
    
    });
    
    @Given("A gherkin and a zukini")
    public void a_gherkin_and_zukini(){
    
    }
    

    Unfortunately with cucumber-java8 lambda's must be defined in the constructor of a step definition class. As a result we can not know which step definitions are defined until a Cucumber scenario has started and all world objects are instantiated. This makes it impossible to discover, cache and validate step definitions up front, preventing us from making Cucumber more efficient (#2035).

    public class StepDefinitions {
         public StepDefinitions(){
            Given("A gherkin and a zukini", () -> { 
    
           });
         }
    }
    

    Additionally Cucumber uses typetools to determine the type of lambda parameters. This requires the use of of Unsafe to fish in the constant pool. This is a non-trivial process and Cucumber currently uses typetools to facilitate this. However because this fundamentally depends on unsafe operation it is not guaranteed to work in the long run.

    Requested solution

    1. Implement cucumber-lambda as an alternative for cucumber-java8 that uses a DSL to build step definitions. Because this DSL is created in a static field it can be discovered in the same way cuucmber-java discovers step definitions and avoids the issues of cucumber-java8.
    public class CucumberLambdaStepDefinitions {
    
        @Glue
        public static CucumberLambda glue = CucumberLambda
            .using(World.class)
            .step("A gherkin and a zukini", (World world) -> () -> { 
                 world.setGherkins(1);
                 world.setZukinis(1);
            })
            .step("{int} gherkin(s) and {int} zukini(s)", (World world) -> (int gherkins, int zukinis) -> {
                 world.setGherkins(gherkins);
                 world.setZukinis(zukinis);
            });
    
           // repeat for hooks, parameter types and data table types, ect
           // hooks should be named beforeAll, beforeEach, beforeStep.
    
    1. Avoid the use of typetools where possible by specifying all parameter types

    2. The World object is created using DI as usual. Consider the possibility of defining steps/hooks using multiple objects.

    CucumberLambda
        .using(GherkinPatch.class, ZukiniPatch.class)
        .step("A gherkin and a zukini", (gherkinPatch, zukiniPatch) -> () -> { 
            // tend to the vegetable garden here
        });
    

    Out of scope

    1. Generate localized vairations of the DSL that use Given/When/Then.
        @Glue
        public static CucumberLambda glue = io.cucumber.lambda.en.CucumberLambda
            .using(World.class)
            .given("A gherkin and a zukini", (World world) -> () -> { 
                 world.setGherkins(1);
                 world.setZukinis(1);
            })
            .when("{int} gherkin(s) and {int} zukini(s)", (World world) -> (int gherkins, int zukinis) -> {
                 world.setGherkins(gherkins);
                 world.setZukinis(zukinis);
            });
            // ect.
    
    :pray: help wanted :zap: enhancement 
    opened by mpkorstanje 24
  • Automatically detect Guice InjectorSource

    Automatically detect Guice InjectorSource

    Currently the InjectorSource is created by looking up the guice.injector-source properties from the cucumber.properties file.

    Unfortunately this system is separated from the usual properties parsing. This means that for example when using JUnit5 which uses junit-platform.properties both junit-platform.properties and cucumber.properties have to be used.

    As solution to this would be similar to https://github.com/cucumber/cucumber-jvm/pull/1911 where a Backend implementation is used to scan for classes that implement io.cucumber.guic.InjectorSource. The GuiceFactory can then look for InjectorSource implementations and when there is exactly one, use it as the injector source.

    This would remove the need to use a property all together and allow the InjectorSource to be treated as glue.

    :pray: help wanted :zap: enhancement good first issue 
    opened by mpkorstanje 0
  • enable to customize cdi2 container initializer

    enable to customize cdi2 container initializer

    Is your pull request related to a problem? Please describe.

    Enable to use the CDI container initializer configuration using system properties.

    Describe the solution you have implemented Read cucumber.cdi2.* properties and wire them + a SPI to make it code first (easier in some cases, in particular for libraries).

    :zap: enhancement 
    opened by rmannibucau 6
  • [cdi2, jakarta-cdi] Cdi injection points

    [cdi2, jakarta-cdi] Cdi injection points

    Follow-up on #2248

    :zap: enhancement 
    opened by dcendents 7
Owner
Cucumber
Cucumber Open
Cucumber
Cucumber for the JVM

Cucumber JVM Cucumber-JVM is a pure Java implementation of Cucumber. You can run it with the tool of your choice. Cucumber-JVM also integrates with al

Cucumber 2.3k Mar 11, 2021
Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.

That feeling you get when you know you can trust your tests Serenity BDD is a library designed to make writing automated acceptance tests easier, and

Serenity BDD 538 Mar 13, 2021
JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

pact-jvm JVM implementation of the consumer driven contract library pact. From the Ruby Pact website: Define a pact between service consumers and prov

Pact Foundation 831 Mar 13, 2021
Cucumber DSL for testing RESTful Web Services

cukes-rest takes simplicity of Cucumber and provides bindings for HTTP specification. As a sugar on top, cukes-rest adds steps for storing and using r

C.T.Co 95 Feb 16, 2021
Clojure bindings for the Chromium Embedded Framework

clj-cef Clojure bindings for the Chromium Embedded Framework Dependency: Rationale From https://bitbucket.org/chromiumembedded/cef/src/master/ Some us

Adrian 30 Mar 25, 2021
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Testcontainers Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium we

null 4.7k Mar 13, 2021
TestNG testing framework

Documentation available at TestNG's main web site. Release Notes 7.4.0 7.3.0 7.1.0 7.0.0 Need help? Before opening a new issue, did you ask your quest

Cedric Beust 1.6k Mar 14, 2021