Passing true null values from Gherkin

By default Gherkin is not able to pass an actual null value from a feature file to a step definition. The following sample allows you to do more than just that. Passing a null value Supports inverse test cases: what if a value is not provided. (At all, not even as an empty string) Passing … Read more

Version Based Scenario Filtering

The idea is to filter scenario execution based on the version of the software under test (SUT) using something like @version(v>= 1.0 && v<=2.1.1). Unfortunately the current Gherkin parser & highlighting of IntelliJ’s IDEA doesn’t support the use of spaces between the parantheses, not even for string literals: Not using spaces fixes the problem for … Read more

Dynamically Skipping Scenario

You cannot dynamically skip test scenarios using the oft suggested raising an AssumptionViolatedException or using Assume.assumeTrue(false). This still results in a failed build, exiting with code 1, which makes it unfit for use in a CI/CD pipeline. What does work however, is using Assumptions.assumeTrue(false); Source. For example: Additional remarks: Of course, you can achieve the … Read more