Share
x
Share
x

A thousand tests: the world of software testing

15/11/2023

Mid-October, an autumn day. It’s raining outside and you’re grateful to be working remotely. Music in your headphones helps you focus. Fingers tapping on the keyboard.

Suddenly, an email notification breaks your concentration from the code that, strangely enough, wasn’t behaving quite right: another pull request had been merged into the main branch.

But this one was special. The release pipeline had successfully run 1,000 tests. Message to the team. A tray of croissants to celebrate the milestone 🥳.

That morning at Aton, when we realised we had reached 1,000 tests in the backend codebase, went more or less like this. It was a small but meaningful achievement, made possible by a journey and a shift in mindset that I’ll try to share with you in this article.

Let’s begin!

What’s the point of writing a test?

Test Aton - Immagine di blossomstar su Freepik

Tests and TDD (Test Driven Development) are widely discussed across the tech community, with a substantial body of literature on the subject. Stripped right back, writing tests means writing code that verifies and locks in the behaviour of other code.
Verifying behaviour means checking that, given a certain input, you always get the same output—both in the simplest, most linear cases and in the trickier, more deceptive ones. It also lets you confirm whether what you’ve written actually matches the specifications defined during the analysis phase.
Locking things in, on the other hand, matters even more for keeping a codebase maintainable. A codebase evolves over time and is used by multiple people at once—who may change shared or legacy logic. Having tests as a record of what’s been done gives developers confidence that what they implement won’t break compatibility with what already exists.

None of this comes for free. Writing tests also means stretching development time to include activities like test setup (e.g. mock data, database seeding, configuration parameters), the tests themselves, and fixing business logic when—inevitably—some tests fail.

At the same time, this extra development effort pays for itself when the code doesn’t blow up in production and saves the developer a few sleepless nights of debugging.

OK, that’s the theory. But how do we write tests at Aton?

Testing as part of the development process

Since we began developing new product lines at Aton using modern technology stacks (Java/Kotlin and Spring Boot for the backend, and Angular 2 for the frontend), writing tests has become part of our developers’ daily routine.

Wherever possible, we aim to follow TDD: given a feature, tests are written first, and only then the business logic for that feature. Once development is complete, the tests are run to check whether the behaviour defined at the start is respected by the implementation.

If all tests pass, the feature can be considered complete.

If some tests fail, there are two possible reasons:
1. The implementation does not comply with the specifications—for example, it doesn’t handle certain corner cases or it returns a data set inconsistent with expectations;
2. The test definition is wrong—meaning the tests don’t reflect the specifications, or they were created with input data that doesn’t match the expected output.

Test software life cicle - Aton - Immagine di macrovector su Freepik

Regardless of the reason why tests have failed, the developer must go back into the code to ensure that all the tests relating to the feature under development turn green. Once this happens, the work can be considered complete and the developer can open a pull request with the changes.

This is when the second phase of the backend development process comes into play.
Creating a pull request triggers a pipeline in Azure DevOps which diligently runs the tests for the new feature as well as for all existing ones. This step ensures crystallisation: it checks that the new logic doesn’t conflict with what is already in place.

If something breaks, the pipeline stops and prevents the release from being merged into the main branch.

What will testing look like in the future?

Writing tests has brought great value to Aton, and we intend to continue supporting this practice over time.
That said, the way we write tests may not remain the same forever.

The topic of generative artificial intelligence—and how it can become a tool to support developers (and beyond) by boosting productivity—is widely discussed and highly relevant within the tech community.

Among all the tools currently available, GitHub Copilot is certainly the most useful for professional coders—even when it comes to writing tests. By providing the right context, GitHub Copilot can generate unit tests (and other types) for a given feature.

Using this approach comes with a number of pros and cons:

👍🏻 Shorter development times. Developers spend less time writing tests and more time on business logic.
👍🏻 Unforeseen test cases. AI can generate test cases the developer may not have anticipated, thereby strengthening the codebase.
👍🏻 Unbiased test cases. Developers often feel attached to their own code and may end up writing conservative tests that don’t really challenge it—especially when the same person both implements the code and writes the tests.

