Define activities
A business flow defines activities and paths through your application. You'll use those paths to automatically generate test cases, which speeds up test authoring and reduces maintenance.
Activities are your business flow's starting point. They specify what users can do in your application and how these actions connect. This topic guides you through all activity-related tasks: mapping them out, preparing the necessary artifacts, and then linking everything together, so you can define what exactly happens in your activities.
Before you start
To define activities, you need to have the following:
-
An Administrator or Contributor role. Users with Viewer roles can look but not touch.
Also, if you're not familiar with them already, we recommend that you check out key concepts and best practices of business flows.
Map out activities
Your first step is to map out the tasks users can do in your application and how they're connected. To do so, add activities to your business flow.
Understand activity types
To create meaningful, end-to-end scenarios, you'll use different types of activities:
-
Activities with data, which are activities that use your test data at runtime. For example, entering customer information into a form or verifying information. Don't worry, you can also have non-data elements in activities with data. For example, if you want to enter customer information into a form and then select a button.
-
Activities without data, which are activities that don't require any test data at all. This type of activity typically covers navigating or preparing the application. For example, opening the application, clicking through menus, or setting up the environment for the data-driven parts of the business flow.
Add activities
To add activities to your business flow, follow these steps:
-
Choose the right activity:
-
To add an activity with test data, select
Add activity.
-
To add an activity without test data, select
Add activity without data.
-
-
Give each activity a unique name. We also recommend that you add a brief description, to keep a good overview while you're mapping out the flow.
-
Define how your activities connect. To do so, create arrows between the activities' circle elements.
Note that Tosca Cloud doesn't support loops, where you connect an activity to an earlier activity to restart a particular sequence.
-
Once you have all the activities you need, add the End node and connect your business flow to it.
Click to enlarge: Example business flow with activities
Prepare the necessary artifacts
You've mapped out your activities. So far, so good! Now, you need to prepare your artifacts. You will later link those artifacts to your activities, to define what exactly happens in your activities.
These are the artifacts you need to prepare:
-
Create test data in Tosca Cloud. You'll link each activity with data to a data set in Tosca Cloud. This defines which test data you want to use for this activity.
-
Create reusable test steps. You'll link each activity—no matter which type—to one reusable test step. This defines the actual test actions for an activity.

We strongly recommend that you create subsets of your data sets. This allows you to create multiple paths from the same activities. A path is a sequence of activities that represents a user journey through your application. Ultimately, you'll generate a test case out of each path.
Let's say you have three activities: open application, enter vehicle data, close application. And you have one large data set that contains different brands of vehicles, with multiple models per brand.
If you only use the main data set, you can essentially only create one path from your activities:
-
Open application, enter vehicle data (use data set), close application.
This means you can only generate one test case out of the activities.
Instead, we recommend that you split your vehicle data set into subsets: one for Mercedes models, one for Ford, one for Alfa Romeo, and so on. This allows you to create multiple paths from your activities:
-
Path 1: open application, enter vehicle data (use Mercedes subset), close application.
-
Path 2: open application, enter vehicle data (use Ford subset), close application.
-
Path 3: open application, enter vehicle data (use Alfa Romeo subset), close application.
-
And so on.
Since you generate one test case per path, this means you can now generate multiple test cases out of the same three activities.

When you create your reusable test steps, keep the following things in mind:
-
For activities with data, the reusable test step must have business parameters: one business parameter for each element that requires test data. You'll later use these business parameters to specify which column in your data source has the data you want to use.
-
For activities without data, the reusable test step must not have business parameters.
Not quite sure how reusable test steps, business parameters, and test data go together? Check out this example.
Define what happens in activities
Once you've mapped out your business flow and prepared your artifacts, you're ready to define what happens in each activity:
-
For activities with data, specify the test data you want to use in your activity. To do so, select Link data and perform the following actions:
-
Select a data set from the dropdown. Don't worry about subsets at this stage—you'll choose a subset when you define your paths.
-
Select Save.
-
-
To specify the test actions of an activity, select Link reusable test step. Then, perform the following actions:
-
Select a reusable test step from the dropdown.
-
For activities with data, fill out the Business parameters section. In each row, select the test data column that contains the data you want to use here.
-
Select Save.
-
Example
In this example, you want to specify what happens in an activity with data called Register customer.
Empty activity called Register customer
With this activity, you want to enter customer data into the following screen in your application:
Controls on the registration screen
You've already scanned your application and created a module called Registration screen. This module covers the following controls:
-
The textboxes called First name, Last name, and Email.
-
The combobox called Visitor type.
-
The button called Register.
Module for the registration screen with all controls
You also have a data set called My data set. In this data set, various columns contain the necessary data for the registration screen:
Example data set
At runtime, Tosca Cloud should enter the data from My data set into all textboxes and the combobox. Then, select the Register button.
To make this possible, you perform these steps:
-
Define which data you want to use in this activity. To do so, you select Link data and then specify that you want to use My data set
This adds the data set to the activity.
Activity Register customer is linked to the data set My data set
-
Create a reusable test step with the module Registration screen. This reusable test step contains the following:
-
Business parameters for all controls that require test data. You call them FirstName, LastName, Email, and VisitorType.
-
References to these business parameters.
-
A click operation for the Register button.
-
Reusable test step with business parameters and references
-
Link the reusable test step to your activity. To do so, you select Link reusable test step and choose your reusable test step.
When you fill out the Business parameters section, you define which column in My data set has the data you want to use for a particular control.
Linking a reusable test step to an activity with data
And that's it! You now have an activity that contains test actions and specifies the test data for these actions.
Activity with linked test data and reusable test step
What's next
You have a business flow that defines the activities in your application. Excellent! Time to define possible paths through your business flow, which you'll use to generate test cases.