Define paths
A business flow maps out various activities that users can perform in your application. Paths are a crucial element of business flows. They define specific user journeys through these activities, and you'll use them to automatically generate test cases. This speeds up test authoring and ensures full test coverage.
In this topic, you'll learn how to create and view paths, and how to generate test cases out of them.
Before you start
To create paths and generate test cases, you need to have the following:
-
A business flow with defined activities. This means that each activity in your business flow is linked to a reusable test step and—if the activity needs test data—to a data set. For detailed information, check out Define activities.
-
An Administrator or Contributor role. Users with Viewer roles can look but not touch.
Create a path
To create a path through your business flow, follow these steps:
-
In your business flow, turn on the Path mode toggle. This opens the path view.
-
Add an activity to your path. How to do this depends on the activity type and your use case:
Use case |
How to add the activity |
---|---|
Activity without data. |
Select Select activity. |
Activity with data. Resulting test case should use the linked data set. |
Select Any values. |
Activity with data. Resulting test case should use a subset of the linked data set. |
Select the respective checkbox under Subsets. |
-
Keep adding activities until your path is complete. Note that your path must form a continuous line from Start node to End node. The activities you select must connect these nodes without any breaks.
-
Save your path.
View paths
To see a list of all paths through your business flow, select Paths in the top left corner of the business flow.
The Paths pane also displays the number of rows in the smallest data source that's part of your path. For example, if your path uses 8 subsets and the smallest subset has 20 rows, the pane indicates 20 values for this path. This lets you know how many times you can run the resulting test case on fresh data.
To see a specific path directly in your business flow, double-click the path in the Paths pane.
Generate test cases
To generate test cases, select Publish.
Tosca Cloud generates one test case out of each path in your business flow. You can find these test cases on the Test cases page.
We strongly recommend that you don't edit generated test cases, or add things to them. Why?
-
You're adding manual tasks to what should be a fully automated process.
-
You're adding instability to your tests. If you change your business flow and republish the path, Tosca Cloud overwrites the existing test case. This means you will lose your edits.
If your test cases do need fine-tuning, adapt your business flow. For example, add activities, or modify your reusable test steps.
What's next
You've just created test cases out of your paths. Now, do trial runs of your test cases. This helps you find and fix issues, so you can make your tests as stable and reliable as possible.
Once you're happy with your test cases, pack them into a playlist, so you can run your tests in earnest.