Create data subsets
A data set is a collection of test data that you've added to Tosca Cloud. These data sets can be quite expansive. If you want to provide your testers with smaller, more manageable data pools, you can create one or more subsets from your data set. This topic tells you how.
Create your subset
It's easy to create a new subset. Simply go to the Test data page and create a query that filters for the data you want in your subset.
You can choose different ways to create queries:
-
With the search bar. This is a good option if you're experienced with data queries or just need a quick, simple filter. The search bar offers dropdowns and auto-complete to help you craft your query, but you need an understanding of query syntax, especially for nesting groups.
To use the search bar, simply start typing your query. Select Filter view to see the results, and—if you're happy with them—select Save subset.
-
With the subset builder. This is a good option if you're newer to data queries or have complex, nested queries. Building a query is as simple as choosing options from dropdowns. For an easy overview, the subset builder visualizes filters, groups, and hierarchies in a tree structure.
To use the subset builder, select Build subset and define your query. Select Filter view to see the results, and—if you're happy with them—select Save subset. Alternatively, if you're confident in your query, you can skip the filter preview and select Save subset directly in the subset builder.
Understand queries
Test data queries consist of filters that define the criteria your data must meet. For example, "Value in column Country is Austria".
You can also create groups of filters. Within these groups, you use conditions to specify how the data should match the filters. For example, if you have three filters, does the data have to match all three filters or—at the very least—one of them?
Tosca Cloud supports the following conditions:
-
AND defines that data must match all filters in a group.
-
OR defines that data must match at least one filter in the group. This condition also returns data that matches multiple or all filters.
Filter syntax
To define a filter, use the following syntax:
<column header> <operator> "<expected value>"
The data type of your value determines which operators are available. For example, the operator < is only available for numeric fields.
If you use the subset builder, you don't need to enter quotation marks into the value field. Tosca Cloud adds them automatically.
Group syntax
How you define a group depends on where you create your query:
-
In the search bar, always start your group with a filter: <filter A> <condition> <filter B>. For example, [City] equals "Vienna" OR [City] equals "Salzburg".
You can also nest groups. To do so, add parentheses (). For example, [Country] equals "Austria" AND ([City] equals "Vienna" OR [City] equals "Salzburg").
-
In the subset builder, always start your group with a condition. Then, add your filters.
You can also nest groups. To do so, add a new group to the same level as the element where you want to nest it. This image shows what [Country] equals "Austria" AND ([City] equals "Vienna" OR [City] equals "Salzburg") looks like in the subset builder:
Click to enlarge: A group of City filters is nested in the Country filter
Examples
Let's take a look at a few examples for creating subsets. All examples are based on the following data set:
Example data set in Tosca Cloud

In this example, we want to create a subset that contains all contractors.
To get the subset, we create the following query:
-
In the search bar: [Employee type] equals "Contractor"
-
In the subset builder:
Example 1: Filter in the subset builder
Let's go through the tree in the subset builder:
-
The AND on level 1 defines that data must meet all filters. In this case, we have only one: Employee type must be Contractor.

In this example, we want to create a subset that contains all contractors in the Vienna or the Prague office. However, we're too lazy to type out "Vienna" and "Prague", so we're using the operator "begins with".
To get the subset, we create the following query:
-
In the search bar: [Employee type] equals "Contractor" AND ([Office] begins with "V" OR [Office] begins with "P")
-
In the subset builder:
Example 2: Filter in the subset builder
Let's go through the tree in the subset builder:
-
The AND on level 1 defines that data must meet all criteria we list. In this case, we have only one: Employee type must be Contractor.
-
The OR defines that only one of these additional criteria for Employee type must be true. In other words, we only want data where Employee type is Contractor and Office begins with either V or P.

In this example, we want to create a subset that contains all employees that are full-time or part-time. Additionally, the data should meet the following criteria:
-
We only want full-time employees in the Vienna and Prague offices.
-
We only want part-time employees that are permanent.
To get the subset, we create the following query:
-
In the search bar: ([Status] equals "Full-time" AND ([Office] equals "Vienna" OR [Office] equals "Prague")) OR ([Status] equals "Part-time" AND [Employee type] equals "Permanent")
-
In the subset builder:
Example 3: Filter in the subset builder
Let's go through the tree in the subset builder:
-
The OR on level 1 defines that data must meet the criteria for group 1 (full-time employees) or group 2 (part-time employees).
-
The AND for group 1 defines that we want data that meets both our Status and Office criteria. However, the OR defines that only one of these additional criteria for Status must be true. In other words, we only want data where Status is full-time and Office is either vienna or prague.
-
The AND for group 2 defines that we want data that meets both the Status and the Employee type criteria. In other words, we only want data where Status is part-time and Employee type is permanent.
Edit subsets
You can edit subsets in the same way that you can edit data sets. Note that Tosca Cloud applies all changes you make to the subset also to its parent data set. For example, if you delete a row from your subset, Tosca Cloud also deletes the row from the data set.
Additionally, you can add a short description of your subset in the subset's details view. To open the details view, hover over the subset name and select Edit details from thedropdown menu.
What's next
If your test data is good to go, link it to your test cases.