Automated testing only by professionals
In the previous post, I presented the manual test technique. Basic usage, strengths, and usefulness in building product quality. Now I will focus on the second test technique, automated testing.
What are we talking about?
Automated testing is a process of verifying that your software is working correctly and meets requirements before it goes into production. This software testing method uses script sequences that are executed by testing tools. These tools perform software tests, report them, and compare the results to previous test runs.
Let's look at automated tests from a broader perspective. These tests are divided according to their goals and tasks that they must meet. We can list these goals here:
Unit tests - they test one selected functionality of the application. Most often, it is one function/method or a single module. Such tests take place in a completely isolated environment, which means that no other factors affect the code we are testing.
During unit tests, we give the test initial state known to us (e.g., arguments for a function) and the result we expect after performing the test.
Several aspects are essential in this type of test. These tests must be very fast, straightforward to understand, and, in the event of errors, provide clear information on when and why the test failed. "Developer testing" is the second name of unit testing. Such tests work like instant feedback during development.
Integration testing allows us to test how different parts of our application work together. They check whether individual elements work well with other parts of the code. In integration tests, we check the correct operation of the elements of our entire system. We test things such as proper connection to the database, API endpoints, Magento, and correct integration with 3rd party elements such as google analytics, payment gateways, etc.
E2E (end-to-end) tests, check our application’s functionalities from the user's perspective. Such tests are often found in web applications (ecommerce), where automatic tests simulate user actions and verify the correct operation of complete test scenarios. Examples of such activities include:
- going through the entire shopping path, from choosing a product to ordering a product and paying,
- user registration and login, filling forms, etc.
In what cases can they be useful?
First of all, in regression tests. These are the tests carried out after changes and modifications to the application. It is a very time-consuming process due to the requirement to check all of the application's functions after making changes. Well-prepared and updated scripts will save time for test execution, reduce labor costs and provide instant feedback (whether the tests were performed correctly or not).
Automated tests are also useful for handling repeatable test cases. For example for customer registration tests, order tests, etc. Often test paths remain constant over a long period of time. However, you must remember to keep your finger on the pulse and update your automated scripts.
Another case is the elimination of the human factor. Since automated tests are powered by tools and scripts, the probability of a manual tester missing a bug or defect is reduced. Thanks to this, the testing process is more reliable, less time-consuming, and reduces testing costs.
GUI tests for advanced
Automated GUI tests detect and record differences in behavior across platforms - for example, across web browsers or operating systems. Besides, automated GUI testing efficiently detects regression errors. Thanks to such tests, we can simultaneously test our product on the most popular web browsers and mobile devices.
This is a considerable saving in working time. Automated scripts can perform these tests in minutes. Manual tests on several browsers and several mobile devices would take several hours.
We already know what automated tests are all about. We know how to use them and when it is best to introduce them.
In a future article, we will discuss the main differences between manual and automated tests, as well as the costs of introducing and conducting them.
We will also try to answer the question of which type of tests best suits your projects.
Contact with: Sebastian