Test Listners are running for each call TestCase when Actual Test case has couple of Call Test Case


The below is my structure of code.

1. Call Login Test Case
2. Call Book Appointment Test Case
3. Call Logout Test Case.

I expected that once all three activity completed it should get the status of the Test case but it run Step 1 (Calling Test case) then TestListeners and then Step 2 (Calling Test Case) then TestListeners and finally Step 3 and then Test listeners…

I wanted to run once all the steps completed only… How to restrict that?

How to use Test listeners when I have multiple call Test case in my original Test case

We have fixed the issue in the release 5.4, which is supposed to be avaiable within the next 2-3 weeks. Hope that it will help solving your case.

Thank you

I actually wanted the opposite situation, I want to capture the status of each test case that is called from a parent test case, either:

  1. A @AfterTestStep is required?
  2. otherwise @AfterTestCase could have it’s testCaseContext enhanced with a getParentTestCaseId(), this would return null? if the test case was executed or called from a test suite, and only contain a value if called by callTestCase() from another test case

At the moment I can’t see how I can get this information as when searching for a way to get the current status of a test case all forum posts refer to Test Listeners, but as discussed above Test Listeners are only currently executed for Parent Test Cases, not child (called) Test Cases

1 Like

The original query is fixed… Thank you team

1 Like

I would like to have the opposite functionality possible as well, this is, having the Test Listeners triggered after each Call Test Case step is executed.

After the fix, is that still possible in another way?