About Article:
The article will describe how to execute a clean up journey in Virtuoso.
Problem Statement:
Some use cases might need execution of test steps to perform test data clean up on the application after the test case execution.
Solution:
If a user wants to perform some clean up activity on the Application Under Test, after executing a test case to clean the test data used (when the test execution fails or after every execution), a new journey can be created that would contain all the test steps to perform the test data clean up.
Since this journey needs to be executed only after the primary test case (journey) has executed we need to use Flows to configure this.
Steps:
- Create the new journey that contains the test steps required to perform the necessary clean up.
- Create a flow and apply the necessary conditions to execute the clean up journey after the successful or failed execution of a journey/goal/job.
An e.g. of the flow condition can look like this:
Use case 1: Single clean up journey to be executed after test execution
If the journey selected under the ‘IF’ condition is failed then the clean up journey will get triggered and that will get executed to clean the data from Application.
Use case 2: Multiple clean up journeys to be executed after test execution
If you have multiple clean up journeys, they can be stored together in a goal or an execution plan can be created to execute multiple clean up journeys together.
If the journey under the ‘IF’ condition is failed then immediately the planner under the ‘Action’ will get triggered and get executed and in the meanwhile the cleanup journeys will also get executed as those are in the planner.
Note: Use different variable names for each cleanup journey. Using the same variable names across different journeys can cause problems when passing variables between them.
More details about Flows can be found below:
A flow has two main sections:
- IF: controls the conditions to trigger the flow;
- THEN: specifies what actions should be performed if all conditions are met.
Flow enables us to build any combination of conditions and actions. Here is an overview of the type of conditions and actions we can set.
Conditions
-
Journey executed, with various filters such as:
- Journey name, number, or canonical id (depending on the scenario, you may find it easier to rely on journey numbers)
- Goal name,
- Journey tag,
- Execution outcome,
- Duration of execution,
- Data value in the execution.
-
Extension created or updated, with filters:
- Project name,
- Extension name.
-
Plan execution finished, with the following filters:
- Project name,
- Goal name,
- Plan name,
- Retry if failed (only for scheduled plans with retry if journey fails enabled).
Note: when setting conditions, all filters set must apply.
For example, when you set a journey name filter and goal name filter, both the journey and goal names must match.
Actions
- Execute a journey
- Execute a goal
- Execute a plan
- Wait for a short period (up to 15 seconds)
- Send a slack message
- Commit extension to github (can be only combined with extension created)
- Trigger a webhook URL
- Set some data to context (to be used in conjunctions with other actions, such as executing a journey, where you want to pass a specific data to the corresponding execution)
When testing applications, how the flow works in different scenarios. For example:
- Multi-system scenarios: After raising an order in application A, ensure that the order has been raised in the internal billing system in application B.
- Cross-dependency between journeys and goals: When journey A passes, run all tests in goal Y.
- Conditional behaviour: If journey X passes, then execute journey Y; if it fails, trigger journey Z.
Integration with third parties: When a certain condition occurs, notify me on slack, with this message.
Comments
0 comments
Please sign in to leave a comment.