Cucumber library for simpler e2e tests with predefined sentences for API and basic database access for Spring.
MIT License
Published by Ragin-LundF about 2 months ago
The configuration
cucumberTest:
authorization:
...
is no longer required.
It must be set, if a default token can be used. Else the token must be provided via Background
or inside of the Scenario
.
Published by Ragin-LundF 2 months ago
Published by Ragin-LundF 3 months ago
Fixed issues with BOM's.
It was not possible to resolve the transitive dependencies.
Published by Ragin-LundF 3 months ago
jacoco
with kover
cucumber
Detekt
for static code analysisPublished by Ragin-LundF 3 months ago
jacoco
with kover
cucumber
Detekt
for static code analysisPublished by Ragin-LundF 5 months ago
Added a new default matcher (${json-unit.matches:isNotEqualTo}string
) to compare, that a value is not equal to a given string.
The string can be anything after the closing bracket:
{ "string": "${json-unit.matches:isNotEqualTo}another string" }
Scenario: Validate field with a string that it is not the value
When executing a GET call to "/api/v1/fieldValidation"
Then I ensure that the status code of the response is 200
And I ensure that the body of the response is equal to
"""
{
"string": "${json-unit.matches:isNotEqualTo}another string",
"number": 12,
"boolean": true,
"list": [
"First",
"Second"
],
"object": {
"firstname": "John",
"lastname": "Doe"
},
"uuid": "${json-unit.matches:isValidUUID}",
"objectList": [
{
"first": 1,
"second": 2
},
{
"first": 3,
"second": 4
}
]
}
"""
See src/test/resources/features/body_validation/field_compare.feature
Published by Ragin-LundF 7 months ago
Published by Ragin-LundF 8 months ago
Accept-Language
default header.Published by Ragin-LundF 8 months ago
Published by Ragin-LundF 11 months ago
Published by Ragin-LundF about 1 year ago
Added a new default matcher (${json-unit.matches:isNotEqualToScenarioContext}MY_CONTEXT_VALUE
) to compare, that a value is not equal to the context:
And I ensure that the body of the response is equal to
"""
{
"value": "${json-unit.matches:isNotEqualToScenarioContext}MY_CONTEXT_VALUE",
}
"""
Published by Ragin-LundF about 1 year ago
Small fix for URL encoded calls, to be able to leave a value empty if the parameters are dynamic.
Published by Ragin-LundF about 1 year ago
New sentence added for application/x-www-form-urlencoded
POST
calls.
When executing a url-encoded POST call to "/api/form-encoded" with the fields
| Key | Value |
| first | myFirstValue |
| second | mySecondValue |
The first line of the fields MUST contain | Key | Value |
.
Published by Ragin-LundF about 1 year ago
In some cases, a @PostConstruct
annotation was not executed in the correct order.
This has now been taken care of by moving the logic it contains to a constructor.
Published by Ragin-LundF about 1 year ago
http(s)://
Published by Ragin-LundF about 1 year ago
Now all executing
sentences log the request and response as scenario text in the report.
This makes problems in tests more visible on CI/CD scenarios.
Example:
When executing a GET call to "/api/v1/unauthorized"
Request:
========
HTTP Method: GET
HTTP URL : /api/v1/unauthorized
Response:
========
Status Code: 401 UNAUTHORIZED
Body : {"error_description":"Full authentication is required to access this resource","error":"unauthorized"}
Published by Ragin-LundF about 1 year ago
Given that the request body in the scenario context map has been reset
This sentence resets the body if a scenario uses 2 requests and the second should be empty.
Published by Ragin-LundF about 1 year ago
Added logging that logs every HTTP method and URL.
This can make troubleshooting much easier, especially with dynamic URLs.
Published by Ragin-LundF about 1 year ago
${json-unit.matches:isValidIBAN}
.Published by Ragin-LundF over 1 year ago
This release requires Java 17 and Spring Boot 3.
It uses also the jakarta.*
packages instead of the javax.*
packages.