Software Test Automation
| Introduction | |
| WEB: mostly user simulation | |
| Choosing programming language | |
| API auto tests | |
| Performance testing scripts | |
| Integrating tests to CI/CD | |
| Related Articles |
Introduction
Usually, test automation means one of the following:
- Using software to simulate user actions on a website.
- Automatic API testing
- Writing scripts for performance testing
- Integrating test scripts into an existing CI/CD process.
WEB: Simulating user actions
A more modern library for browser simulation - PlayWright
In website automated testing, or as it can also be called - Web UI Testing,
everything was mostly tied to
Selenium
You can learn this library and use it together with one of
the following programming languages:
Choosing a language
Since Selenium works with completely different programming languages,
a beginner tester may face the question - which of them to
learn for automation.
If you already work as a tester and want to start automation in the same company -
this question can be answered by a
DevOps
engineer or whoever performs this function, a sysadmin or one of the developers.
The deciding factor is the existing infrastructure. Your automated tests will be integrated
into the existing CI/CD process, and it is desirable to do this in the most organic way.
If everyone uses, say, Maven, then it is desirable to write tests in
Java
and if
Ruby
is used everywhere, then you should perhaps take a closer look at Watir and not pure Selenium.
What to do if you don't work anywhere yet?
I advise you to study job sites and learn the combination that is in greater demand.
I have used the following combinations
- Selenium + Java
- Playwright + Python
- Selenium + Python
- Selenium + Robot Framework
- RFBrowser + Robot Framework
I chose Python because I knew the language a little + it appears in many job postings.
I chose Java because it is the most native language, part of Selenium is written in Java + there
are quite a few tutorials on the Internet for this combination.
Selenium
You don't have to learn Selenium itself. There are several higher-level frameworks
with «simpler» commands, designed for non-programmers.
The most popular of them is probably
Robot Framework
There is also
Watir
Cucumber
and others.
Automatic API testing
The first step to automatic API testing is learning
how to call APIs using some tool.
How to access the REST API using
Python 3
you can learn
here
Examples of calling the GitHub API with
curl
you can study
here
Writing scripts for performance testing
In this discipline, you will need knowledge of at least one programming language.
The choice is wide and depends on the company's stack. But in general it can be both
Bash Scripting
and
Python
or
Golang
An example of the simplest
Bash
script that monitors the system state you can study
here
Integrating test scripts into an existing CI/CD process.
This is a completely different story, and you need to learn the tool that is used for CI/CD . It could be
- TeamCity
- GitLab
- Jenkins
or something else.
The ability to properly integrate your tests is the first step towards DevOps
Article author: Andrei Olegovich