Time-sensitive web tests


I’m relatively new to Katalon and I’m trying to make a test suite for a website supporting job seekers and employers. A problem I’ve encountered is using the web recorder and clicking on buttons that may be “time sensitive” - ones that may disappear at some point, which means these tests will not run properly in the future.

For example: there is a tab called “upcoming jobs”, under which I can click to see the applicants for a particular job. If I click on the check applicants button while recording the test, it works fine, but it won’t work once the job is completed and no longer under the upcoming jobs tab.

I haven’t found a way around this issue. Can anyone help?

Well, you should step back and see your issue in a far wider scope.

You have to study the term “Test Fixtures”. Possibly you should buy some book that explains what “test fixtures” mean. I made a quick search and found one: “Selenium Design Patterns and Best Practices”

Quote from the book:

Introducing test fixtures

In software development, test fixtures (fixtures) is a term used to describe any test data that lives outside of that particular test, and is used to set the application to a known fixed state. Fixtures allow us to have a constant to compare individual test runs against.

Fixtures work best in any environment that is high on the accessibility scale. If we are testing on the localhost or in the CI environment, we can start with a completely empty test database and fill it up with fixture data. When the tests are ready to run, the tests will know the exact state of the application, how many registered users we have, prices of every product, and so on. Let’s take a look at a sample fixture, which was used to create a product on our website …

I think these sentences suggest something to you, @denis. But I haven’t read this book. I am not sure if the book is good for users who are now looking at Katalon Studio.

Katalon Studio is a product that puts forcus on a narrower scope of problem domain: automated UI testing. KS would not provide any immediate answer to your issue: how to manage Test Fixtures.

I would warn you, it is a tough task to manage test fixtures of a web application. It may require you to be a full stack engineer who can solve every technical problems yourself.

Alternative approach of UI testing would be possible.

You can change your mind. Do not check the content of the page in detail. Make your UI testing less strict. For example, just navigate pages and check if pages looks (though ambiguously) ok while taking screenshots as evidences.

Loose UI tests can still be valuable. When your web system goes down, your continuously-executed UI test can detect the failure and notify you of the unexpected incidents via email. This automation would relieve developers of some pressure. It’s good, isn’t it?

Once you have got some experience of developing automated UI tests, you may find how to make your tests one step stricter but without diving into a heavy exercise of test fixture management.

1 Like