Purpose of the scenario testing framework

The scenario library is a framework for writing and executing full campaigns of tests, with human-readable documentation.

A scenario test case is a sequence of steps, executed one after the others, defining a story by the way.

One of the main interests of scenario is its ability to reuse test code:

  • Step objects: Instanciate steps one after the others, just like bricks, and quickly write different versions of a story (like a nominal test scenario, then alternative scenarios).

  • Subscenarios: Reuse existing test cases as subscenario utils, a fair way to set up initial conditions for instance.

Another strength of the scenario framework is its documentation facilities:

  • Tie the test documentation (actions, expected results) right next to the related test code (see quickstart for an overview). By the way, the code is more understandable, and the whole easier to maintain.

  • Easily collect test evidence, just by using the assertion API provided.

  • Use execution reports to generate deliverable documentation in the end.

scenario also comes with a set of high quality features, making tests easier to write and maintain: