Quick overview

Simple example

The example below illustrates the use of Substeps to test a web application, so for this particular case we would use the Webdriver-Substeps step defintitions.

An example Substeps definitions file

  • In the simple example above, you can see how steps within a scenario can be broken down into a series of Substeps
  • The feature and scenario remain descriptive, whilst the Substep definitions contain the details of how that particular step is implemented
  • Substep definitions can call each other, and other scenarios too

A complex example

A more elaborate example is illustrated below, again with a web application under test.

Additional step definition libraries and custom implementations can be used alongside to provide extra functionality.

Substep definitions can also call other substeps, not just step implementations.

Implementing bespoke step implementations is straight forward too, see here for more details