Test Automation
By: Charith Wijebandara
Tags: Selenium, Test Automation Framework, Test Automation, Testing, Test Automation Tools

What is Testing and Automated testing?

Testing is a very important phase in the software development life cycle.It is a process, to evaluate the functionality of a software application with an intent to find whether the developed software met the specified requirements or not and to identify the defects to ensure that the product is defect-free in order to produce a quality product.

At the moment there are two methods used for software testing in the world.

Manual Testing Automated Testing

Automated testing is the practice of running tests automatically, managing test data, and utilizing results to improve software quality. This can be achieved by writing test scripts or using any automation testing tool.

Advantages of Using Automation Testing

Software tests have to be repeated often during development cycles to ensure quality. Manually repeating these tests is costly and time consuming. Once created, automated tests can be run over and over again at no additional cost and they are much faster than manual tests.

Automated software testing can increase the depth and scope of tests to help improve software quality.Lengthy tests that are often avoided during manual testing can be run unattended.

Automated tests perform the same steps precisely so the accuracy of the testing is high compared to manual testing Since even the most conscientious tester will make mistakes during manual testing.

Automated testing can simulate tens, hundreds or thousands of virtual users interacting with a network, software and web applications which cannot be done in manual testing.

Disadvantages of Using Automation Testing

Automated testing tools are expensive and the price of automated QA engineers is higher than manual.

It takes some time to write software tests.

We can never test a product like a real user.

It is difficult to test the UI/UX product.

Test Automation Frameworks

Test Automation Frameworks are a set of guidelines like coding standards , test-data handling , object repository treatment which when followed during automation scripting produce beneficial outcomes like increase code re-usage , higher portability , reduced script maintenance cost.

There is 5 types of Automation Frameworks,

Linear Scripting

In this Framework , Tester manually records each step , Inserts Checkpoints in the first round . He then , Plays back the recorded script in the subsequent rounds

The Test Library Architecture Framework

In this Framework , test scripts are initially recorded by “Record & Playback” method. Later, common tasks inside the scripts are identified and grouped into Functions. These Functions are called by main test script called Driver in different ways to create test cases.

The Data-Driven Testing Framework

In this Framework , while Test Case logic resides in Test Scripts, the Test Data is separated and kept outside the Test Scripts. Test Data is read from the external files and are loaded into the variables inside the Test Script.

The Keyword-Driven or Table-Driven Testing Framework

The Keyword-Driven or Table-Driven framework requires the development of data tables and keywords, independent of the test automation tool used to execute them

The Hybrid Test Automation Framework

This framework is the combination of one or more frameworks discussed above pulling from their strengths and trying to mitigate their weaknesses.

Test Automation Tools

There are many open-source and commercial automation tools available.

Test Automation Tools

The most popular Test Automation tool is Selenium.

Selenium

Selenium is a portable open source framework used to validate web applications across different browsers and platforms. Selenium provides a playback tool for authoring functional tests without the need to learn a test scripting language. It also provides a test domain-specific language to write tests in a number of popular programming languages, including C#, Groovy, Java, Perl, PHP, Python, Ruby and Scala. The tests can then run against most modern web browsers.

Selenium is composed of several components with each taking on a specific role in aiding the development of web application test automation.

Selenium Integrated Development Environment (IDE)

Selenium Remote Control (RC)

Selenium Web Driver

Selenium Grid

Selenium Integrated Development Environment

Selenium IDE is a complete integrated development environment for Selenium tests. It is implemented as a Firefox Add-On and as a Chrome Extension. It allows for recording, editing and debugging of functional tests. It was previously known as Selenium Recorder. Selenium-IDE was originally created by Shinya Kasatani and donated to the Selenium project in 2006.Selenium IDE began being actively maintained in 2018.

Scripts may be automatically recorded and edited manually providing auto completion support and the ability to move commands around quickly. Scripts are recorded in Selenese, a special test scripting language for Selenium. Selenese provides commands for performing actions in a browser (click a link, select an option) and for retrieving data from the resulting pages.

In addition to the official Selenium IDE project, two alternative Selenium IDE browser extensions are actively maintained, Kantu (Open-Source GPL license) and Katalon Recorder.

Thank You.

References