bbd-cucumber-gherkin-lib

Cucumber library for simpler e2e tests with predefined sentences for API and basic database access for Spring.

MIT License

Stars
6
Committers
7

Bot releases are hidden (Show)

bbd-cucumber-gherkin-lib - Release 1.18.0 - Support for flexible JSON comparison

Published by Ragin-LundF about 4 years ago

Release 1.18.0

Configure the JSON compare to ignore extra elements in arrays

Scenario:
  Given that the response JSON can contain arrays with extra elements

It is also possible to use the @bdd_lib_json_ignore_new_array_elements annotation on Feature or Scenario level.

With this sentence or annotation, the JSON comparison will ignore new array elements.

See src/test/resources/features/flexible_json/ for examples.

Configure the JSON compare to ignore the order of arrays

Scenario:
  Given that the response JSON can contain arrays in a different order

It is also possible to use the @bdd_lib_json_ignore_array_order annotation on Feature or Scenario level.

With this sentence or annotation, the JSON comparison will ignore the order of arrays.

See src/test/resources/features/flexible_json/ for examples.

Configure the JSON compare to ignore extra fields

Scenario:
  Given that the response JSON can contain extra fields

It is also possible to use the @bdd_lib_json_ignore_extra_fields annotation on Feature or Scenario level.

With this sentence or annotation, the JSON comparison will ignore new/not defined fields in the response.

See src/test/resources/features/flexible_json/ for examples.

bbd-cucumber-gherkin-lib - Release 1.17.0 - Simplified sentences and better file handling

Published by Ragin-LundF about 4 years ago

Absolute file path support

Files can be added as a relative path to a previously given base path or with an "absolute" path with the prefix absolutePath:.
In the last case, the system is using the base classpath as root.

Validate response HTTP code and body together

Scenario:
  Then I ensure that the response code is 201 and the body is equal to
    """
    {
      "field": "value",
    }
    """

In this case, the response status code is part of the sentence, and the JSON is written directly under the sentence and enclosed in three double quotation marks.
Here it is also possible to use JSON Unit syntax to validate dynamic elements.

Validate response HTTP code and body together with a JSON file

Scenario:
  Then I ensure that the response code is 200 and the body is equal to the file "response.json"

In this case, the response status code, and the JSON file are written together in one sentence.
Here it is also possible to use JSON Unit syntax to validate dynamic elements.

bbd-cucumber-gherkin-lib - Release 1.16.0

Published by Ragin-LundF about 4 years ago

  • Changing the body manipulation with creating numbers from <number> characters to <number> bdd_lib_numbers (e.g. 10 bdd_lib_numbers).
  • Adding bdd_lib_uuid to generate random UUIDs
  • Adding a ${json-unit.matches:isValidUUID} which checks, if the string is a valid UUID
  • Fixed Authorization header, that this header is only available once when it is overwritten
  • Adding a lot of tests as examples
bbd-cucumber-gherkin-lib - Release 1.15.0

Published by Ragin-LundF about 4 years ago

Adding support in the paths to support templates.
If the path contains something like:

/api/v1/${dynamicElement}/

In this case, the dynamicElement will be replaced, if it exists in the ScenarioContext.

Support for adding static key/value pairs to the context:

bbd-cucumber-gherkin-lib - Release 1.14.0: Adding JSON Path support to the "I set the value" sentence

Published by Ragin-LundF about 4 years ago

Release 1.14.0

Adding support for the JSON path to the "I set the value of" sentence.
It now also tries to resolve the value from the ScenarioContext.
If nothing is found, it uses the original value.

bbd-cucumber-gherkin-lib - Release 1.13.0: Adding support for JSON path to the "I store" sentence.

Published by Ragin-LundF about 4 years ago

Adding support for JSON path to the "I store" sentence.

The JSON path can be used with:

$.firstElement[3].nextElement

The library detects if the path has the prefix $.. If it is not available, it adds this prefix.

bbd-cucumber-gherkin-lib - Adding support for header manipulation

Published by Ragin-LundF about 4 years ago

  • Adding support for adding and manipulating headers.
  • Restructured the documentation: HTTP Methods have now their own md files.
bbd-cucumber-gherkin-lib - Adding new JSON Unit matcher and support for custom matchers

Published by Ragin-LundF about 4 years ago

bbd-cucumber-gherkin-lib - Transitive dependencies for Cucumber

Published by Ragin-LundF about 4 years ago

This release adds transitive dependencies for:

  • 'org.apache.httpcomponents:httpclient'
  • 'org.glassfish:javax.json:1.1.4'
  • 'net.javacrumbs.json-unit:json-unit:2.18.1'
  • 'io.cucumber:cucumber-java:6.2.2'
  • 'io.cucumber:cucumber-spring:6.2.2'
  • 'io.cucumber:cucumber-junit:6.2.2'
  • 'javax.validation:validation-api:2.0.1.Final'
bbd-cucumber-gherkin-lib - Release 1.9.0: Correction of a sentence

Published by Ragin-LundF about 4 years ago

  • Correction of the sentence ^that the body of the response is$ to ^that the body of the request is$
bbd-cucumber-gherkin-lib - Adding more Dateformats

Published by Ragin-LundF over 4 years ago

More date formats added.

bbd-cucumber-gherkin-lib - Release 1.7.0

Published by Ragin-LundF over 4 years ago

  • wide range of REST operations support
  • basic database operation support
Package Rankings
Top 36.63% on Repo1.maven.org
Badges
Extracted from project README
Quality Gate Status
Related Projects