{{announcement.body}}
{{announcement.title}}

10 Things to Remember Before You Say Yes to Automation Testing

DZone 's Guide to

10 Things to Remember Before You Say Yes to Automation Testing

Automated testing takes a serious commitment, so there are some questions and considerations you should take into account before going all in.

· DevOps Zone ·
Free Resource

Yes

Find out what you need to know before implementing automated testing.

Testing a software or an application is as important as the work done by the developers to create that software. Sometimes not given much importance, software testing can save a company from unnecessary embarrassment and monetary loss. Identifying bugs and security flaws in an application before it is released to the public will act as a saving grace for the company.

However, software testing, oftentimes, involves repeated testing and any human error can affect the result of the test. To avoid the occurrence of any such errors, companies, these days, are employing automation in the testing arena. No longer does a tester need to repeat the same keystrokes and button press and all the other monotonous things to test the software from the beginning each time a new code is added to the existing codebase. With software like Selenium, automation testing is now gaining much popularity.

Following are the ten things that enterprises need to keep in mind before opting for automation testing:

1. Automation Amounts To Less Work But Not Less Dedication  

Test automation, although time-freeing, is work that requires planning and dedication. It is full-time work. A tester cannot do manual and automated testing at the same time.

Test cases that can be automated are to be identified at first. This includes identifying business-critical, repetitive and monotonous test cases. Then comes identifying which part of the application can be tested.  Then comes the planning part — selecting the test framework, setting the timeline, identifying what results will the test reveal, etc. to be formulated in this part.

You may also enjoy: The What, Why, and How of Automation Testing

2. First, Make Sure You Know the Kind Of Tests You Can Automate

It is not necessary to automate every test. Some tests are just not feasible to automate. Some tests, if automated, will fail to show any bugs that are there. So it is necessary to automate those tests that you are sure will ease the workload.

Regression tests can be automated. Every time new code is entered into the codebase, the whole application is to be tested to see if the new code broke the existing features. This regression test can be automated. Again, tests that require huge amounts of data to be entered are prone to human error. These tests should be automated. If you want to see how the application works in a variety of OSs and browsers, you can do that virtually with test automation.

Sometimes a web app has to be tested to see if it can withstand thousands of user requests and user-actions in a given amount of time. However, if you are a lone tester or if your testing team is comprised of 7-8 people, how will you test the load taking capacity of the web app? This is where automation comes in. Automation testing can create thousands of virtual users to simulate what it will look like if the web-app is used by thousands of people simultaneously.

However, there are times when an automation test is not viable. Some of the aspects of the application can only be tested by a manual tester to ascertain if there is an issue. One such aspect is the user interface. Only a human tester can tell if there are any visual shortcomings in the UI. For example, suppose Reddit introduced a background image to its login screen. However, the tagline written in the background image has a spelling mistake. This mistake cannot be caught by automation testing since the sentence is not written on the website but instead is written on the image that is on the website. Only a manual tester can catch this mistake.

3. Remove Ambiguity From Test Automation Results

Ambiguous test automation results are to be ignored. Automation test should give only one result — if one time it passes and the second it fails, there is bound to be some problem with the test script or planning.

4. Design Test Cases Before Executing Automation 

A well-thought-out and the well-designed test case is the key to successful bug detection in a test automation scenario. Without proper planning, your test case will be of little use.

There are several kinds of the test design process. The popular is the Black Box technique. This technique includes Boundary Value Analysis (BVA). This is a technique that tests how the input values at the extreme ends of the input domain interact with the application. It is the extreme ends of the partition that are prone to errors. For example, if Facebook wants to exclude people who are under 18 from its site, you can use this test case to see if the exclusion process works. This test case will include 6 cases that check if the values 18, 19, 129, 130, 17, 131 (assuming the maximum age that Facebook accepts is 130).

Then there is Equivalence Partitioning (EP). If there are a significant number of values that are to be tested to see if they are valid or not, we can use EP to classify these values into different classes. That way we don't have to check all the values.

Another type of test design is Decision Table Testing. This testing first examines whether all the conditions of the desired output are fulfilled or not. There are other black box techniques like, State Transition Diagrams or Use Case Testing which we will discuss in our future blogs.

5. Don't Make The Learning Curve Too Steep

Formulating test automation in a language that the testers don't use much in the organization is a strict no-no. If the application is made in Python and your employees are well versed in Python, too, you should do test automation in Python — uniformity is the key. If the application is made with a code that your testers have little idea about, see if your testers can learn the language without much sweat. If so, then use that language in test automation. If not, then use the language that your testers are familiar with.

6. Gain Idea About The Application Before Testing

It is necessary to know about the application that you are about to test before formulating a test automation plan. For example, if your application is just a web app, you can use Selenium. However, if your application is a desktop app, you can't use Selenium. So it is necessary to gather all the information about the application beforehand.

7. Break Your Test Cases

Are your test cases connected to one another? If so, any failure in the preceding test case can affect the execution of the test case to follow. So make sure you break your test suite into small chunks that can work alone.

8. Make Sure Your Test Data Is Error Free

The success of the test scripts depends on the quality of data and how well they are structured. If your test fails because of bad data, you cannot blame your script.

9. You Cannot Rule Out Exploratory Testing

Automation testing is rigid and will not digress from the boundaries set by the test script. This rigidity is counter-productive. A manual tester will take into account past weak spots of the app, test it according to his logical intuition. Suppose a social media company introduced a new feature that will help people to find their real-life friends by typing in the phone numbers of their respective friends in the search box. A manual tester will only want to see if the mobile numbers need to be typed with country code or not to achieve the desired result. This logical testing done by the manual tester can then be included in the test case to see whether they can be automated.

10. Add a Built-In Alert System In Your Test Automation 

Add a built-in alert mechanism in your test suite so that whenever any new event of failed test case arises, you get an email notification.

The Agile software delivery process and DevOps are gaining momentum. DevOps is all about automation. Why should testing be left behind? However, automation for the sake of automation should be discouraged. Will the automation testing turn your hard work into smart work? If so, then go for it!

Further Reading

How Visual Testing Is Transforming the Way Modern Teams Test Software

Keys to Automated Testing

Topics:
automation testing, automation testing checklist, automation testing tutorial, selenium automation, selenium automation testing, selenium testing, selenium testing tutorial

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}