Test Automation
What is Test Automation?
“In software testing, test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes.”
-Wikipedia-
That is how Wikipedia described test automation.
Normally, software testing was done using two main methods. They are manual and automated. Discovery testing, usability testing are done manually. But doing regression testing, functional testing manually is a time-wasting task. Because we have to do the same thing again and again. We can do these kinds of repetitive tests automated. Therefore, we called that test automation.
There are some types of automated testing. They are,
Code-driven test automation (unit tests/ TDD)
GUI test automation (UI object property-based, image recognition based)
API/ Service test automation (Restful APIs, SOAP)
Mobile test automation (Android, iOS, Hybrid)
Before doing test automation, it is important to aware of Software Testing Pyramid.
Before doing test automation, it is important to aware of Software Testing Pyramid.
Testing pyramid include types of test that should include in an automated test suite. Especially, it helps us to identify the frequency and sequence of these tests.
Now we are going to look at Test Automation Frameworks.
Test automation is a set of rules or guidelines that helps in creating test cases. These frameworks will help developers and quality assurance specialists to do their testing efficiently.
Benefits of Test Automation Frameworks
- Increase reusability
- Increase maintainability
- Reduce complexity
- Improved reporting
- Improved error handling
- Improved productivity
There are many test automation frameworks. Let’s details of some of them.
Data-Driven Framework
In this framework, developers can separate data and write the logic in the action script. It is used to test the same function multiple times with different data sets on an application.
Keyword Driven Framework
Here, we can have a set of keywords. These keywords are stored in an external data table. In the driver script, it includes what are the actions those keywords suppose to do.
Page Object Design Framework
This is mainly used for GUI based application testing. In this framework, we can have a web page becomes an object. It has elements and actions that we can perform on that particular page. In the test script, page object functions get the action done and give the result to compare it.
Selenium Suite
Developers and QA Specialists use so many testing automation tools to simplify their work. Among them, Selenium is used by most people. It’s an open-source tool. It’s like a package that has many features.
There are some reasons why a good community is with this tool.
Open-source tool
So much of corporate back-up
A test can run against most new web browsers with the latest versions. (Firefox, Chrome, Internet Explorer, Safari)
Can run on any OS (Linux, Ubuntu, Windows, Macintosh)
There are components in Selenium. Next, you’ll get a brief idea about them.
There are four components in Selenium, and they are providing different features. They are,
- Selenium IDE (Integrated Development Environment)
- Selenium RC (Remote Control)
- Selenium WebDriver
- Selenium Grid
Selenium IDE (Integrated Development Environment)
Selenium IDE uses for prototype testing. Test cases that write in Selenium IDE can be exported into programming languages like Ruby, Java, C#, and so more. This comes as an add-on with Mozilla Firefox.
Selenium RC (Remote Control)
Also known as Selenium 1. Selenium RC is the first tool that came with the Selenium suite. This component supports many programming languages and web browsers. This has a separate server. The APIs are sent to the server and it interprets the command. Then it converts into JavaScript and is injected into the browser.
Selenium Web Driver
Selenium Web Driver is the most important and famous tool of this suite. It doesn’t require a server as in Selenium RC. Selenium Web Driver is developed by removing the limitations had with Selenium RC. It has direct communication between code and browser.
Selenium Grid
Selenium Grid is used for parallel testing and distributive testing. From this component, we can test scripts on multiple machines at the same time. This is the last component of the Selenium suite. This component has a fast Execution, and it reduces the execution time as test cases are executed parallelly
Selenium Suite is playing a major role in the software testing field. Before the wrap up of this article, I like to write what are the benefits of test automation.
Benefits of Test Automation
- Speedy test execution
- Avoid human errors
- Unattended execution
- Test what manually impossible
- Improve the efficiency of testing
I hope this article would be very useful for you. Thank you for reading my article. Let’s meet soon with another informative topic.