In this chapter, we’ll first define the steps of the data-driven test. Then, we’ll define the required variables for this scenario. You’ll also find out how to manage variables in akaAT Studio.
Variables are one of the key parts of data-driven testing. They are the placeholders for values you want to feed your test, either from data sources or parameters.
Action variables replace a constant value in a component or property of an action, e.g. the specific text string in a Key sequence action. Action variables are limited to the recording module they’re defined in.
First, we’ll replace the constant text values in the respective actions for entering message and account in the demo test cases.
To replace a constant value with a variable:
A Global Variable in akaAT Studio is a variable which is used globally in the project. For example, if you are going to define a variable as a Global Variable, you can use it in any test case in the project.
Any test case across a project can use global Variables (e.g., input data for keywords in Manual View or params when binding Data for Test Execution).
We create variable “account” on the tab “Variable” by clicking button “Add variable”, on the field Variable name, enter “account” and choose “Data Table” in the field Type.
Scenario: Using Test Suite to run test data through Data Binding.
We create two variables “username” and “password” on the tab “Variable” by clicking button “Add variable”, on the field Variable name, enter “username”, “password” and choose “String” in the field Type.
After creating a new test suite, here named “Demo Test Suite”, we learn some information of test suite’s interface.
- Button “Add test case”: to add a new test case to test suite. A new window is opened to choose test case. You can add more test cases to test suite and save time by running at “Concurrent Instance”.
- A checkbox to define running of this test case.
- Choosing a suitable test data at Data File with an open-up window.