Blank Template Scenarios are designed to allow you to test a group of services in sequence. The Output from one service can also be linked to the input of the next service.
To start, click on “Scenarios” from the navigation pane. Click on “+ New Scenario”. This displays the following modal.
Complete the Modal leaving the “Scenario Template” as blank and click on “Create”. This will bring up a blank Scenario Canvas as shown below.
To begin, click on either the “New Step(s)” or “+ New Step” to start defining your scenario. This brings up a modal similar to that shown in the Create New Test Script functionality. An example is shown below.
Select the Services that you wish to add to the Scenario and click on the “Add Step(s)” button.
The Scenario Canvas will now be populated with the selected services. In the example below, just two services have been selected.
Use the Up and Down buttons to promote and demote the highlighted step. NOTE: The Up button is deactivated on the first step and the down button is deactivated on the last step.
To remove a service, highlight the step and click on the Trash Can icon. An alert will displayed asking you to confirm the action.
Configure the Services
Services are configured in a similar way to the Test Scripts. The main exception is that, as Scenarios run in sequence, you can use the output of one service as the input for another.
In the example below, there are two steps. The first step, Calculator 001 has three Inputs and one Assert as follows:
- Left Decimal = 1 (one)
- Operator = + (plus)
- Right Decimal = 1 (one)
- Result == 4
The second Step, Calculator 002 also has three Inputs and one assert. The difference here is that the Output from Calculator 001 is used as one of the Inputs.
All available outputs from previous steps are shown on the left.
To use the output, drag it and drop it to the field for which you want to use it for as shown below.
For the rest, configuring a Service in a Scenario is the same as configuring a service on a Test Case.
Running a Scenario
To run a scenario, click on the “Run scenario button”. An alert will be displayed stating that the scenario will be saved and requesting confirmation. The Scenario will then run in the background.
To see the Results, click on the Results Tab.
NOTE: The Results Tab only shows Services where there are Inputs & Outputs required. If the service has no Inputs or Outputs, then the Service will not show in the Results list.