- Print
- DarkLight
Sometimes steps become invalid when creating or editing scenarios.
This document will explain:
- How the UI warns about invalid steps
- How invalid steps can be created
- What happens when you try to save a scenario with invalid steps
- What happens when you try to run a scenario with invalid steps
UI warnings for invalid steps
Steps that are invalid are highlighted in the scenario editor UI in a few places.
At the time of creating the step
When creating a new step, in an unsaved scenario, a warning will be displayed only within the step itself.
Even if the step contains invalid details, no external warnings will be displayed.
Be careful — if you click “Save”, the scenario will save and the UI will not show any warnings or alerts.
However, upon page reload or re-visit, additional warnings will be displayed in two places:
- At the top of the scenario editing pane
- On the step itself
Invalid step alert at the top of the scenario editing pane
An alert banner will appear at the top of the page with a list of invalid steps.
Clicking on the step name will open the invalid step.
Invalid step alert on the step itself
Invalid steps will be bordered in red and flagged as invalid. Click the invalid step to fix any issues.
The video below shows a full example of saving a scenario with invalid steps and reloading the page to show the warnings in the UI.
Step groups have the same behavior.
A scenario using a step group containing invalid steps will also behave similarly.
Test plans will not show any warnings about scenarios containing invalid steps.
Invalid steps caused by user input
Steps that require user input can become invalid if the wrong data is entered.
Invalid steps caused by deleted reference
Steps can also become invalid due to deleted references.
The following are some examples of references that will cause steps to become invalid:
- Reference to a deleted JS step
- Reference to a deleted “Open Window” step
- Reference to a deleted data table
Reference to a deleted JS step
When a JS step that is referenced by other steps is deleted, an error will be displayed on the steps that reference this JS step.
Reference to a deleted “Open Window” step
When an “Open Window” step that is referenced by other steps is deleted, an error will be displayed on the steps that reference the now-deleted “Open Window” step. The step will refer to “Unknown Window”.
Deleted data table reference
When a step uses data that has been uploaded via the “Data” tab, that step will become invalid if the data is deleted.
Invalid steps can be saved
In some situations you may not be ready to complete your scenario and want to keep the invalid step. In this instance, you can save the invalid steps and continue working on your scenario at a later time.
We strongly recommend that you only save your scenario when all steps are in a valid state. Otherwise, you might encounter unexpected passing or failing steps during test execution.
Saving a scenario or step group that has not been marked as invalid
When saving a scenario that doesn’t display an alert banner or has red borders around invalid steps, you will not see any error message or warning when saving.
Saving a scenario or step group that has been marked as invalid
When saving a scenario that displays an alert banner and has red borders around invalid steps, you will see an alert when saving. You can still save the scenario by clicking “OK” on the alert.
Invalid steps can be run
Even if your scenario contains invalid steps, it can still be run.
We strongly recommend that you only save and run your scenarios when all steps are in a valid state. Otherwise, you might encounter unexpected passing or failing steps during test execution.
Running from the scenario editor page
Running a scenario containing invalid steps will not show any additional alert.
Running from the test plan page
Running a test plan containing scenarios with invalid steps will not show any warnings.
Unexpected behavior when running scenarios with invalid steps
If you are experiencing unexpected failing or passing steps during test execution, make sure to check your scenarios for any invalid steps and fix them before continuing.
For example, this scenario passes even though 2-1 is an invalid step.