☰ See All Chapters |
Automation Testing Tutorial - Introduction to Automation
In this tutorial you will learn about automation basics and understand what automation is and the need for automation. Automation means using some tool to execute your test case suite instead of manual execution. The important objectives of any software development are quality and productivity. Productivity means completing more work in less time. Quality can be achieved by testing software regularly. And productivity can be achieved by automating the repetitive execution of manual testing. Through this Automation Testing tutorial, we will learn all about test automation.
In this tutorial you will learn
What is automation
Commercial and Open Source Automation Tools
When should one decide to automate?
When to start automation for an application?
Formula to determine whether automation is required for an application
Places and advantages of automation
What is automation?
The process of converting the manual test execution to auto executing test scripts with the help of any automation tool is known as automation. These scripts can be executed on the targeted application whenever needed without any manual support.
Suppose we have an application with 1000 employees data, assume at some time the password stored in database needs to be encrypted and need to validate the username and password after password encryption. Here manual work is to first encrypt the password and test successful login whether applications is correctly decrypting the password and matching against username. If this work is needed for one or two iterations, automation should not be used, because from time used for writing the automation script, around 10 employees can be tested manually. But here we have 1000 employees; do you think manual testing against 1000 employees brings 100% perfection? No, not at all, as the test count increases, slowly manual tester loses interest and definitely misses out the execution, brings the defect for application. Now, you should have understood the profit of automation.
Initially it consumes some time for creating automation script but this can be used at any time and any number of times. This is like one time investment. Also the execution brings the perfect test result against 1000 employees too.
Please note, it is not always to automate all test execution, deciding the automation should be intelligent decision. Automation for repetitive static work will be a good decision.
Commercial and Open Source Automation Tools
Tool | Vendor | Supported Languages | Usages |
Selenium | Open Source (free) | Java, C#, Ruby, Python, Perl, Php, Javascript, Javascript (Node JS), Haskell, Dart, TCL, Objective - C | Automation for web and mobile applications. Supports all browsers like browsers like Firefox, Chrome, IE etc.. And this is platform independent. |
Unified Functional Testing- UFT (previous version was called QTP) | HP | VBScript | Automation for web applications. |
Rational Functional Tester | IBM | VB.net, Java | Automation for web applications |
Watir | Open ource (free) | Ruby | Automation for web applications |
TestComplete | SmartBear | VBScript, JScript, C++Script, C#Script, DelphiScript | Automation for desktop, mobile, and web applications |
Silk Test | MicroFocus | Java,VB.NET, C# | Automation mobile and web applications |
Cucumber | Open Source (free) | Ruby, Java, Scala, Groovy etc. | Test scripts are in simple English language. Scripts can be executed on different frameworks like Selenium, Ruby, etc. This supports Behavior Driven Development (BDD) approach. |
Katalon Studio | Open Source (free) | Groovy | Automation for web applications. |
When should one decide to automate
Is automation always advantageous? When should one decide to automate test cases? It is not always advantageous to automate test execution. If the data is not consistent and if data is random, if application needs the test based on the data which is not reachable by automation scripts, manual testing may be more appropriate. If the application’s user interface is changed, there might not be not enough time to build test automation, in such case, manual testing is exigent. If application is not stable the manual testing is the best solution.
When to start automation for an application
When the application is stable, to save the time used for regression testing, automation can be used.
If the application is in development phase, never automate. If application design is changed, automation scripts also should be updated. Maintenance of scripts brings cost for an application.
When application is mostly stable, automation is a right choice. A tester can start automation instead of manual execution. But allocating completely a new automation team and creating scripts for entire application should not be done. As and when tester gets the work to test, he should automate to test it instead of manual execution. Automation should be covered unit wise and functionality wise.
Check your application, whether automation brings the profit, if there is a repetitive static work, automate it. Automating entire application may not be profitable. There are many organizations have their automation teams working on automation for a decades and does not getting any profit. When application gets updates, automation team takes time to update the scripts, where testing will be done manually and there will be no benefit from automation.
If application is having frequent builds and deployments, interrupting the manual test execution, then don’t wait until the build is stable. If the requirements are stable, execute automation scripts.
Formula to determine whether automation is required for an application
Places and advantages of automation
Whenever a new software build or release is received, sometimes build might have been crashed and not completed. If this is not noticed and testing is proceeded then it would be a useless work. Hence a test to check whether testing can be started or not is imperative. This is generally called as smoke testing to verify if the build is testable. This smoke test should be automated to test the build quality.
Also after a build there is certain number of actions a developer should commit like check server status, clear old cache, restart server, clear old logs if not necessary and many more. All these actions should be automated.
Automation for automation script should be done, like to trigger the automation execution daily night when all the manual testers are not using the application. Automation to collect the automation execution results and send the report to developers.
Manual testers usually prepare data for their test case executions, sometimes this data preparation consumes much time than test case execution. This data preparation should be automated.
One main mistake every automation script writer does is, not including the script to extract the test report to analyse the defects. What they do is they perform a manual execution upon failed test script to extract steps to reproduce the defect to pass these steps to developers. Or, spend considerable time to analyze the failed the execution or they just pass it to developer to fix the defect without any details on the defect.
If there are different versions of application and all are in real time usage then upon addition of new feature it should be tested against all the versions of application. This test case should be automated to avoid repetitive work.
If an application is offering cross browser compatibility, then upon addition of new feature it should be tested against all the versions of all the browsers. This test case should be automated to avoid repetitive work.
When new feature is added to stable application there is a potential for defects where new feature might have broken the other functionality flows. This can be identified quickly from automaton testing than from manual testing.
All Chapters