by Diveria - Functional and Regression testing with Selenium

Functional and Regression testing with Selenium

In a previous post I’ve talked about load and performance testing, but there’s also another kind of test that’s necessary to generate a system according to the client’s needs.
Functional Testing focuses in guarantee that all the functional requirements of the application are done in the right way: from UI performance (ie: every web control works fine in any web browser) to check the communication correctness between the application’s modules or third-party modules (payment gateways, advertising, etc).
Regression Testing, in the other hand, guarantees that system changes (fixes or new functionalities) do not affect the already implemented (programmed and tested) functionalities. In other words: everything that was working before is still working fine now.
This kind of test can be done manually or automatically. The manual way can be used in small systems with minimal or nonexistent changes, where the necessary investment in time and resources to apply an automatic test is not justified. It can also be used to add the “critic eye” of a human tester just to make fine tune to a user interface. But when systems become bigger or it will be develop in stages, automatic testing becomes indispensable.
When big systems with many interaction workflows that encompasses a wide range of possible execution paths are tested manually, we trust completely in the tester’s hability to discover all the possible flows and provide a huge amount of test data.
That’s why automatic testing provides speed, reliability and reusability of tests (because the tester does not need to generate all the test runs when even a minimum system change appears), and it allows to run the test at any moment, as many times as they’re needed.
And here is Selenium to save the day! With this tool we can build a set of test able to be executed in a variety of web browser (and even more, in different versions of them) at the same time saving time and hardware resources.
What is Selenium then? To be precise, it’s a bunch of tools. Let’s talk about them now.
First, we have Selenium IDE, a Mozilla Firefox complement that allows us to record, edit, debug and play test in a very simple way: using mouse clicks, Selenium IDE is a powerful tool to generate quick tests without previous expertise. But it has a drawback: data and test flows will be exactly as we establish at the moment we record the test, so it’s not very useful if we need to test our application with different input data or many different work flows (we have to generate them one by one).
That’s why Selenium Web Driver was created. With this tool we can “program”(in C# or Java) a group of reusable functionalities and modules in a very simple way. Combined, they generate as many work flows as required. Even more, we can get flow data from files or databases, providing a virtually infinite set of use cases, quite close as a day-to-day system usage.
But be aware that program this “testing system” takes a lot of time and requires quite high skills of Java or C# (it depends on which Selenium functionality we will use). It’s essential to balance investment and resource consumption against the creation of a highly trustworthy application that can be adapted and changed in a reliable way.
And as the icing of the cake we have Selenium Grid, a server-based system that manages a group of nodes attached to it and allows to run parallel test in different workstations, operating systems, and different versions of different web browsers.
That’s why we have to use all the tools we have at hand to reduce risks, improve costs and keep our customers happy.

Comentarios