Improving Unit Test Maintainability

When doing unit tests, you have probably found yourself in the situation of having to create objects over and over again. To do this, you must call the class constructor with the corresponding parameters. So far, nothing unusual, but most probably, there have been times when the values of some of these fields were irrelevant for testing or when you had to create nested "dummy" objects simply because they were mandatory in the constructor.

All this has probably generated some frustration at some point and made you question whether you were doing it right or not; if that is really the way to do unit tests, then it would not be worth the effort.

Testing Iceberg

Anyone who has done some test automation or has searched for information about the subject will have come across the famous "Testing Pyramid" more than once.

This figure represents the "ideal" way to distribute the automatic tests of a system in its different layers. Where the width, indicates the number of tests that should exist about the different levels.

Improve Microservice Testing With Contract Testing

Today, it is strange to find a system built in a "monolithic" way. It is becoming more common, because of the advantages that this involves, to divide it into smaller components that communicate with each other to meet the expected needs.

This means that the functionality is not concentrated in a single point, but it is the collaboration of all the parties that gives meaning to the system.

Email Test Automation With Mailtrap

In most of the applications that we use today, the use of email continues to be an important part of many of the main functionalities that these systems offer us. Whether it's to register as users, recover a password, receive reports, invoices, flight reservations, accommodations, or anything else, sending emails is something that is still closely linked to the core functionality of many systems.

On the other hand, email is something that has been around for a long time. This is why we often overlook tests where sending emails is involved, either because of the complexity of the task or because we assume that there will be no errors. However, there are certain scenarios where it is advisable to perform some minimal tests. For example, some elements that you should want to check might be: