Teaching test automation to a beginner
Teaching automation testing to a beginner. What is it, how to do it, and why Functionize makes it easy to create good tests?
How to explain test automation to a complete beginner
Do you remember the first time you created an automated test? Or perhaps you’re such a grizzly, seasoned veteran you can’t remember that far back. Either way, everyone began somewhere. In this brief blog, we look at how you can help teach test automation to a complete beginner.
Nightmare! You have been given the dubious honor of hosting the work experience kid. How would you go about first explaining test automation and then teaching her the basics? Here we answer the five main questions. Why do we test? What makes a good test? What is test automation? How do I choose a tool? How do I write my first test? We will focus on web and mobile applications since those are what every teenager is familiar with.
Why do we test?
Testing is the process of trying to check every part of an app to try and avoid bugs or bad user experience (UX). A bug happens when the app does something it wasn’t meant to. This may result in the app freezing or even crashing (where it closes itself). But there are more subtle bugs, like the app giving you the wrong result. Bad UX is things like apps that run really slow. Or apps with buttons that don’t behave as you expected them to. For any software company, it is essential to test every app thoroughly to try and squash all these bugs and improve the UX. Otherwise, they will find themselves with a 1-star app that bombs on release.
What makes a good test?
First, imagine you are the most finicky and annoying user ever. You want to try out absolutely everything in the app, and if there is a button, you are going to press it! Now, this approach will stand a good chance of finding out if there are any bugs. But your job is more than just finding the bug. You also have to tell the programmers how that bug was triggered. Or as they say, the steps to recreate the bug. This means you need to be much more careful in your approach. You need to plan the order in which you will push buttons and write this down. At every stage, you should check whether anything odd happens. In other words, you need to know what the app is meant to do before you can test it.
What is test automation?
Manual testing (which is the sort of testing we described above) has a major flaw. It is really slow! Even a simple app can take days and days to test properly. So, how can we speed things up? The answer is to use some form of test automation. Here, instead of testing the app yourself you will tell a piece of software to test it for you. Test automation software is conceptually very simple. You tell it what buttons to press, and what information to enter into any text boxes. Then you explain what the result should look like. The software will report a test failure whenever the result is different.
What is the best test automation tool?
The traditional way to do test automation is to use Selenium. This piece of software uses computer scripts to interact with your app. At each step in the test, you tell Selenium to select the correct element (button, text field, etc.), then you tell it what action to perform. But Selenium is really stupid. Getting it to choose the correct element is really hard. And when it gets it wrong all your tests fail. A more modern approach is to use artificial intelligence (AI) to improve the testing. The simplest AI-accelerated test software just makes it easier to select the correct element. For instance, an intelligent test recorder lets you create the test by actually clicking on all the right elements. Then it learns from what you did and converts that into a test script.
More advanced systems, such as Functionize, allow you to skip the whole issue of test creation. Our tests are powered by an intelligent test agent. This makes it really simple to create a new test, and even easier to check the results of tests.
How do I create a test in Functionize?
We write our tests in English. Remember that list of steps you wrote down for the manual test? Well, you can just give this to NLP engine, and it will create the test for you. Then you need to give the intelligent test agent several tests so that it can “model” your app. This means letting our ML engine learn how your app is meant to work. This means that when it runs the tests, it will spot every error (and not just the ones you tell it to look for!). Finally, you can run the test. Afterward, you will be able to see screenshots for every single step in the test. These will show you what the screen looked like before, during, and after that step. The system will draw a box around anything on the screen that looks wrong/unexpected.
Functionize tests give you lots more advanced features. These include Self-healing Tests, Root Cause Analysis, and intelligent performance metrics. But an absolute beginner will find these topics too advanced. You can find out more about them in our other blogs or by reaching out to us for a demo.