Test Automation Practice in Agile Projects STC 2012 www.harbinger-systems.com
Abstract Principles of agile Challenges in Test Automation What we should and shouldn t automate Test Automation Frameworks How test automation helps Best Practices for writing automated tests Testing tools www.harbinger-systems.com
Principles of Agile Iterative and Incremental Development Frequent delivery/deployment Customer Collaboration Early Visibility of product Progress measured by working Software
Challenges in Test Automation Lack of detailed requirement Constantly changing requirement Limited resources Not enough time to prepare tests Re-factoring of Code
What Should we Automate and what Should Not What We Should Automate What We Shouldn t Automate Unit testing Data Setup Installation Test Execution Regression, Smoke or Build verification testing Automatic test result reporting Usability Testing/ look and feel. Exploratory testing.
Agile Testing Quadrants
Test Automation Frameworks Linear Scripting - Record & Playback It is the simplest of all Frameworks and also known as"record & Playback". In this Framework, Tester manually records each step ( Navigation and User Inputs), Inserts Checkpoints ( Validation Steps) in the first round. He then, Plays back the recorded script in the subsequent rounds. Advantages Fastest way to generate script Automation expertise not required Easiest way to learn the features of the Testing Tool Disadvantages Little reuse of scripts Test data is hard coded into the script Maintenance Nightmare
Test Automation Frameworks Continued Data Driven In this Framework, while Test case logic resides in Test Scripts, the Test Data is separated and kept in a different module independent of test scripts. Test Data is read from external files (Excel Files, Text Files, CSV Files, XML) and is referred by the Test Script. The Read data is used both for various Inputs and for Verifications. Advantages Repeated use of Test Scripts with Different inputs and response data coming out of predefined scripts. A Variety of Test Scenarios can be executed by just varying the Test Data in the External Data File Disadvantages More time is required to plan and prepare both Test Scripts and Test Data.
Test Automation Frameworks Continued Keyword Driven The Keyword-Driven is also known as table-driven or action-word driven framework. In this framework, an application map is defined including it s objects, components, actions and an expected value for each component. It requires very deep knowledge of applications and automation testing expertise. Keyword-driven tests look very similar to manual test cases. Advantages Repeated use of Test Scripts with Different inputs and response data coming out of predefined scripts. A Variety of Test Scenarios can be executed by just varying the Test Data in the External Data File Once the keywords are defined,it becomes very easy to create various test cases to cover the complete application functionality. Disadvantages More time is required to plan and prepare both Test Scripts and Test Data.
Test Automation Frameworks Continued Hybrid Test automation Framework As the name suggests this framework is the combination of one or more frameworks discussed above pulling from their strengths and trying to mitigate their weaknesses. This hybrid test automation framework is what most frameworks evolve into over time and multiple projects. Maximum industry uses Keyword Framework in combination of Function decomposition method.
Best Practices For Automation Tests Automation should be adaptable to changes Robust Trustworthy Scripts should be reusable Address one or two needs at a time Start small at the beginning of the project and build the test suite iteratively with each passing sprint
How Test Automation Helps Improve productivity and speed in sprints Automated testing helps tester to concentrate on Ad-hoc scenarios and automation testing can be run in parallel with manual testing Repeatable Same scripts can be run multiple times and used again in next sprints Reduce or stabilize the cost of testing Manual testing efforts reduces significantly Reduce time spent in regression testing Automated regression testing is much faster than manual process Improve the quality of deployed application by reducing defect escape rate
Testing Tools Selenium 2.0 WebDriver, IDE Jmeter JUnit WATIR Proprietary tools Open source automated web testing framework Open source functional and load testing tool Open Source unit and integration testing tool for java Web application testing in Ruby Coded UI Test (CUIT), Quick Test Pro, WinRunner, Rational Functional Tester and Silk Test
Questions?
Thank You Harbinger Systems Your Partner in Technology Innovation Website: www.harbinger-systems.com