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 visible (Hide)

bbd-cucumber-gherkin-lib - Release 1.52.0

Published by Ragin-LundF over 1 year ago

Update Libraries

  • Cucumber updated to 7.11.2
  • Spring Boot updated to 2.7.10
  • Liquibase updated to 4.20.0
  • Snakeyaml updated to 2.0
bbd-cucumber-gherkin-lib - Release 1.51.0

Published by Ragin-LundF over 1 year ago

Update Libraries

  • Cucumber updated to 7.11.1
  • Spring Boot updated to 2.7.8
  • Liquibase updated to 4.19.0
bbd-cucumber-gherkin-lib - Release 1.50.0

Published by Ragin-LundF almost 2 years ago

Update Libraries

  • Cucumber updated to 7.9.0
  • Spring Boot updated to 2.7.5
  • Liquibase updated to 4.17.2
bbd-cucumber-gherkin-lib - Release 1.49.0

Published by Ragin-LundF about 2 years ago

Update Libraries

  • Cucumber updated to 7.5.0
  • Spring Boot updated to 2.7.2
  • Liquibase updated to 4.14.0

Fixes

The sentence I store the string of the field "{string}" in the context "{string}" for later usage is now able to store any kind of objects and not only strings.

bbd-cucumber-gherkin-lib - Release 1.48.0

Published by Ragin-LundF over 2 years ago

Updated Libraries

  • Cucumber updated to 7.3.4
  • Liquibase updated to 4.10.0 (CVE-fix)
  • JSON-Unit to 2.35.0
bbd-cucumber-gherkin-lib - Release 1.46.0

Published by Ragin-LundF over 2 years ago

Updated Libraries

  • Spring Boot updated to 2.6.7
  • Cucumber updated to 7.3.2

Feature: Simple form-data POST request

It is now possible to create a simple form-data POST request.
A file can also be attached in the process.

To add the file there is the sentence:

Scenario: Post form data
    Given that the file "test.txt" is stored as "FORM_FILE"

The file is placed as a byte array in a separate context, which is emptied again after the scenario is completed for memory reasons.

To execute a form-data request the following sentences are available:

When executing a form-data POST call to "/your/api" with the fields
    | text-form-data-key  | text-form-data-value      |
When executing an authorized form-data POST call to "/your/api" with the fields
    | text-form-data-key  | text-form-data-value      |

The fields are written as key/value datamap.

Examples can be found at src/test/resources/features/form_data/.

bbd-cucumber-gherkin-lib - Release 1.45.0

Published by Ragin-LundF over 2 years ago

Update Spring Boot to 2.6.6 (Spring Shell)

bbd-cucumber-gherkin-lib - Release 1.44.0

Published by Ragin-LundF over 2 years ago

  • Disable redirects for HTTP client.
bbd-cucumber-gherkin-lib - Release 1.43.0

Published by Ragin-LundF over 2 years ago

Release 1.43.0

Updating dependencies

  • Spring Boot 2.6.4
bbd-cucumber-gherkin-lib - Release 1.42.0

Published by Ragin-LundF almost 3 years ago

An issue was fixed, which prevented overwriting the Accept-Language, Content-Type, and Accept headers.

bbd-cucumber-gherkin-lib - Release 1.41.0

Published by Ragin-LundF almost 3 years ago

Updated libraries

  • Spring Boot updated to 2.6.2
  • Cucumber updated to 7.2.2

Extended Polling

Polling now allows also to check for the HTTP code only.

Unauthorized Example

Scenario: Polling unauthorized until response code is correct with long config
  Given that a requests polls every 1 seconds
  And that a requests polls for 5 times
  And that the API path is "/api/v1/polling"
  When executing a GET poll request until the response code is 200

Authorized Example

Scenario: Polling authorized until response code is correct with short config
  Given that a request polls every 1 seconds for 5 times
  And that the API path is "/api/v1/pollingAuth"
  When executing an authorized GET poll request until the response code is 200

Examples can be found at src/test/resources/features/polling/.

Extended Header Manipulation

Prefix for Header manipulation

Scenario: Add custom header with prefix
  Given I set the header "X-My-Custom-Header" to "ABC_DEF" prefixed by "PRE_"

This sets the header X-My-Custom-Header to the value of ABC_DEF with the prefix PRE_.
The prefix and the value can be also a variable name from the context.

Please have a look to the examples at: src/test/resources/features/header/

bbd-cucumber-gherkin-lib - Release 1.40.0

Published by Ragin-LundF almost 3 years ago

Updated libraries

  • Spring Boot updated to 2.6.1
  • Cucumber updated to 7.1.0
bbd-cucumber-gherkin-lib - Release 1.39.0

Published by Ragin-LundF almost 3 years ago

Updated libraries

  • Spring Boot updated to 2.5.6 because of a memory leak in tomcat
  • Cucumber updated to 7.0.0

Enhancements

Added check for headers

If it is required to check if a HTTP header contains a special value, this can be done with the following sentence:

And I ensure, that the header "<header name>" is equal to "<header values>"

Be aware, that headers are always an array.
If there are more header values you want to check, please add them comma separated.

Example:

Scenario: Check a header
  When executing an authorized GET call to "/api/v1/header"
  Then I ensure that the status code of the response is 200
  And I ensure, that the header "X-TEST-HEADER" is equal to "present"

This might be used to check if XSS headers are set for example.

See src/test/resources/features/header/header.feature

bbd-cucumber-gherkin-lib - Release 1.37.0

Published by Ragin-LundF about 3 years ago

Updated libraries

  • Spring Boot updated to 2.5.5
  • Cucumber-JVM updated to 6.11.0
bbd-cucumber-gherkin-lib - Release 1.36.0

Published by Ragin-LundF over 3 years ago

Updated libraries

  • Spring updated to 2.5.2
    • With the Spring update Liquibase will also be updated to 4.3.5
  • Cucumber-JVM updated to 6.10.4
  • JSON-Unit updated to 2.27.0

Small enhancements

A user token can be resolved also from a context map. If nothing was found there, it uses the given one.
This refers to the following sentences:

  • that the following users and tokens are existing
  • that the user is {string}

In general the ScenarioStateContext class has now a new method called resolveEntry(key: String).
This method tries to read the value from the context map for the given key.
If the key was not found, it returns the key itself.
This may be helpful for own sentences based on the context map.

Possibility to wait

There is a new sentence that allows you to wait sometime before proceeding:

  Scenario: Wait for something
    Then I wait for 1000 ms

Examples at:
src/test/resources/features/performance/performance.feature

bbd-cucumber-gherkin-lib - Release 1.35.0 - Date utils

Published by Ragin-LundF over 3 years ago

Introduction of date util sentences and extended date validators.

This version introduces some Given sentences to create a date in the past or future.
In addition, there is a new matcher that allows comparing this date with a JSON date or a datetime.

Read more at:
docs/date_operations.md.

Examples at:
src/test/resources/features/date_operations/date_operations.feature

bbd-cucumber-gherkin-lib - Release 1.34.1

Published by Ragin-LundF over 3 years ago

An issue with the new configuration was fixed.

The introduction of the BddProperties class made some problems with not configured properties.

Please ensure also, that you've put the library on the configuration scan path:

@ConfigurationPropertiesScan({
        "com.ragin.bdd", "configuration.com.ragin.bdd"
})
bbd-cucumber-gherkin-lib - Release 1.34.0 - Maven Central and Spring Update

Published by Ragin-LundF over 3 years ago

Updates

This release updates the Spring dependency to 2.4.5.

It is recommended to update the project also to this version.

New groupId and Maven Central deployment

Because of the deprecation of jcenter, the artifacts are now published on Maven Central.

To be able to do that, the groupId has to be changed to:

Maven

<dependency>
	<groupId>io.github.ragin-lundf</groupId>
	<artifactId>bdd-cucumber-gherkin-lib</artifactId>
	<version>${version.bdd-cucumber-gherkin-lib}</version>
	<scope>test</scope>
</dependency>

Gradle

dependencies {
    testImplementation "io.github.ragin-lundf:bdd-cucumber-gherkin-lib:${version.bdd-cucumber-gherkin-lib}"
}
bbd-cucumber-gherkin-lib - Release 1.33.0

Published by Ragin-LundF over 3 years ago

Re-Release of 1.32.0

This is a re-release of 1.32.0, because of some issues with jcenter.

bbd-cucumber-gherkin-lib - Release 1.32.0 - Support for predefined context variables

Published by Ragin-LundF over 3 years ago

Support for predefined ScenarioContext values

In order to predefine some global ScenarioContext values outside the gherkin definition,
it is now possible to add them to the application.yaml/application.properties file.

The key cucumberTests.scenario-context allows to define a set of key/value pairs for the ScenarioContext map:

application.yaml

cucumberTests:
  scenario-context:
    CTX_PRE_DEFINED_USER: Pre Defined
    CTX_PRE_DEFINED_FIRST_ID: abcdefg

application.properties

cucumberTests.scenario-context.CTX_PRE_DEFINED_USER=Pre Defined
cucumberTests.scenario-context.CTX_PRE_DEFINED_FIRST_ID=abcdefg

If many tests require the same data over and over again,
it doesn't make sense to copy and maintain it in every feature.

By defining it in the application file, it can be defined once and used everywhere.

For an example, please have a look at:

Package Rankings
Top 36.63% on Repo1.maven.org
Badges
Extracted from project README
Quality Gate Status
Related Projects