Getting Started on Automated Testing: Let start with What, Why and When questions
What is the automation testing?
Testers perform manual testing by executing test cases in Test suites to provide Passed/Failed results for each test case. However, it will take a lot of time to execute the test case, even if there are many test cases that the testers failed to complete and worse, yet there will be errors due to human factors being, oh-so-human mistakes that most of us make. Therefore, Automation Testing was created to solve these problems.
By using special tools for automated testing it is possible to retrieve data from external files (such as Excel, XML, CSV…) into the application to test and compare actual results to expected results then create a detailed test report.
Automation Test is a technique that uses an application to perform almost the entire test case in the test suite in a short time and fully automated, performing almost all test cases that the Tester can do manually. Testing time is much shorter than manual execution and saves a lot of time for the test phase in the project. There are many tools for performing Automation Test from paid to open source, from web-based applications to Windows applications such as Test Architect, Selenium, Sikuli, QTP / UFT…
Why do we need automation?
- Greater Coverage
Test automation can automate some of the repetitive tasks that are required in the formalized testing process, or add additional testing that is difficult to implement manually to ensure quality in the development cycle of that software. For each software release, testers must test entire hardware as well as all operating systems that the software supports. Repeated testing is time-consuming and costly for the old version and having to test functions in the next version. But when executing test cases with automated testing tools repetitively, the result is cost-effective and time-saving, from which we have the time to test other functions in the next release.
Thanks to its high stability, automated testing can execute test cases with greater accuracy.
- Improved Testing Productivity
After initiating the project, with subsequent version, we can execute large numbers of the test suites daily. This helps us increase the coverage during the regression test. Therefore, testers can focus more on manual cases.
- Reduced Testing Cycle
This is especially true in the maintenance phase of large projects. Every week, we have to perform regression tests from one to two times with a very large number of test cases in 1 to 2 days. It’s almost impossible to do it manually, while with automated testing we can do it with very minimal human resources. Therefore, that we can shorten the time and publish the release new version of the software to the market as soon as possible
- Doing what manual testing cannot
Complete tasks that people cannot do: If we want to execute load tests, performance tests, then the automated testing is the only way.
- Using Testing Effectively
Automated testing reduces the tediousness of software testing and improves the morale of testers during regression testing.
- Increased Reusability
With an automated test suite, we can use it for many versions of the applications on multiple operating systems, called reusability.
Advantages and disadvantages of automation testing
- Advantages
- More reliable: Thanks to the outstanding stability of software testing tools, we are able to identify software defects unaffected by human factors such as manual testing, especially in the case of excessive test cases to execute. Therefore, automated testing gives us more accurate results.
- Repeatable: For an effective test suite we need to put different data into a test case to check the conditional fields of the software, for instance, we have to input about 50 different data sets then click buttons, checkboxes, etc… Repeating this process 50 times make your testing time-consuming and costly. Therefore, establishing the repetition is really necessary. It means that we only need to write a script for repeated execution without the intervention of the testers. After the iteration of the script, we get the results of the test cases.
- Less time consuming: For testing a test case with 50 different data sets we need a lot of time while we use automated testing tools it only takes a short time to complete.
- Less boring
- Unattended test Execution
- Execute tests that could not be done by manual testing: There are some cases that manual testers can’t test such as loading test, performance test, etc. In that case, we will use automated testing tools to test.
- Less expensive: Automated testing only needs to write scripts and execute scripts without the testers, thus reducing costs and resources of the project
- Support to export to many popular languages such as C#, Ruby, Java, Python …
- Disadvantages
- In the initial period, the cost of automated testing is higher than the costs of manual testing such as machine costs, copyright (for paid tools), maintenance, training. In order to be able to perform automated testing, it is still necessary to have people, time and costs.
- To write scripts for automation testing, the testers must have experience, expertise, understanding the languages that used to write the program, knowing the framework, …
- The expansion, as well as maintenance of test cases in the case of automated testing, is much more difficult than manual testing. While manual testers only open files, write test cases and revise test cases, automated testers must update new code, debug code, change input data, and so on.
- Due to the difficulty of the exploration, extensive testing and human resources are required for many programming skills, so the coverage of an automated software test suite can be very difficult to cover all test cases.
When to use automated testing?
- Automation should be used when:
- The most common reason that testers use automated testing is regression testing. Usually, there will be very tight schedules and only a few days left before the final release of the system to the client. In a short period of the term, software testers cannot recheck the old test cases and test for other upgraded functionality of the new version. Therefore, automated testing is a solution to resolve this problem, automated testing will run old test cases regardless of the time of the day. it means that amounts of test cases will run in a short time and testers can test the new applications/functions.
- Testing an automated test suite of stable main applications/ functions that testers have tested is a great idea, and we can conduct smoke testing before regression testing when a new version is released.
- When a test case has multiple sets of data, instead of having to test each set of data for that test case, we use automated testing to be able to test all data sets in data warehouse, so testing by automated testing, the computer can analyze and output the results quickly and effectively.
- Besides the above cases, we use automated testing in performance testing, load testing, stress testing. Automated testing seems to be the only way to test types of test that manual testers can fail to test.
- Automation Testing should be not used when:
- One-time testing: Testing automates a test case; we need a time period that is four to eight times of the time we spend on manual testing. Because of that, we should consider the choices between manual testing and automated testing. If a project only needs one test, we should consider whether to automate the test, as the development of the automated testing takes too much time to write test scripts. Also, the ROI from automated testing is not higher than manual testing.
- Usability testing: When it comes to usability testing, it is about human perception of the application or functions that is good or bad. Wherever advanced machines are, it cannot substitute for human perception. So, in this case, we cannot test the usability.
- Exploratory Testing: When we want to explore applications or functions testing without knowing what the outcome is, we should not use automated testing because we simply do not know what the outcome is, so how will the machine know what the result is.
- Ad-hoc/random testing: Ad-hoc testing is not in a logical order, not following any organization, not following any structure. Ad-hoc testing usually ends up exploring issues or defects, which cannot be found by formal testing. So we should not test automatically in the case of ad-hoc testing.
Tips to become an automation tester
- The tester should have basic knowledge of testing
Software testers should have a minimum knowledge of software testing such as software testing methods, types of software testing, software testing strategies, and so on. In addition, there are some testing techniques that should be known, such as marginal value analysis, equivalence partitioning, result chart, error guessing, etc.
We need to be fully equipped with this knowledge because an automated tester cannot fully design test cases without mastering the basics of an existing tester.
From the basic ground up, testers can improve their knowledge by learning new the knowledge to enhance the automated testing skills of automated testers.
- Understand HTML and CSS clearly
HTML and CSS are the basics of designing a website. In a web page, in order to properly identify certain elements of the webpage that we need to interact with, we need to understand a bit about HTML and CSS to be able to identify it. When it comes to CSS – it means a component attribute on a web page, based on which we can identify objects/elements, but sometimes CSS can’t identify objects/elements that we need to manipulate, so XPath can help us to locate it on the website by using tags in HTML. Identifying the right object or element to manipulate increases the stability and accuracy of the script.
- Proficiency in at least one common programming language
An automated software tester needs to master at least one programming language, such as Java, C #, Python, Ruby, JS, etc. This supports scripting on test tools. Java programming language is currently the most supported language on w3school. A very important part if an automated software tester wants to do well and develop tester’ work.
- Proficiency in the Selenium WebDriver API library
At present, selenium web driver is widely used by most companies doing automated testing because the program that is open source should be free of charge, the interface of the program is simple, easy to use, concise. In addition, there is a large community of users that can easily support the testers. Selenium-WebDriver API library was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded.
- Proficiency in at least one framework testing
We should be able to master a few frameworks like Cucumber, Specflow for BDD, JUnit, TestNG, NUnit, etc. to be able to build frames, support clustering, test report script, report, prepare data, environment, and browsers.
From the basic knowledge of the framework, we can improve the understanding of software design patterns so that we can build the framework or shared libraries for use in the project.
- Skills in coding and working with databases
In terms of coding, we have basic skills like debug view of the program where from which we modify the test script well, control the source version, … besides, we can write the test scripts in different environments such as Visual Studio, Eclipse, IntelliJ, etc. Also, for databases, most software projects will work with databases, querying, data binding, etc. will help software testers automate a lot of the testing tasks
- Learn new technologies in the automation testing
Automated software testing is becoming more and more popular and new technologies are being introduced to meet the needs of automated software testers for automated testing. It’s impossible not to mention that building tools like Maven, ANT, etc. are automation programs to create to execute from source code.
You should learn some technical terms such as CI / CD, Cloud, BDD, BigData, Mobile,…
For large data, it is a term used in the processing of large and complex data that traditional data processing applications do not handle. Because of that, we cannot automatically test using traditional methods.
- The importance of automation testing in the modern industrial era
The modern industrial revolution 4.0 marks the era of Internet-connected devices. The core of technology in the 4.0 revolution is AI, the Internet of Things (IoT) and Big Data. It is based on a number of industries in which information technology is a core industry that improves the management of industries. Information technology is increasingly being developed by wireless technology such as content connectivity in e-mail or social networking sites, Internet connections with machinery and equipment that help remote machines operate…
Modern industry has been developed and developed in many developed industries such as information technology. Therefore, it requires human resources to have technical skills, knowledge of technology and automation. , …
On the job site, you can see a lot of industry requirements for automated testing such as Automation Tester, QA Automation Engineer, …
Conclusion
From the above, we have introduced you as well as letting you know that automated software testing profession is a very hot industry today. The demand for human resources is knowledge and experience is great. So in the future, automated software testing is a profession that has huge potential. At the same time, we must also choose a tool that fits the needs of the project, not all tools meet all the requirements.