Cucumber DSL for testing RESTful Web Services

Overview

Join the chat at https://gitter.im/ctco/cukes wercker status Maven

cukes-rest logo

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 request/response content from a file system, variable support in .features, context inflation in all steps and a custom plug-in system to allow users to add additional project specific content.

Resources

Sample Test

Feature: Gadgets are great!

  Background:
    Given baseUri is http://my-server.com/rest/

  Scenario: Should create another Gadget object
    Given request body from file gadgets/requests/newGadget.json
    And content type is "application/json"

    When the client performs POST request on /gadgets
    Then status code is 201
    And header Location contains "http://localhost:8080/gadgets/"

    When the client performs GET request on {(header.Location)}
    Then status code is 200
    And response contains property "id" with value other than "2000"
    And response contains property "name" with value "Nexus 9"
    And response does not contain property "updatedDate"

There are three sections available to be used in a Feature files:

  • Feature - a description of a feature under test
  • Background - set of steps to be executed before every scenario (usually these are preconditions)
  • Scenario - a single automated test case

As well as three groups of steps available

  • Given - building up a HTTP request to be performed
  • When - executing the request
  • Then - assertions based on a response received

More information can be found in the presentation right here!

Prerequisites

  • JDK 1.6+

Dependency

The dependencies are stored in Maven Central

cukes-rest: core dependency with all you need to get started with the framework (Maven)

<dependency>
    <groupId>lv.ctco.cukes</groupId>
    <artifactId>cukes-rest</artifactId>
    <version>${cukes-rest.version}</version>
</dependency>

Getting Started

There are two options to start local server with Sample Application:

  1. Run SampleApplicaiton.java with following params server server.yml from $MODULE_DIR$
  2. Execute Package/Install Maven phase of the parent project cukes-rest-all

Running tests

Precondition: in order for all tests to pass successfully, please make sure you started fresh instance of Sample Application.

  • To start a specific Feature/Scenario, either change CucumberOption in RunCukesTest.java or run Feature file directly from you IDE
  • To start all tests run RunCukesTest.java from sub-project cukes-rest-sample
  • To start all tests right from Maven, execute test phase in project cukes-rest-sample
