Test Automation

Test automation is a method in software testing that leverages automation tools to control the execution of tests. It then compares actual test results with predicted or expected results. Test automation is also called automated testing or automated QA testing. Software testing can be done manually as well as automatically.
Automation Testing is the process of using tools, scripts, and software to perform test cases by repeating pre-defined actions. Test Automation focuses on replacing manual human activity with systems or devices. Because automated testing is done through an automation tool, it consumes less time in exploratory tests and more time in maintaining test scripts while increasing overall test coverage.

The benefit of manual testing is that it allows a human mind to draw insights from a test that might otherwise be missed by an automated testing program. Automated testing is most preferable for large projects that require testing the same areas over and over.
Why Test Automation?
Test Automation is the best way to increase the effectiveness, test coverage, and execution speed in software testing. Automated software testing is important due to the following reasons,
- Manual Testing of all workflows, all fields, all negative scenarios is time and money consuming
- It is difficult to test for multilingual sites manually
- Test Automation does not require Human intervention. You can run automated test unattended (overnight)
- Test Automation increases the speed of test execution
- Automation helps increase Test Coverage
- Manual Testing can become boring and hence error-prone.
Automated Testing Process

1. Test tool selection
Any process starts with the definition, so before applying to test automation you should define the goal of automation. Now, once you are sure of what kind of tests are you performing, you need to select the software testing tool. You need to consider the following points while selecting the perfect tool,
- Is it easy to develop and maintain the scripts for the tool or not?
- Does it work on platforms like web, mobile, desktop etc?
- Does the tool have a test reporting functionality?
- How many testing types can this tool support?
- How many languages does the tool support?
2. Define the scope of automation
Next, you define the scope of automation. So, you need to decide which test cases to automate base on the following:
- Scenarios which have a large amount of data
- Test cases which have common functionalities across applications
- Technical feasibility
- The extent to which business components are reused
- The complexity of test cases
3. Planning, Design, and Development
After determining your goal and which types of tests to automate, you should decide what actions your automated tests will perform. Planning, design, and development include,
- Developing Test Cases: Large, complex automated tests are always very difficult to edit and debug. It is best to divide your tests into several simple, logical and smaller tests.
- Developing Test Suites: Test suites make sure that the automated test cases run one after another without any manual intervention. Now, this can easily be done by creating a test suite that has multiple test cases, a library and command-line tool that runs the test suite.
4. Test Execution
Automation Scripts are executed during this phase. Also, execution can be performed using the automation tool directly or through the test management tool which will invoke the automation tool.
5. Maintenance
Once test cases are executed, the next step is to create reports so that the actions performed during testing are recorded. As new functionalities get added to the software that you are testing with successive cycles, automation scripts need to be added, reviewed and maintained for each release cycle. Therefore, Maintenance becomes necessary to improve the effectiveness of automation.
Types of Automated Testing

- Smoke Testing
- Unit Testing
- Integration Testing
- Functional Testing
- Keyword Testing
- Regression Testing
- Data Driven Testing
- Black Box Testing
Unit Testing
Unit testing is when you isolate a single unit of your application from the rest of the software and test its behavior. These tests don’t depend on external APIs, databases, or anything else.
The main purpose of unit testing is to see how each component of your application will work, without being impacted by anything else. Unit testing is performed during the development phase, being considered as the first level of testing.
Integration Testing
In integration testing, you test how the units are integrated logically and how they work as a group. The main purpose of integration testing is to verify how the modules communicate and behave together and to evaluate the compliance of a system.
Smoke Testing
Smoke testing is performed to examine whether the system build is stable or not. In short, its purpose is to examine if the main functionalities work properly so that testers can proceed with further testing.
Regression Testing
Regression testing checks that a recent change in code doesn’t affect any existing features of the app in question. In simple terms, it verifies that changes made to the system did not break any functionality that was working correctly prior to their implementation.
Automation Testing Tools

Selenium
It is a software testing tool used for Regression Testing. It is an open source testing tool that provides playback and recording facility for Regression Testing. The Selenium IDE only supports Mozilla Firefox web browser.
- It provides the provision to export recorded script in other languages like Java, Ruby, RSpec, Python, C#, etc
- It can be used with frameworks like JUnit and TestNG
- It can execute multiple tests at a time
- Autocomplete for Selenium commands that are common
- Walkthrough tests
- Identifies the element using id, name, X-path, etc.
- Store tests as Ruby Script, HTML, and any other format
- It provides an option to assert the title for every page
- It supports selenium user-extensions.js file
- It allows to insert comments in the middle of the script for better understanding and debugging
Ranorex Studio
Ranorex Studio is an all-in-one tool for automating functional UI tests, regression tests, data-driven tests and much more. Ranorex Studio includes an easy to use click-and-go interface to automate tests for web, desktop, and mobile applications.
Features,
- Functional UI and end-to-end testing on desktop, web, and mobile
- Cross-browser testing
- SAP, ERP, Delphi and legacy applications.
- iOS and Android
- Run tests locally or remotely, in parallel or distribute on a Selenium Grid
- Robust reporting
Rational Functional Tester
It is an Object-Oriented automated Functional Testing tool that is capable of performing automated functional, regression, data-driven testing and GUI testing. The main features of this tool are
- It supports a wide range of protocols and applications like Java, HTML, NET, Windows, SAP, Visual Basic, etc.
- It can record and replay the actions on demand
- It integrates well with source control management tools such as Rational Clear Case and Rational Team Concert integration
- It allows developers to create keyword associated script so that it can be re-used
- Eclipse Java Developer Toolkit editor facilitates the team to code test scripts in Java with Eclipse
- It supports custom controls through proxy SDK (Java/.Net)
- It supports version control to enable parallel development of test scripts and concurrent usage by geographically distributed team
Benefits of Automation Testing

Following are benefits of automated testing,
- 70% faster than the manual testing
- Wider test coverage of application features
- Reliable in results
- Ensure Consistency
- Saves Time and Cost
- Improves accuracy
- Human Intervention is not required while execution
- Increases Efficiency
- Better speed in executing tests
- Re-usable test scripts
- Test Frequently and thoroughly
- More cycle of execution can be achieved through automation
- Early time to market