Katalon creates different results in Test Suite

There is nothing wrong with doing that. I never use the spy tool.

By the sound of it, you are using a POM (page object model). Good.

Not sure I’d describe it as an issue as such, but yes, unfortunately, “things change” because a website “evolves” over time. Tests need to reflect the current state of the website.

However, take this advice on board: Make your selectors as SHORT and generic as possible. This is an art and a science. Too generic and they may become flaky; too short and they may become brittle/volatile; all down to changes in the document hierarchy and structure. Long selectors are pretty much guaranteed to fail sooner.

A conversation with the page developers is vital and helpful. It’s to their benefit to know which CSS ids and classes you are relying on to create and operate test cases. Since you are using a POM, make sure that a given page object has all the child elements’ xpaths stored as member variables:


public class Mypage extends Basepage {

  String xpathBtnHome = "xpath to find the home button"
  String xpathFirstName = "xpath to find the first-name field"
  String xpathLastName = "xpath to find the last-name field"

  // etc
}

Following is a link to a post by @Brandon_Hein that shows this model in much more detail:

Without seeing your tests and test suites it’s hard to pass comment on your use case. Very much depends on your intentions for coverage. In my world, I aim to cover “user stories”. For each Test Case, I try to capture an entire user story from one end (login) to the point where they have completed the task. If, for you, that results in 800 tests, that’s fine. If you have issues, post a question!

1 Like