DEV Community

Cover image for How to start in Automation Testing ✍
Pablo Hernández Castillo
Pablo Hernández Castillo

Posted on

How to start in Automation Testing ✍

Ahhhh ... The world of testing, is a place that can sometimes be full of chaos and sometimes it is the most peaceful place in the world.

We cannot deny that development tests are our daily bread, all additions or changes made to our software should be tested (in theory 😝), all development flow tests should be something implicit and not be something let it be taken lightly or left for last.

So taking this into consideration, this is where the automated tests start. We have all done tests after some change and validate if this had been done correctly; What automated tests provide us is that in the event that we are trying to validate a login, for example, entering username and password hundreds of times to verify that it is working, may be a matter that takes us, although not long, It can build up causing us to fall behind in some of our other tasks.

Automated tests help us to handle this in a simple way, with a simple script (now we will research a more about this), we can create a test which makes our validation tasks much easier. And perhaps we can think that this type of tests are only necessary for systems which are very huge, but this could not be further from the truth, because although we have a simple system which only consults an API and shows it, the Automated tests can allow us to execute infinite number of times in a period of time, and with this we validate if the call and query to the API is working correctly.

Automation is not further from as we know it, it will take care of doing the steps that we would normally do, that means that we must have a flow of steps to follow to complete a test, this is important to mention, since when We normally carry out tests, we do not take into account what steps we are following to validate that action, creating these tests also allows us to realize the flows that our systems have.

Previous knowledge 🧠

The creation of tests is extremely important therefore, we must know what flows we are going to apply and what steps are going to be followed, if we do not define this beforehand, it may take us even more time to want to develop tests in an improvised way.

Fortunately, automated tests can be developed in multiple languages, we can use anything from Python to Javascript, so with just having some knowledge in one of these languages we can start developing this automation.

In the case of the tests carried out on Front-End we can investigate about X-Path or CSS Selector To make use of the automation of elements found on our page.

Tools (for testing) 🔨

The most famous testing framework is SELENIUM this framework is in multiple languages. Some advantages of Selenium over other types of frameworks is the use of Selenium Grid, which allows us to execute multiple tests simultaneously in a very simple way.

Regarding the Javascript side, although we have Selenium, there are different types of tools, perhaps a little more updated, as is the case with Cypress, which is a tool that is constantly updated and provides us with a visual aid for the creation of the testing and selection of items on our page.

Alt Text

Cypress in the same way that Selenium gives us the ability to run tests in parallel with its Dashboard but that topic for another article.

Other tools that I also recommend knowing a bit are Mocha and Cucumber.

Conclusions 🔴

As we have seen, there are different automation tools and the one found in multiple languages helps us to go much further into learning this type of technology.

The tests in the development flow can be something very undervalued, however, they can assure us the quality of our systems.

So, what are you waiting for, automation is a very fun world with a lot of information to know much more.

Keep coding 😎

Top comments (1)

ajitkr09 profile image

if you know selenium i need some help only a bit