liveBook · Manning

Parameter type

A user-defined parameter type that matches text in a step and converts it into a value for step-handling code.

How 2 Manning books explain it

Effective Behavior-Driven Development

A user-defined parameter type that matches captured text and converts it into a value for a step definition.

How it is used
Connects business-readable scenario values to typed step-definition arguments without requiring conversion inside each step.
How deep it goes
Works through a pizza-size conversion and specifies Reqnroll registration, naming, regular expressions and capture groups; cautions against complicated matching.
Examples
Uses inch-based pizza sizes, color names and RGB values, and pronouns referring to an authenticated customer.
What you can do after
Apply it via Reqnroll to match domain-specific scenario wording and convert captured text into typed step arguments.

Read how Effective Behavior-Driven Development explains parameter type →

BDD in Action, Second Edition

A custom parameter type is a user-defined Cucumber parameter type that recognizes text in a step and converts it into a specified object or value.

How it is used
Makes Cucumber step expressions clearer and reusable by converting domain-specific text into typed values for step definitions.
How deep it goes
Explains regular-expression matching, permitted values, method naming, and conversion into domain objects.
Examples
Uses frequent-flyer statuses, ISO-formatted dates, actor names, and pronouns as converted step parameters.
What you can do after
Apply Cucumber parameter types to convert matched step text into frequent-flyer objects, dates, or Screenplay actors.

Read how BDD in Action, Second Edition explains parameter type →

What to know first

Related concepts

Questions about parameter type

What is parameter type?

A user-defined parameter type that matches text in a step and converts it into a value for step-handling code.

Which Manning books explain parameter type?

Effective Behavior-Driven Development and BDD in Action, Second Edition.

What should I know before learning parameter type?

Manning books that teach parameter type usually introduce cucumber expression first.

What is parameter type part of?

Parameter type is part of glue code. Glue code is integration code that connects otherwise separate software components, tools, or systems so they can work together.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.