Comments
  • Help on running cukes-rest-sample

    Help on running cukes-rest-sample

    I see below from README.md There are two options to start local server with Sample Application:

    • Run SampleApplicaiton.java with following params server server.yml from $MODULE_DIR$
    • Execute Package/Install Maven phase of the parent project cukes-rest-all

    I have stored this framework at C:\workspace\Rest\cukes-rest-sample. Could you please help me on how to run SampleApplicaiton.java with following params server server.yml from $MODULE_DIR$.

    1. What is $MODULE_DIR$ here?
    2. How to set params to SampleApplicaiton.java?

    Thanks :)

    opened by arkadiyala 6
  • Extensible dependency injection

    Extensible dependency injection

    The purpose of this pull request is to:

    1. Easy the integration with a preexisting test project
    2. Allow for DI through Guice for non-cuke-rest classes

    Some background: The way cucumber works with DI is that is looks scans the classpath for any class that instantiates ObjectFactory. There is a limitation which is that there can only be 1 ObjectFactory implementation. Once a cucumber-di library is in the classpath such as cucumber-guice the ObjectFactory is detected and based on specific configuration the user can create their own module/graph.

    The problem we have with the current implementation in cukes-rest is that it's imports cucumber-guice and sets it's own injectorSource making it difficult to use the DI framework without manually adding the cukes' GuiceModule from "internal" package and having two instances of the InjectorSource (a custom one and the one that is used statically in a few places.)

    Proposal: With this PR, there is now "official" support for DI by adding Guice Modules as long as it's before the ObjectFactory is used. This means that you can add your own modules in @BeforeClass or constructor of a custom Runner.

    NOTE: If there are more than 1 Cucumber Test Class then forking needs to be properly configured to use this DI implementation (see comments below).

    Example Usage:

    SingletonObjectFactory.instance().addModule(binder -> {
        binder.bind(ApplicationResolver.class).to(JarApplicationResolver.class).in(SCENARIO);
        binder.bind(ExecutableFactory.class).to(JarExecutableFactory.class).in(SCENARIO);
    
        binder.bind(NamedExecutables.class).in(SINGLETON);
        binder.bind(Variables.class).in(SCENARIO);
    });
    

    Additional Notes: I did try to make it compatible with other Di libraries but the level of complexity immediately became astronomical when you think about multiple graphs, precedence and recursive resolution.

    opened by jromero 6
  • Show error messege in test

    Show error messege in test

    In case than on server side occurs an error we would like to have a possibility to print the error message in test. Right now we just see that status code is not like expected.

    When we wait for 200 response with certain value and if that value is matched "FAILURE", then print element from that response (e.g. here "errors")

    opened by annapuskarjova 5
  • Could not resolve dependencies for project lv.ctco.cukes:cukes-rest-sample:jar:0.0.5-SNAPSHOT

    Could not resolve dependencies for project lv.ctco.cukes:cukes-rest-sample:jar:0.0.5-SNAPSHOT

    Go to cukes-rest-sample->pom.xml -> Right click ->select 'run as' ->Click on Maven install then i see below error . Could you please help on it.

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [INFO] Scanning for projects... [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building Cukes REST Sample Project 0.0.5-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for lv.ctco.cukes:cukes-rest-loadrunner:jar:0.0.5-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.937s [INFO] Finished at: Wed Aug 02 10:09:50 CDT 2017 [INFO] Final Memory: 6M/150M [INFO] ------------------------------------------------------------------------ ## [ERROR] Failed to execute goal on project cukes-rest-sample: Could not resolve dependencies for project lv.ctco.cukes:cukes-rest-sample:jar:0.0.5-SNAPSHOT: Could not find artifact lv.ctco.cukes:cukes-rest-loadrunner:jar:0.0.5-SNAPSHOT -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    opened by arkadiyala 4
  • Is cukes-rest double encoding query parameters?

    Is cukes-rest double encoding query parameters?

    I was just talking with @clee681 and it seems that https://github.com/ctco/cukes-rest/blob/4961e4adc9fd5c7c5e8e4e02b7d2dbf477ec1b84/cukes-rest/src/main/java/lv/ctco/cukesrest/internal/RequestSpecificationFacade.java#L71-L78 might be double encoding a query parameter such as foo=bar(baz)

    opened by yegeniy 4
  • Wonder how to create integer variable or other kinds of variables instead of string type via GlobalWorld

    Wonder how to create integer variable or other kinds of variables instead of string type via GlobalWorld

    @Singleton
    class GlobalWorld {
    
        private final Map<String, String> context = new ConcurrentHashMap<String, String>(); //Source code
    
        private final Map<String, Object> context = new ConcurrentHashMap<String, Object>(); //wanta it like this
    

    Example: GivenSteps:

    @Given("^let variable \"([^\"]+)\" equal to \"([^\"]+)\"$")
        public void var_assigned(String varName, String value) {
            world.put(varName, value);
        } // ----------------------------------------------------------------------------source code
    

    wanta it support like this

    @Given("^let variable \"([^\"]+)\" equal to (\\d+)$")
        public void var_assigned(String varName, int value) {
            world.put(varName, value);
        }
    

    And then in the feature file as below:

      Scenario: add highseas demo
        Given let variable "intVal" equal to 123
        Given request body "{"age":{(age)}}"
    

    I can get the integer value via {(age)} instead of the string type

    opened by aovercome1234 4
  • Step format inconsistency

    Step format inconsistency

    First off, I want to say thank you for the work put into this already.

    We initially had our own Http Steps implementations and moved to cuke-rest for the number of features provided out of the box. One of our challenges in moving to this library were in part the inconsistencies when writing a step.

    What I mean by this are the following:

    • Some steps use double quotes, others don't
    • Some steps use a colon (:) to denote it accepts a Docstrings

    I know it seems minor but a major part of our use of cucumber/guerkin is to make it externally presentable. Also, without proper IDE support it becomes a nightmare to remember nuances.

    Examples:

    Quotes

    And content type is "application/json"
    vs
    And header Location is not empty

    Docstrings

    And request body:
    """
    {
      "something": "value"
    }
    """
    

    vs

    And response contains properties from json
    """
    {
      "id": 1,
      "userId": "u1",
      "sku": "6mszh9v1sv",
      "store": "apple",
      "storeTransactionId": "t1",
      "status": "current"
    }
    """
    ``
    
    opened by jromero 3
  • Consider using

    Consider using "mockito-core" rather than "mockito-all"

    Hello again!

    While debugging a NoSuchMethodError with @yegeniy and @iantabolt, I wanted to offer a suggestion to use the mockito-core library rather than mockito-all. mockito-all includes Hamcrest classes, which can clash with Hamcrest classes pulled in as a transitive dependency of JUnit 4.11+ (see below dependency tree for JUnit 4.12).

    [INFO] \- junit:junit:jar:4.12:test
    [INFO]    \- org.hamcrest:hamcrest-core:jar:1.3:test
    

    Specifically, cukes-rest version 0.2.13 uses mockito-all version 1.10.8, which includes old Hamcrest classes (I think from 1.1). Notice that the below 1.10.8 version of mockito-all's Hamcrest Matcher class is missing the describeMismatch method.

    public interface Matcher<T> extends SelfDescribing {
      boolean matches(Object var1);
      // Missing describeMismatch method!!
      void _dont_implement_Matcher___instead_extend_BaseMatcher_();
    }
    

    This manifests itself in the following NoSuchMethodError exception when a test fails using JUnit 4.11+.

    Scenario: currentTeam hydration                                                        # features/person.feature:2
    Given queryParam "hydrate" is "currentTeam"                                            # GivenSteps.query_Param(String,String)
    When the client performs GET request on /v1/people/8471675                             # WhenSteps.perform_Http_Request(String,String)
    Then response contains property "people[0].currentTeam.teamName" with value "Penguins" # ThenSteps.response_Body_Contains_Property(String,String)
      java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at lv.ctco.cukesrest.internal.AssertionFacadeImpl.bodyContainsPathWithValue(AssertionFacadeImpl.java:103)
        at lv.ctco.cukesrest.internal.switches.SwitchedByInterceptor.invoke(SwitchedByInterceptor.java:33)
        at lv.ctco.cukesrest.internal.context.InflateContextInterceptor.invoke(InflateContextInterceptor.java:30)
        at lv.ctco.cukesrest.api.ThenSteps.response_Body_Contains_Property(ThenSteps.java:64)
        at ✽.Then response contains property "people[0].currentTeam.teamName" with value "Penguins"(features/person.feature:5)
    

    When fixing the dependency, we get a much more helpful error message.

    Scenario: currentTeam hydration                                                          # features/person.feature:2
      Given queryParam "hydrate" is "currentTeam"                                            # GivenSteps.query_Param(String,String)
      When the client performs GET request on /v1/people/8471675                             # WhenSteps.perform_Http_Request(String,String)
      Then response contains property "people[0].currentTeam.teamName" with value "Penguins" # ThenSteps.response_Body_Contains_Property(String,String)
        java.lang.AssertionError:
        Expected: Path people[0].currentTeam.teamName contains equal to ignoring type Penguins
             but: was null
          at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
          at org.junit.Assert.assertThat(Assert.java:956)
          at org.junit.Assert.assertThat(Assert.java:923)
          at lv.ctco.cukesrest.internal.AssertionFacadeImpl.bodyContainsPathWithValue(AssertionFacadeImpl.java:103)
          at lv.ctco.cukesrest.internal.switches.SwitchedByInterceptor.invoke(SwitchedByInterceptor.java:33)
          at lv.ctco.cukesrest.internal.context.InflateContextInterceptor.invoke(InflateContextInterceptor.java:30)
          at lv.ctco.cukesrest.api.ThenSteps.response_Body_Contains_Property(ThenSteps.java:64)
          at ✽.Then response contains property "people[0].currentTeam.teamName" with value "Penguins"(features/person.feature:5)
    
    opened by Clee681 3
  • LR body in the request should be one row

    LR body in the request should be one row

    Currently in some cases the request body in not generated in one row and LoadRunner throws script compilation error.

    web_custom_request("POST to http://localhost:8080/cih/api/contracts/%28contractId%29/involvedparties/", "URL=http://localhost:8080/cih/api/contracts/%28contractId%29/involvedparties/", "Method=POST", "Resource=0", "Mode=http", "Body={ "partnerId":2203934, "partnerRole":2165 }", "Snapshot=t7198821076.inf", LAST);

    opened by annapuskarjova 3
  • Add CI tool integration

    Add CI tool integration

    Add either https://snap-ci.com/ or https://travis-ci.org/ integration.

    Should have:

    • Post Submit:
      • Run Tests
      • Publish Snapshot version
    • Deploy version
      • Increment version
      • Deploy to MVN Central
    infrastructure 
    opened by AlexeyBuzdin 3
  • Java 8 Support

    Java 8 Support

    We believe it makes sense to migrate the code base to JDK8. It's a pretty stable SDK that has been out for 4 years now and some of the features introduced in this version of the language would help us to improve the source code quite a bit (lambdas, streams and optional types are handy).

    Are there any concerns from the community w.r.t this (breaking) change? I realize that there's several platforms that do not support JDK8 yet (e.g. Google's PaaS cloud is still running 8 in beta and many enterprises are in the same situation).

    opened by trioletas 2
  • Bump spring-boot-starter-web from 2.3.1.RELEASE to 2.5.12 in /cukes-samples/cukes-oauth-sample

    Bump spring-boot-starter-web from 2.3.1.RELEASE to 2.5.12 in /cukes-samples/cukes-oauth-sample

    Bumps spring-boot-starter-web from 2.3.1.RELEASE to 2.5.12.

    Release notes

    Sourced from spring-boot-starter-web's releases.

    v2.5.12

    :lady_beetle: Bug Fixes

    • MustacheAutoConfiguration in a Servlet web application fails with a ClassNotFoundException when Spring MVC is not on the classpath #30456

    :notebook_with_decorative_cover: Documentation

    • Javadoc of org.springframework.boot.gradle.plugin.ResolveMainClassName.setClasspath(Object) is inaccurate #30468
    • Document that @DefaultValue can be used on a record component #30460

    :hammer: Dependency Upgrades

    • Upgrade to Jackson Bom 2.12.6.20220326 #30477
    • Upgrade to Spring Framework 5.3.18 #30491

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    v2.5.11

    :star: New Features

    • Add EIGHTEEN to JavaVersion enum #29524

    :lady_beetle: Bug Fixes

    • Thymeleaf auto-configuration in a reactive application can fail due to duplicate templateEngine beans #30384
    • ConfigurationPropertyName#equals is not symmetric when adapt has removed trailing characters from an element #30317
    • server.tomcat.keep-alive-timeout is not applied to HTTP/2 #30267
    • Setting spring.mustache.enabled to false has no effect #30250
    • bootWar is configured eagerly #30211
    • Actuator @ReadOperation on Flux cancels request after first element emitted #30095
    • No metrics are bound for R2DBC ConnectionPools that have been wrapped #30090
    • Unnecessary allocations in Prometheus scraping endpoint #30085
    • Condition evaluation report entry for a @ConditionalOnSingleCandidate that does not match due to multiple primary beans isn't as clear as it could be #30073
    • Generated password are logged without an "unsuitable for production use" note #30061
    • Files in META-INF are not found when deploying a Gradle-built executable war to a servlet container #30026
    • spring-boot-configuration-processor fails compilation due to @DefaultValue with a long value and generates invalid metadata for byte and short properties with out-of-range default values #30020
    • Dependency management for Netty tcNative is incomplete leading to possible version conflicts #30010
    • Dependency management for Apache Kafka is incomplete #29023

    :notebook_with_decorative_cover: Documentation

    • Fix JsonSerializer example in reference guide #30329
    • Default value of spring.thymeleaf.reactive.media-types is not documented #30280
    • Add Netty in "Enable HTTP Response Compression" #30234

    ... (truncated)

    Commits
    • 35105a0 Release v2.5.12
    • 17936b8 Polish
    • 94c40c7 Upgrade to Spring Framework 5.3.18
    • 2e90fd2 Upgrade CI to Docker 20.10.14
    • 6cded5b Upgrade Java 18 version in CI image
    • 06c5e26 Upgrade to Jackson Bom 2.12.6.20220326
    • c0c32d8 Merge pull request #30456 from candrews
    • 8cb11b7 Polish "Make MustacheViewResolver bean back off without Spring MVC"
    • 7101b50 Make MustacheViewResolver bean back off without Spring MVC
    • 05b7bef Fix javadoc of ResolveMainClassName setClasspath(Object)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump spring-boot-starter-web from 1.5.22.RELEASE to 2.5.12 in /cukes-samples/cukes-rabbitmq-sample

    Bump spring-boot-starter-web from 1.5.22.RELEASE to 2.5.12 in /cukes-samples/cukes-rabbitmq-sample

    Bumps spring-boot-starter-web from 1.5.22.RELEASE to 2.5.12.

    Release notes

    Sourced from spring-boot-starter-web's releases.

    v2.5.12

    :lady_beetle: Bug Fixes

    • MustacheAutoConfiguration in a Servlet web application fails with a ClassNotFoundException when Spring MVC is not on the classpath #30456

    :notebook_with_decorative_cover: Documentation

    • Javadoc of org.springframework.boot.gradle.plugin.ResolveMainClassName.setClasspath(Object) is inaccurate #30468
    • Document that @DefaultValue can be used on a record component #30460

    :hammer: Dependency Upgrades

    • Upgrade to Jackson Bom 2.12.6.20220326 #30477
    • Upgrade to Spring Framework 5.3.18 #30491

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    v2.5.11

    :star: New Features

    • Add EIGHTEEN to JavaVersion enum #29524

    :lady_beetle: Bug Fixes

    • Thymeleaf auto-configuration in a reactive application can fail due to duplicate templateEngine beans #30384
    • ConfigurationPropertyName#equals is not symmetric when adapt has removed trailing characters from an element #30317
    • server.tomcat.keep-alive-timeout is not applied to HTTP/2 #30267
    • Setting spring.mustache.enabled to false has no effect #30250
    • bootWar is configured eagerly #30211
    • Actuator @ReadOperation on Flux cancels request after first element emitted #30095
    • No metrics are bound for R2DBC ConnectionPools that have been wrapped #30090
    • Unnecessary allocations in Prometheus scraping endpoint #30085
    • Condition evaluation report entry for a @ConditionalOnSingleCandidate that does not match due to multiple primary beans isn't as clear as it could be #30073
    • Generated password are logged without an "unsuitable for production use" note #30061
    • Files in META-INF are not found when deploying a Gradle-built executable war to a servlet container #30026
    • spring-boot-configuration-processor fails compilation due to @DefaultValue with a long value and generates invalid metadata for byte and short properties with out-of-range default values #30020
    • Dependency management for Netty tcNative is incomplete leading to possible version conflicts #30010
    • Dependency management for Apache Kafka is incomplete #29023

    :notebook_with_decorative_cover: Documentation

    • Fix JsonSerializer example in reference guide #30329
    • Default value of spring.thymeleaf.reactive.media-types is not documented #30280
    • Add Netty in "Enable HTTP Response Compression" #30234

    ... (truncated)

    Commits
    • 35105a0 Release v2.5.12
    • 17936b8 Polish
    • 94c40c7 Upgrade to Spring Framework 5.3.18
    • 2e90fd2 Upgrade CI to Docker 20.10.14
    • 6cded5b Upgrade Java 18 version in CI image
    • 06c5e26 Upgrade to Jackson Bom 2.12.6.20220326
    • c0c32d8 Merge pull request #30456 from candrews
    • 8cb11b7 Polish "Make MustacheViewResolver bean back off without Spring MVC"
    • 7101b50 Make MustacheViewResolver bean back off without Spring MVC
    • 05b7bef Fix javadoc of ResolveMainClassName setClasspath(Object)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump h2 from 1.4.196 to 2.1.210 in /cukes-sql

    Bump h2 from 1.4.196 to 2.1.210 in /cukes-sql

    Bumps h2 from 1.4.196 to 2.1.210.

    Release notes

    Sourced from h2's releases.

    Version 2.1.210

    Two security vulnerabilities in H2 Console (CVE-2022-23221 and possible DNS rebinding attack) are fixed.

    Persistent databases created by H2 2.0.x don't need to be upgraded. Persistent databases created by H2 1.4.200 and older versions require export into SQL script with that old version and creation of a new database with the new version and execution of this script in it.

    ... (truncated)

    Commits
    • ca926f8 Merge remote-tracking branch 'h2database/master'
    • be306de Version advancement
    • 030eb72 Improve migration documentation
    • 86d58c4 Merge pull request #3381 from katzyn/legacy
    • b613598 Typo
    • d6e4eb8 Add IDENTITY() and SCOPE_IDENTITY() to LEGACY mode
    • 36e790d make javadoc happier
    • 1c0ca27 Add "of this server" to adminWebExternalNames text
    • 0f83f48 Convert host names to lower case
    • c5f11a5 Merge pull request #3378 from katzyn/lob
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • feature request: parallel execution

    feature request: parallel execution

    (thanks for the recent upgrade to cucumber 6 :partying_face:)

    Are there any ongoing efforts for supporting parallel execution?

    After some failed attempts, it seems that it fails on the 2 following points (depending on the timing of the threads):

    1. io.cucumber.guice.SequentialScenarioScope enter/exit methods throw IllegalStateException https://stackoverflow.com/questions/44166354/cucumber-guice-injector-seems-not-to-be-thread-safe-parallel-execution-exec

    2. RestAssured -> Apache HttpClient -> BasicClientConnManager. Maybe replace with PoolingHttpClientConnectionManager? I think that one is thread-safe.

          java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated.
    Make sure to release the connection before allocating another one.
    
    ...     at lv.ctco.cukes.rest.api.WhenSteps.perform_Http_Request(WhenSteps.java:19)
    

    Not sure if there are other issues related to cukes-rest specifically, like how some variables are used (e.g. world). Probably there needs to be some more thread-isolation changes :/

    opened by Kidlike 1
  • cucumber.publish.quiet=true not working

    cucumber.publish.quiet=true not working

    Describe the bug When I try to remove the advert by setting cucumber.publish.quiet=true in my cucumber.properties file I have other issues that I don't understand.

    To Reproduce Steps to reproduce the behavior:

    1. Create a cukes-rest example project.
    2. Create cucumber.properties and insert cucumber.publish.quiet=true
    3. Run tests
    4. See the following error
    More than one Cucumber ObjectFactory was found in the classpath
    
    Found: lv.ctco.cukes.core.internal.di.SingletonObjectFactory, io.cucumber.guice.GuiceFactory
    

    Expected behavior The advert banner should be suppressed.

    Context & Motivation

    I'm attempting to get my new team to use Cucumber REST tests and the advert is a distraction.

    Your Environment

    • Versions used 6.9.0
    • Operating System and version Mac Big Sur
    • Build tool Gradle 6.7.1

    Additional context If I attempt to fix the problem using cucumber.object-factory=io.cucumber.guice.GuiceFactory I get the following error

          com.google.inject.ConfigurationException: Guice configuration errors:
    
    1) No implementation for java.util.Set<lv.ctco.cukes.core.extension.CukesPlugin> was bound.
    
    
    opened by mjaggard 1
Owner
C.T.Co
C.T.Co Open Source Community
C.T.Co
Java DSL for easy testing of REST services

Testing and validation of REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of usi

REST Assured 6.2k Dec 25, 2022
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 962 Dec 31, 2022
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.5k Jan 5, 2023
A template for Spring Boot REST API tested with JUnit 5 and Cucumber 6

demo-bdd Un template Spring Boot pour lancer un BDD/ATDD avec Cucumber 6 et JUnit 5. Maven et le JDK 17 seront nécessaires. Exécuter les tests Le proj

Rui Lopes 4 Jul 19, 2022
A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber.

Spectrum A colorful BDD-style test runner for Java Spectrum is inspired by the behavior-driven testing frameworks Jasmine and RSpec, bringing their ex

Greg Haskins 143 Nov 22, 2022
BDD framework for automation using Selenium Cucumber and TestNg

Selenium Framework with Cucumber BDD framework for automation using Selenium Cucumber and TestNg The framework has following features Modular Design M

null 3 Jan 20, 2022
This repository includes selenium tests examples using cucumber-jvm framework.

Cucumber Selenium Tests This repository includes cucumber selenium tests examples using wikipedia.org. Run tests To run tests on your local machine, y

Denys Vozniuk 3 Nov 27, 2022
Java testing framework for testing pojo methods

Java testing framework for testing pojo methods. It tests equals, hashCode, toString, getters, setters, constructors and whatever you report in issues ;)

Piotr Joński 48 Aug 23, 2022
Awaitility is a small Java DSL for synchronizing asynchronous operations

Testing asynchronous systems is hard. Not only does it require handling threads, timeouts and concurrency issues, but the intent of the test code can

Awaitility 3.3k Dec 31, 2022
Awaitility is a small Java DSL for synchronizing asynchronous operations

Testing asynchronous systems is hard. Not only does it require handling threads, timeouts and concurrency issues, but the intent of the test code can

Awaitility 3.3k Jan 2, 2023
Restful-booker API test automation project using Java and REST Assured.

Restful-booker API Test Automation Restful-booker API is an API playground created by Mark Winteringham for those wanting to learn more about API test

Tahanima Chowdhury 7 Aug 14, 2022
A tool for mocking HTTP services

WireMock - a web service test double for all occasions Key Features HTTP response stubbing, matchable on URL, header and body content patterns Request

Tom Akehurst 5.3k Dec 31, 2022
WireMock - A tool for mocking HTTP services

WireMock only uses log4j in its test dependencies. Neither the thin nor standalone JAR depends on or embeds log4j, so you can continue to use WireMock 2.32.0 without any risk of exposue to the recently discovered vulnerability.

null 5.3k Dec 31, 2022
Toolkit for testing multi-threaded and asynchronous applications

ConcurrentUnit A simple, zero-dependency toolkit for testing multi-threaded code. Supports Java 1.6+. Introduction ConcurrentUnit was created to help

Jonathan Halterman 406 Dec 30, 2022
A modern testing and behavioural specification framework for Java 8

Introduction If you're a Java developer and you've seen the fluent, modern specification frameworks available in other programming languages such as s

Richard Warburton 250 Sep 12, 2022
Randomized Testing (Core JUnit Runner, ANT, Maven)

RANDOMIZED TESTING ================== JUnit test runner and plugins for running JUnit tests with pseudo-randomness. See the following for more infor

null 167 Dec 26, 2022
Captures log entries for unit testing purposes

LogCaptor Install with maven <dependency> <groupId>io.github.hakky54</groupId> <artifactId>logcaptor</artifactId> <version>2.4.0</version>

null 215 Jan 1, 2023
A programmer-oriented testing framework for Java.

JUnit 4 JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. For more infor

JUnit 8.4k Jan 4, 2023