Data driven Test Cases enable you to use different data in different calls using a single Test Case. A common use of data driven Test Cases is to input unique account numbers and PINs for the same call type.
Introduction to Data Driven Test Cases Video
The video below provides an introduction to Data Driven Test Cases and how they can assist your testing scenarios.
Steps in Creating a Data Driven Test Case
Data driven fields can be injected into a Test Case either from a static file uploaded against a Test Case, by manually creating scenarios from the Test Case page, or by calling out to an external service.
For the static file:
- Create one or more
parameter(s) in a Test Case to be data driven. To do so, enclose the parameter
name to be data driven in brackets. For example,
[AccountNumber]
- Create a Comma-separated Value (CSV) file with the parameter name(s) as the column heading(s) and each data set in a separate row
- Upload the file into the
Test Case
An alternate approach for injecting dynamic data into a Test Case is to use the data driven service option. Here, an external web service is called at runtime that generates the test data for use by the Test Case
- Encode your Test Case fields in the exact same way as you would for the static file version above
- Create a web service that returns the data in one of the supported formats or use Cyara's SQL data driven feed service
- Click preview to view a sample from your web service.
Data Driven Fields by Channel
Below is a list of fields from a Test Case and Test Steps that are common across all Channels for data driven:
Test Case
- Description
Test Step
- Expect
- Reply
- MinorThreshold
- MajorThreshold
- MinPause
- MaxPause
Data Driven Fields for Voice
Below is a list of fields from a Voice Test Case and Test Steps that are available for data driven.
- Test Description
- Called Number
- Pre Connect Audio
- Expect to Hear
- Reply With
- Post Speech Silence Timeout (PSST)
- Min Pause Time
- Max Pause Time
- Minor Threshold
- Major Threshold
- Voice Quality
- Reply Type
- Major Confidence Level
- Minor Confidence Level
The textual fields from above can all take advantage of data driven if you simply use
your own naming convention enclosed in brackets. For example, to replace the Pre
Connect Audio you could use [pca]
or [preconn]
,
and so on. As long as the name exactly matches the one from the data driven feed,
the values will be replaced at runtime.
Fields that don't accept text input need to be encoded in a special way. The field name from your data driven feed needs to be formatted as below:
Cyara.[name].[step]
For example: Cyara.ReplyType.1
- Cyara.Psst
- Cyara.MinPauseTime
- Cyara.MaxPauseTime
- Cyara.MinorThreshold
- Cyara.MajorThreshold
- Cyara.MinConfLevel – [deprecated].
If used, its data drives both Minor and Major Confidence Levels with the
same value. If this is present, then the
Cyara.MinorConfLevel
andCyara.MajorConfLevel
should not be present - Cyara.ReplyType
- Cyara.ExpectedVoiceQuality
- Cyara.MinorConfLevel – data drives
the Minor Confidence Level. If present, then the
Cyara.MajorConfLevel
must be present too. TheCyara.MinConfLevel
should not be used - Cyara.MajorConfLevel – data drives
the Major Confidence Level. If present, then the
Cyara.MinorConfLevel
must be present too. TheCyara.MinConfLevel
should not be used
Cyara.ReplyType and Cyara.ExpectedVoiceQuality have special rules:
- ExpectedVoiceQuality cannot be used on Step 0
- ExpectedVoiceQuality must be one of: MPSR, PESQ
- ReplyType cannot be used on Step 0, except if it is an Outbound Test Case
- Allowed values for Reply Type on Step
0/outbound are:
- Answer
- Reject
- Busy
- DoNotAnswer
- Allowed values for ReplyType on all
other Steps are:
- AudioFile
- DTMF
- Speech
Data Driven Fields for Web
- Url
- ProxyAddress
- ProxyUsername
- ProxyPassword
- ExpectTimeout
- ReplyTimeout
Data Driven Fields for Email
Test Step
- To
- From
- Subject
- Body
- Minor/Major Threshold
- Timeout
Fields that don't accept text input need to be encoded in a special way. The field name from your data driven feed needs to be formatted as below:
- Cyara.fromemailaccount.0
- Cyara.majorthreshold.0
- Cyara.minorthreshold.0
- Cyara.timeout.0
- Cyara.majorthreshold.1
- Cyara.minorthreshold.1
- Cyara.timeout.1
Data Driven Fields for SMS
- Mobile
- Mobile
Data Driven Test Case Walkthrough Video
Watch the video below for a walkthrough of Data Driven Test Cases and how they can be applied in your testing scenarios.
Example Data Driven Test Case
Expect to Hear | Reply With | Reply Type |
---|---|---|
Welcome to share trader. | ||
What’s your account number | 760002# | DTMF |
Thanks, to get a market price, say the stock name, index or commodity. For other transactions say, login. | Login | Speech |
I think you want to log in, is that right? | Yes | Speech |
I'll need your pass number or password. If it’s all numbers, go ahead and key it in, otherwise just spell it. | 1673579# | DTMF |
The set of account numbers and passwords we wish to test with are as
follows:

To create a Test Case for
the above, the Account_No and Password
parameters are created and enclosed in brackets [ ] within the Test Case. This is
shown in the screenshot below:

- Create a CSV file containing the Account_no and Password lists. The first row of the CSV file must specify the name of each data driven parameter, that is, Account_no and Password.

After you have created the CSV file, import the data into the Cyara Web Portal.
Click Select File and browse to the CSV file you want to import.
After the
CSV file is successfully uploaded, the following screen is displayed:
Your data driven Test Case is now ready to be validated and run. Validation will use the first entry in the list of data sets only.
During a Campaign Run, the Account_no and Password will be used in descending order and when the last record is reached, the run will start again from the first record.
Add New Scenario
- To add a New Scenario, click the
New Scenario button, and an input row as shown
appears:
- Enter your inputs, Scenario, Name and Value and press the Tab key.
Editing an existing value
Any value that you have previously created or uploaded can be modified.
- To modify, click the value indicated in
blue and this will display a text area where you can make changes to the value.
- To revert the value to its previous state, press the Esc key.
- Once finished, you can press the Tab key to save your changes.
- To delete a value, hover over the row, and a red trash can appears on the right-hand side of the row. Click the Delete icon to remove this value.
Data Driven Test Case Example Video using a CSV
Watch the video below for a walkthrough of Data Driven Test Cases that are using a CSV file.
Editing an Uploaded Data Set
To edit an existing Data Set within the Cyara Platform (Without having to download it and edit externally), click on the Test Data link in the Tools menu.
Here you will see a list of all previously uploaded Data Sets, how many Scenarios exist within each and how many Test Cases use each Data Set. Click on the Data Set name that you want to edit to open the editor.
Here you can add new columns by clicking on the "Manage Columns" button : then on the
Column Editor, clicking on Add New. Here you can also delete existing
columns.
Click the Add Row button to add a new row to the Data Set. You can click and drag to change the order of each row group. Once you have made the required changes, click the Save button in the top right corner.
Example Using the Data Driven Service
To choose a data driven service, select the tab labelled
Dynamic Data Service. This will display the panel below:

- External Service: This defines the URL for your service. By default, this service will be called using an http GET. You can change this to a POST by choosing this from the drop-down selection
- Paginate: If your service returns a large set of records, you can choose the paginate option so that the results are returned in chunks. Enabling this option will pass two parameters to your service: page and size
- Authentication: Check this option if your service is secured by a username and password (basic authentication)
- Preview: Click this button to validate the information you have supplied and present a sample of the data in a pop-up window. During the preview, any validation errors that occur will be shown
[ [ { "Phone1": "0299998888" }, { "Phone2": "0377776666" }], [ { "Phone1": "0404000444" }, { "Phone2": "0811112222" } ] ]
After the GET request, you will see the following result:
For more information on using the Data Driven Service to drive Test Cases, watch the video below.
Technical Detail for Data Driven Tests
The data driven feature enables reading of records from a file to process unique customer numbers, PINs, and so on, for a Test Case(s).
The file format expected is CSV. To upload a data driven file, use the Browse button to browse to the location of the file, select the file, and then click the Upload File button to upload the data.
To make any changes to the associated data after uploading, a new CSV file must be uploaded, the contents of which will replace the previously associated data.
The file size cannot exceed 10.4MB.
Ensure that the data file structure does not exceed 10000 fields to avoid performance overload. This could be in the form of 5 columns and 2000 rows or 10 colums and 1000 rows or 100 rows and 100 columns and so on.
The first row of the CSV file must specify the name of each data driven parameter (for example, "PhoneNumber", "CustomerNumber", "AccessCode", "Amount", or "AmountInWords"). Each subsequent line specifies a specific scenario.
All fields must be enclosed in double quotation marks (") – this includes headings AND data.
Parameter names are case-sensitive.
The contents of the data file will be used in sequence when the Test Case is run as part of a Campaign. During Test Case creation, when executing an individual Test Case using the Save & Execute button, the first row in the CSV file will always be used.
Data driven parameters can be used in the following Test Case fields:
- Called Number
- Test Description
- Expect To Hear
- Reply With
When one or more of these fields contains a parameter name enclosed in
brackets (for example,
[PhoneNumber]
), the parameter is replaced with the
corresponding field from the current scenario.
You can mix static text with data driven parameters in a field (for
example, the
Expect To Hear field for a Step could be
"Confirming that you would like to transfer
[AmountInWords]
from check to savings. If this is
correct, press 1. If not correct, press 2.").
Exported XML Format
The example exported format for a data driven Test Case is as follows:
<?xml version="1.0" encoding="utf-8"?>
<TestSpecification xmlns="TestSpecification.xsd">
<TestCases>
<TestCase>
<TestCaseName>Share Trader IVR - DataDriven</TestCaseName>
<FolderPath>Share Trader</FolderPath>
<Description>Test Case to test Data Driven function.</Description>
<PhoneNo>0292373331</PhoneNo>
<Notes />
<AlertMsg />
<MinorThresholdCriticalCount>3</MinorThresholdCriticalCount>
<MajorThresholdCriticalCount>1</MajorThresholdCriticalCount>
<DataInputs>
<ParameterList>
<Parameter name="Account_no" />
<Parameter name="Password" />
</ParameterList>
<Scenario>
<Parameter name="Account_no">888965</Parameter>
<Parameter name="Password">5786561</Parameter>
</Scenario>
<Scenario>
<Parameter name="Account_no">889545</Parameter>
<Parameter name="Password">2123356</Parameter>
</Scenario>
<Scenario>
<Parameter name="Account_no">123456</Parameter>
<Parameter name="Password">2223636</Parameter>
</Scenario>
<Scenario>
<Parameter name="Account_no">789896</Parameter>
<Parameter name="Password">2227898</Parameter>
</Scenario>
<Scenario>
<Parameter name="Account_no">555555</Parameter>
<Parameter name="Password">3335587</Parameter>
</Scenario>
<Scenario>
<Parameter name="Account_no">454651</Parameter>
<Parameter name="Password">8999999</Parameter>
</Scenario>
</DataInputs>
<Steps>
<RingingStep>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>30</MaxPauseTime>
<MinorThresholdTime>5</MinorThresholdTime>
<MajorThresholdTime>10</MajorThresholdTime>
</RingingStep>
<CallSteps>
<Step>
<StepNo>1</StepNo>
<Description>Welcome message</Description>
<ExpectedText>Welcome to share trader.</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText />
<ReplyExchangeType>DTMF</ReplyExchangeType>
<MinorThresholdTime>3</MinorThresholdTime>
<MajorThresholdTime>5</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>0.4</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
<Step>
<StepNo>2</StepNo>
<Description>Prompt account number</Description>
<ExpectedText>Whats your account number?</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText>[Account_No]#</ReplyText>
<ReplyExchangeType>DTMF</ReplyExchangeType>
<MinorThresholdTime>3</MinorThresholdTime>
<MajorThresholdTime>7</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>1</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>1</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
<Step>
<StepNo>3</StepNo>
<Description>Main menu</Description>
<ExpectedText>Thanks, to get a market price, say the stock name, index or commodity. For other transactions say, login.</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText>Login</ReplyText>
<ReplyExchangeType>Speech</ReplyExchangeType>
<MinorThresholdTime>4</MinorThresholdTime>
<MajorThresholdTime>7</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>1</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
<Step>
<StepNo>4</StepNo>
<Description>Selection confirmation</Description>
<ExpectedText>I think you want to login, is that right.</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText>Yes</ReplyText>
<ReplyExchangeType>Speech</ReplyExchangeType>
<MinorThresholdTime>4</MinorThresholdTime>
<MajorThresholdTime>7</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>1</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
<Step>
<StepNo>5</StepNo>
<Description>Prompt password</Description>
<ExpectedText>I'll need your pass number or password. If its all numbers, go ahead and key it in, otherwise just spell it.</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText>[Password]#</ReplyText>
<ReplyExchangeType>DTMF</ReplyExchangeType>
<MinorThresholdTime>4</MinorThresholdTime>
<MajorThresholdTime>7</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>1</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
</CallSteps>
</Steps>
</TestCase>
</TestCases>
</TestSpecification>
Comments
0 comments
Please sign in to leave a comment.