a) Login > Create Order > Logout.
b) Login > Search Order > Logout.
Here Login and Logout are the reusable flows. Functions would be created for each of these flows which will be saved in an external function library. The test scripts would look something like this.
In order to use the functions from the external library file, the library file must be first associated to the test cases. Once this is done, the test case can call all the functions present in the library file.
Advantages of Modular Framework
- Test Scripts can be created in relatively less time as the reusable functions need to be created only once.
- Effort required to create test cases is also lesser due to code reuse.
- If there are any changes in the reusable functions, the changes need to be done in only a single place. Hence script maintenance is easier.
Disadvantages of Modular Framework
- Since data is still hard coded in the script, the same test case cannot be run for multiple data values without changing data after each run.
- Additional time is spent in analyzing the test cases to identify with reusable flows.
- Good programming knowledge is required to create and maintain function libraries.
No comments:
Post a Comment