👎🏻 False sense of security. AI-generated tests must always be reviewed by the developer to correct any misinterpretations or overly vague contexts.

Whether this will become the definitive path for testing is something we cannot know for now.
However, at Aton we have already launched research and development activities focused on GitHub Copilot to understand the impact it could have on a developer’s daily life.

Final thoughts

If, at the beginning of this article, you were wondering why we celebrated the arrival of the thousandth test so much, it should now be a little clearer.

A thousand tests are not just a statistic, but the sign of a journey that has changed the way we work. A journey that is gradually industrialising the development process at Aton and that, thanks to testing, enables us to produce quality software.

If you are still asking yourself whether writing tests is worth it, at Aton we can answer: yes, it is.

It’s worth it because it changes the way you work. It’s worth it because it changes the way you think. It’s worth it because it improves the quality of the code you write. It’s worth it because it gives you the certainty that what you’ve written doesn’t break what was already there. And it’s worth it because, in the end, seeing all those green ticks when the tests pass gives you a pretty good dopamine hit!

 

linkedin-icon-img instagram-icon-img facebook-icon-img

ATONEWS
People at the centre
How AI improves invoice reconciliation in grocery retail
Retail · Retail management·Tech
Giorgio De Nardi
How AI improves invoice reconciliation in grocery retail
08/08/2025
Learn more
Retail intelligence: real-time insights and reporting with .one Retail
Retail · Retail management
Cristiano Negri
Retail intelligence: real-time insights and reporting with .one Retail
03/07/2025
Learn more
Aton is a Great Place to Work for the sixth year
People
Giulia Stefano
Aton is a Great Place to Work for the sixth year
26/06/2025
Learn more
Data-driven marketing: the new strategic lever for retail
Retail · Retail management
Cristiano Negri
Data-driven marketing: the new strategic lever for retail
24/06/2025
Learn more
Loyalty, promotions and gift card management in .one Retail
Retail · Retail management
Morena Barbisan
Loyalty, promotions and gift cards in .one Retail
23/06/2025
Learn more
Invoice reconciliation with .one Retail - Aton
Retail · Retail management
Cristiano Negri
Invoice reconciliation with .one Retail: AI that slashes costs in the supermarkets
22/05/2025
Learn more
CASE STUDY
Here are some of our experiences
Read
caffè-vergnano-case-study-aton-img

Caffè Vergnano

Food & Consumer Goods
Today Caffè Vergnano is present in 19 regions with more than 4,500 Ho.Re.Ca. customers and worldwide with more than 70 locations in 19 countries. Such an extensive sales network…
Discover more
Read
banner-shv-case-study-aton

SHV Energy

Energy
In a single web console, the company records data, manages orders, schedules supplies and maintenance, and ensures that all these operations are immediately and automatically reflected in the management system.
Discover more
Read
gruppo-poli-banner-img

Gruppo Poli

Retail Vendite Omnichannel
Poli has combined tradition and innovation in its way of doing business with a focus on employees, customers and the local area. In Aton, it has found a…
Discover more
Read
cattel-banner-img

Cattel

Food & Consumer Goods Vendite Omnichannel
Cattel S.p.A, a leading company in Northern Italy in the distribution of food products in the Ho.Re.Ca channel has profoundly transformed the order collection by adopting the Aton .onSales B2B solution.
Discover more
Read
faster

Faster

Industrials Supply Chain Solutions
All projects, whether successful or not, have stories to tell. A difficult uphill start, a start full of hope, repeated twists and turns where the viewer is swept away by…
Discover more
Read

Moncler

Fashion Service Desk
Aton ServiceDesk is also behind the scenes in the first Boutique entirely dedicated to the Moncler Enfant collection, opened at the historic premises in Milan, Via della Spiga 7, which has been…
Discover more