Announcing Cucumber-JVM v4.2.0

We've released Cucumber-JVM v4.2.0! There have been several smaller releases since the announcement of v4.0.0, but this one is worth some extra attention. As always, the full changelog can be found in the repository.

Anonymous Parameter Types

In Cucumber-JVM 2.x, it was possible to capture any string and have it converted to a type instance. With the release of Cucumber Expressions in Cucumber 3.0, we removed XStream, which also removed the ability to keep that behavior. We're happy to announce that this behavior is back! By installing an object mapper (Jackson in this example) the following step definitions are usable:

Implicit Anonymous Parameter Types

When matching a step to a Cucumber expression, Cucumber inspects the parameter types of the step definition method and replaces the identity transform s -> s with s -> transform(s, type).

Additionally, when using a regular expression with a capture group that does not have a predefined parameter type, a new anonymous parameter type will be created for that capture group. As such the following step definitions are also usable: