Software Cats - Blog
Testing

Part 1— Java Autotests for a Site from Scratch. What is This About?

What are UI tests, why do we need them, and what are the advantages of their automation?

UI (user interface) is what we see on the screen when we open a site: icons, buttons, pictures, and all this stuff.

To make sure everything works as it should (pages are opened correctly, buttons on a page are clickable, all the necessary information is in place, input fields are fillable), we need UI testing (testing of user interface).

Well, some sites are pretty simple indeed, but if we’re talking about online shops, marketplaces or aggregation sites, UI has a very high priority. User won’t buy anything if they can't choose an item, or read its description, or put it in their cart.

One might think: "How hard could it be? Just go to the site, click some buttons, fill in a few text fields, and make sure all the elements are in their places and work as they should." But consider this: with every site update you'll have to repeat all these operations on every page. That’s quite tiresome, to say the least. Not to mention how much time that takes!

And here is where automated tests can help us.

We can write a program to completely reproduce user's actions—to open a site in a browser, navigate on pages, click buttons, fill in text fields, and while doing so to check that all the actions give the correct result. Such a program is called an autotest.

And that’s what we’re going to create now, an autotest.