Starting with version 3.14, step includes a JUnit runner that can be used to seamlessly integrate
step plans into JUnit tests.
Here is an example of what the output of using this feature may look like.
The sections below refer to the structure and files shown in this screenshot.
Note that the code examples are intentionally as short and specific as possible,
as they are only meant to showcase the syntax and usage.
Notice how (1) we are using the @RunWith(Step.class) annotation on the class to define the JUnit
runner used for executing the entire Test class, and
(2) how the actual plan to be executed is declared in the @Plan annotation of the test method.
Selective inclusion of plans, and parameterization
While inlining plan definitions as shown above is a quick and easy way to run plans as JUnit test cases,
it is really only suitable for very short definitions.
Therefore, the step JUnit runner features a mechanism to automatically create test cases when the following
conditions are met:
The plan is defined in the @Plans annotations
The plan definitions are located in the resources subdirectory matching the package of the JUnit test.
The test class below shows how to include specific (external) plans, and how to define execution parameters: