website logo
⌘K
Welcome to Relicx
How does Relicx work ?
Benefits of Relicx
Getting Started
Sign-up
Instrumenting Your App
Security and Privacy
Application & Environments
Adding Application
Adding a new Test Environment
SDK
getSessionUrlCallback()
identify()
Log()
sessionVars()
sessionLabels()
User Sessions
Session Replay and Detail
Developer Console
Automatic Release Validation
How Does Relicx Release Validation Work?
Benefits of Relicx Release Validation
Running Release Validation
Interpreting the results
Adding Tests
Smart Tests
Interactive Test Authoring
Generating Tests from User Sessions
Editing Tests
Running Tests
Test Run Page
Test Suite
CI/CD Integration
Notifications
Slack
Email
Additional Resources
Importing tests into Relicx
Testing Firewall Protected Apps
Timezones
How-to-Guides
Instrumenting Your App
Convert a session with errors to test
Video Resources
Changelog
Docs powered by
Archbee
Smart Tests
Running Tests

Data Driven Tests

7min

Data-Driven Testing is a common extension of any kind of automated test, and Relicx provides the capability to execute tests with parameterised datasets, and to execute multiple iterations of the testing with different pieces of data

Providing data sets for a test suite

To iterate a set of tests for different combinations or instances of data, we can provide Relicx with a file that specifies what values each Parameter should take with each “Iteration”. Relicx will then run the suite of tests multiple times, once for each instance of data

File format

Below is an example of of the JSON file we would upload to drive the testing in Relicx:

JS
|
{
   "paramOverridesPerRun": {
       "all": {
           "Iteration 1": {
               "ACCOUNT_TYPE": "checking",
               "DEPOSIT_AMOUNT": "3000",
               "EXPECTED_PAGE": "view",
               "FORM_ACTION": "submit",
               "NAME": "My Account 1",
               "PERSON_TYPE": "individual"
             },
             "Iteration 2": {
               "ACCOUNT_TYPE": "checking",
               "DEPOSIT_AMOUNT": "3000",
               "EXPECTED_PAGE": "add",
               "FORM_ACTION": "reset",
               "NAME": "My Account 2",
               "PERSON_TYPE": "individual"
             }
       }
   }
}




  1. “Iteration 1” & “Iteration 2” are labels we can define for our different iterations of data for reporting purposes, within each object we define the data for that suite test run
  2. "ACCOUNT_TYPE", "DEPOSIT_AMOUNT", "EXPECTED_PAGE" etc. are the names of our parameters that we have been using in our suite, within the iteration objects you can see the values that will be executed. In this example we are running our suite twice, once with a “FORM_ACTION” of “reset” and once with a value of “submit”
  3. “All” refers to the scope of our data: it refers to all of the tests in our suite. This means we will run All of our tests with the following iterations/data
  4. If we need our individual tests to use different data values from one another, we can declare them separately by using their IDs instead of “all” like so:
JS
|
{
   "paramOverridesPerRun": {
       "34889": {
           "Iteration 1": {
               "ACCOUNT_TYPE": "checking",
               "DEPOSIT_AMOUNT": "3000",
               "EXPECTED_PAGE": "view",
               "FORM_ACTION": "submit",
               "NAME": "My Account 1",
               "PERSON_TYPE": "individual"
             },
             "Iteration 2": {
               "ACCOUNT_TYPE": "checking",
               "DEPOSIT_AMOUNT": "3000",
               "EXPECTED_PAGE": "add",
               "FORM_ACTION": "reset",
               "NAME": "My Account 2",
               "PERSON_TYPE": "individual"
             }
       }
	"12184": {
           "Iteration 1": {
               "ACCOUNT_TYPE": "checking",
               "DEPOSIT_AMOUNT": "333",
               "EXPECTED_PAGE": "add",
               "FORM_ACTION": "submit",
               "NAME": "My Account 1",
               "PERSON_TYPE": "individual"
             }
       }
   }
}



Here we can see that we can have different iterations, and different data within them, per test in the suite.

Running a data driven suite

When we execute a suite, we are offered a button to upload the JSON file that drives our data-driving, Relicx will then execute according to the file.

Document image


Data driven test results

When our test suite has finished executing, the report will display each of the test iterations separately so you can view them each as their own test report

Document image


If you click through to one of them you will see a regular test report, you can always view the parameters tab to understand the values used in a particular iteration

Document image




Updated 30 Jul 2023
Did this page help you?
PREVIOUS
Resilient Mode
NEXT
Test Run Page
Docs powered by
Archbee
TABLE OF CONTENTS
Providing data sets for a test suite
File format
Running a data driven suite
Data driven test results
Docs powered by
Archbee