Skip to content

Test Flex

2.20.1. Definition

Test Flex is a set of test cases, test suite and controller steps to show that it has some specified set of behaviors. It's almost like test suite but will be flexible in usage. Test flex allow user call output variables of test case

There are 4 kinds of test flex:

  • "E2E test case" supports you to create and run scripts on multiple platforms
  • "Web test case" supports you to create and run scripts on Web platform.
  • "Mobile test case" supports you to create and run scripts on Mobile app.
  • "Windows test case" supports you to create and run scripts for Windows app.

2.20.2. Screen description

No Object Type Description
1 Test Case Column Show a set of test case
2 Test Suite Column Show a set of test suite
3 Control step Column For controlling steps
4 Test case Column Display Name of selected Test case
5 Platform Column Display Run profile of Test case
6 Output Column Output data of previous step used as a input of nextstepAble to use variable with syntax: $.this.variable
7 Data Input Column Data need to input for the stepAble to use variable with syntax: $.this.TEST."Testcase".OUTPUT.

2.20.3. Instruction

2.20.3.1. Use Variable inside TestFlex

To constraint test cases inside Test Flex, we will use Variable. Use variable among Keywords and steps in Test case quite the same when we use in Test Flex.
There are 3 types of Variable in Test cases as you know:

1. Local variable
It is only used in current testflex

2. Input Variable
It could be set by another value from other source like: Data binding from testsuite or data from keyword group or data from other steps/test cases in Test Flex.

For example: We have a test case Login below:

Create 2 Input variables for waiting value from other source

When adding Login testcase to Test Flex, it can get value from output variable of other testcase as you can see in image below:

Or it can take data from Data file

3. Output Variable
which will be used to transmit data to other variable in other sources
As example above, values of output variables in testcase Register.tc are transmitted to input variables of testcase Login.tc

2.20.3.2. Control steps in Test Flex

akaAT Studio supports some control steps in TestFlex to help creating Test run which constraint to each other You may know these because it works the same as in testcase

1. If statement:

  • Run Test runs inside it if condition meet validation

2. For with data:

  • Run Test runs inside loop with a set of data

3. For with index:

  • Run Test runs inside with number loop (set by index)

4. Break:

  • For breaking a loop with a certain condition

For example: A scenario that we search products and them to cart, from cart we will get total amount of all products (Get output for Total amount to an variable in testcase “AddProduct”)
Then If the total amount equal exactly a certain amount we will stop adding more product (It means we will use “Break” step here)

5. Continue:

  • Use the same example above, if price have not approach a target amount we will continue add more product to cart. It means instead of using “Break”, we use “Continue” in this situation

6. Exit:

  • Use Exit when we want to Stop Test Flex run at any step without condition. At any step put “Exit” step, Test run will stop.

7. If Pass:

  • We use this Step control test run flow basing on Status of a testcase

In the example above, we will base on status of Test case “google”.
If TRY pass (Test case “google.tc” in TRY step is pass)
- In Do Step: Testcase “Apple.tc” will be run
- In Else Step: Testcase “tiki.tc” WON'T be run
- In Finaly Step: Testsuite “TS03_TE.suite” will be run

If TRY failed (Test case “google.tc” in TRY step is failed)
- In Do Step: Testcase “Apple.tc” WON'T be run
- In Else Step: Testcase “tiki.tc” will be run
- In Finaly Step: Testsuite “TS03_TE.suite” will be run