Home Testing of web services Does your project need tests?

Does your project need tests?

by admin

Does your project need tests?

Hi all, my name is I.T. Bruise!

Does your project need tests?

Lately, there has been a frequent question in my surroundings about The importance/necessity of tests.. And I decided to try to publish my current view of the situation (hopefully it will be a series of articles/videos), so that I can respond to my colleagues with a link to everyone’s favorite Hubr.

I’ll start, perhaps, with the memories.

I was standing in front of Lyd, still green, and I asked him:

Does your project need tests?

Why do we need tests?

And he’s backpedaling about their importance. Like in banks, every hour of site breakage costs a hundred thousand dollars and any opportunity to find a bug is worth its weight in gold to them, so it’s covered with tests all over the place!

and I keep asking questions :

And we have a site for renting apartments, we have very few users, why should we need it?

Leed realized that he couldn’t subdue and decided to explain how things were :

Remember when a new landlord registers on the site and indicates that he is from Yekaterinburg, we let him fill out a questionnaire.
Yes, the form we always forget about when we fix instances on the site and then the testers reopen the task for us many times
That’s right, that’s why I write the tests for this form, when you run the commit, the tests will run on CI and you’ll get an email telling you that you broke the questionnaire. And you, while you’re still in context, will fix it. All in all, it’s easier for you and the testing team will save time on reopening the ticket.

Does your project need tests?

Wow, you’re right, I hadn’t thought of that. – Young Bruise thought about it.
We also have a covered search for – Leed continued. We’ve collected statistics on which words and their abbreviations are used more often in searches. For example, instead of a two-bedroom apartment, they write a two-bedroom downtown. Our test checks the correctness of answers to the most popular queries, and this is very important for business, because according to the same statistics search is the most popular way to find an apartment, and this is equivalent to profit. As a result, the testing team does not need to double-check all of the search options with each release, and the business is happy with us, because the search has never failed.

Does your project need tests?

Right! – exclaimed the young Bruise. – I remember how excited the testing team guys were about it, I didn’t realize the importance of the moment at the time… And-and-and … The last thing I can’t understand is why StoryBook was needed for testing, how is that even related?
It’s simple, we have a calendar for selecting dates, it comes in a variety of ways, for selecting just a date or a date and time or selecting a date range. Exactly the same set of calendars with a different design is used in the admin panel. If you add a dark theme to it, we have almost 10 kinds of the same calendar.

Does your project need tests?

Therefore, it was decided to cover all states with the tests – Lid. continued. , so that no one accidentally redoing the calendar for the admin page of the site didn’t break it.That’s why we use StoryBook, which collects in one place all types of calendars in all states (open date list or already selected dates) and with the help of special tools make screenshots of these pages and save them to the project.
And after any changes in this calendar, our testers will compare the screenshot before changes and after and show what the difference is between them. This way we always know that nothing is broken, and it’s much easier for the testing team to review the StoryBook than to run all over the site to check if everything looks the way it was designed.

Does your project need tests?

Sounds like nanotechnology, comparing the two pictures, I’ll go see how it works soon! – Young Bruise squeaked enthusiastically.

That’s about how I was introduced to tests. That day I had the realization that tests can cover literally any project. Because any project has godforsaken pages, overused UiKit, and of course key functionality that brings in money.

Just think about it, if suddenly youtube stops giving out videos that are interesting to you, or Yandex Radio starts giving out rock music instead of hip-hop, and you get complete strangers in your Instagram feed. You can cover it all with tests and be cool with every release.

You may also like