TEST AUTHORING
Running Tests
Data Driven Tests
6min
this feature is available in the enterprise tier plan 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 { "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" } } } } “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 "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” “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 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 { "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 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 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