1) Reusability of code
2) Maximum coverage
3) Recovery scenario
4) Low cost maintenance
5) Minimal manual intervention
6) Easy Reporting
1) Module Based Testing Framework
2) Library Architecture Testing Framework
3) Data Driven Testing Framework
4) Keyword Driven Testing Framework
5) Hybrid Testing Framework
6) Behaviour Driven Development Framework
1) The framework introduces high level of modularization which leads to easier and cost efficient maintenance.
2) The framework is pretty much scalable
3) If the changes are implemented in one part of the application, only the test script representing that part of the application needs to be fixed leaving all the other parts untouched.
1) While implementing test scripts for each module separately, we embed the test data (Data with which we are supposed to perform testing) into the test scripts. Thus, whenever we are supposed to test with a different set of test data, it requires the manipulations to be made in the test scripts.
1) Like Module Based Framework, this framework also introduces high level of modularization which leads to easier and cost efficient maintenance and scalability too.
2) As we create common functions that can be efficiently used by the various test scripts across the Framework. Thus, the framework introduces a great degree of re-usability.
1) Like Module Based Framework, the test data is lodged into the test scripts, thus any change in the test data would require changes in the test script as well.
2) With the introduction of libraries, the framework becomes a little complicated.
Let us understand the above mechanism with the help of an example.
Let us consider the “Gmail – Login” Functionality.
1) The most important feature of this framework is that it considerably reduces the total number of scripts required to cover all the possible combinations of test scenarios. Thus lesser amount of code is required to test a complete set of scenarios.
2) Any change in the test data matrix would not hamper the test script code.
3) Increases flexibility and maintainability
4) A single test scenario can be executed altering the test data values.
1) The process is complex and requires an extra effort to come up with the test data sources and reading mechanisms.
2) Requires proficiency in a programming language that is being used to develop test scripts.
1) In addition to advantages provided by Data Driven testing, Keyword driven framework doesn’t require the user to possess scripting knowledge unlike Data Driven Testing.
2) A single keyword can be used across multiple test scripts.
1) The user should be well versed with the Keyword creation mechanism to be able to efficiently leverage the benefits provided by the framework.
2) The framework becomes complicated gradually as it grows and a number of new keywords are introduced.
1) Object Repository: Object Repository acronym as OR is constituted of the set of locators types associated with web elements.
2) Test Data: The input data with which the scenario would be tested and it can be the expected values with which the actual results would be compared.
3) Configuration File/Constants/ Environment Settings: The file stores the information regarding the application URL, browser specific information etc. It is generally the information that remains static throughout the framework.
4) Generics/ Program logics/ Readers: These are the classes that store the functions which can be commonly used across the entire framework.
5) Build tools and Continuous Integration: These are the tools that aids to the frameworks capabilities to generate test reports, email notifications and logging information.
The frameworks illustrated above are the most popular frameworks used by the testing fraternity. There are various other frameworks also in the place. For all the further tutorials we would base on the Data Driven Testing Framework.