Data-driven patterns can be used when testing the same workflow for changing data.
What is a workflow. Is the model of the workflow. As an example of a valid login workflow, you can establish the following model (workflow), which can be represented by a workflow flowchart:
(1) Open the login page, (2) Enter the user name, enter the password, enter the verification code--(3) Submit, system to determine whether the input is correct and (4) login success, jump to the Welcome page (or Login failed, give a hint message)
In the above workflow, (1), (3), (4), (5) are the stable operation logic of the valid login process, in the requirements phase has decided how to go and through the code implementation, as long as the user successfully issued instructions (open the login page, click Submit, etc.), the computer can be executed smoothly, not many variables. The key is the step (2), which is the user's input, in addition to user data (account number, password, verification code) is inherently different, there are a variety of combinations. Different data input, the workflow has different execution results, that is, the workflow is data flow driven.
User name and password combination:
| Test Case | user name | password |
| Invalid user name | invalid | Valid password |
| Invalid password | Valid user name | Invalid |
| Invalid user name and password | Invalid | Any other password |
| Empty user name | empty | Valid password |
| Blank Password | valid user name | Empty |
| blank password and user name | Empty | empty |
| Valid user name and password | Valid User name | Valid password |
The idea of data-driven mode: The idea of black box testing
8 basic data (input)-->| Workflow black box |--> (output) 2 execution Results (login success/failure)
Steps:
(1) The body of the design workflow executes the steps
(2) Design drive workflow data, involving input box, radio button black box test case design, first divided into valid equivalence class and invalid equivalence class (null value, invalid data), and then the combination