TestListener: execute before and after test method twice

UPDATE: It’s fixed. See below.

@ThanhTo @devalex88 I don’t see any difference in the two pairs of call stacks (they’re identical to mine, too). I was hoping to see an obvious culprit for the second invocation.

@mohammad.zaman Sit tight. The devs are getting some sleep. They’ll be back in around six hours or so.

@mohammad.zaman

Try this.

  1. Close Katalon and uncheck “Auto restore…”
  2. Reopen Katalon.
  3. Start a new project.
  4. Add a simple beforeTestCase method. Just a println statement.
  5. Create a test case that navigates to www.katalon.com
  6. Run it.

Let us know if the beforeTestCase method is executed twice.

If this works correctly, the cause points to something in your project.
If this fails, the cause relates to something in Katalon. Maybe :wink:

2 Likes

I did that and it only execute once.!
so, I did some investigation on TestListener class for new and old project and they are basically identical. I went back to old project and deleted the TestListener class and added a new one, now its execute only once.

I guess that old TestListener class did some voodoo…::wink:

Thanks for the suggestion its fix my issue. :sunny:

1 Like

Huh, that’s just … literally voodoo. I’ll look into the Auto Restore thing.

1 Like