Reg.: Reporting for nested test cases in the reports

Hi Experts, need help

I have nested test-cases, i.e., test-case#1 calls test-case#2, and in turn test-case#2 calls test-case#3 & so on…

However, in the test-reports it shows only test-case#1

How to report all the nested test-cases ?

Kindly suggest, many thanks

2 Likes

Problem Analysis

You’re experiencing a common behavior in Katalon Studio: when test cases are called within other test cases (nested structure), only the parent test case appears in the test report, not the called test cases. This is by design—called test cases are executed as test steps within the parent test case, not as independent test case executions.


Solutions

Solution 1: Add All Test Cases Directly to the Test Suite (Recommended)

This is the most straightforward approach if you want each test case to appear as a separate entry in the test report.

Steps:

  1. Open your Test Suite
  2. Click Add to add test cases
  3. Add Test Case #1, Test Case #2, and Test Case #3 as separate test cases in the suite (instead of calling them from within each other)
  4. Execute the test suite
  5. All three test cases will now appear as separate entries in the test report with individual status, timing, and logs

Advantage: Each test case has its own execution status, detailed logs, and timing information in the report.


Solution 2: Keep Nested Structure but View Called Test Case Details

If you need to maintain the nested structure for code reusability, you can still see the details of called test cases in the test logs:

Steps:

  1. After test execution, open the Test Report
  2. Navigate to the Test Log section for the parent test case
  3. Expand the test steps to see detailed execution logs of the called test cases
  4. Each called test case will appear as a test step with its own execution details, including:
    • Step name (the called test case name)
    • Execution status (Passed/Failed/Error)
    • Duration
    • Detailed logs and screenshots

Advantage: Maintains code reusability while providing visibility into nested test case execution.


Solution 3: Combine Both Approaches

For comprehensive reporting:

  1. Add the parent test case to the test suite (Test Case #1)
  2. Also add the child test cases directly to the test suite (Test Case #2, #3)
  3. Keep the nested calls within Test Case #1 for reusability
  4. This gives you both the nested execution flow AND separate test case entries in the report

Key Considerations

Why Called Test Cases Don’t Appear as Separate Entries:

  • According to Katalon’s documentation on calling test cases, when you use callTestCase() or the “Call Test Case” step, the called test case is executed as a test step within the calling test case, not as an independent test case execution.
  • This is intentional design to support code reusability and modular test structure.

Test Report Behavior:

  • The test report summary shows only the top-level test cases that were directly added to the test suite
  • Called test cases are visible in the detailed test logs as individual steps
  • When viewing test reports, you can expand each test case to see all nested steps and their execution details

References

1 Like

Let me add a bit of explanation.

I made a series of nested test cases. TC1 calls TC2 which calls TC3. A Test Suite calls the TC1.

When I ran the Test Suite, I got the following HTML report:

At a glance, only TC1 is included in the report. TC2 and TC3 seem not to be there.

However, the row of “TC1” contains the information of the “TC2” collapsed. The row of “TC2” contains the information of the “TC3”. You can extend the container rows by clicking as follows.

I think that this design of HTML report is good enough.

@anandkumar.venkatara

You don’t like this report design, do you? If so, please explain why and how you want it to be like.

2 Likes

@anandkumar.venkatara

Katalon’s built-in callTestCase(…) treats nested calls as part of the calling test case. That means the Test Execution Report (and TestOps test-case list) shows only the top-level test-case run. To get separate entries for the nested test-cases you must run them as independent test items (Test Suite / Test Suite Collection) or explicitly create separate result entries yourself.

Recommended approaches (pick one depending on your needs)

  1. Run every test case as a separate test item in a Test Suite (recommended)
  • Create a Test Suite that includes test-case#1, test-case#2, test-case#3 (order them so dependencies are preserved). When you run the Test Suite each test case produces its own report entry and status.

  • If you need grouped runs, use a Test Suite Collection to orchestrate multiple Test Suites.

When to use: you want standard Katalon reporting (html, junit, TestOps) with separate pass/fail per test case.

  1. Keep callTestCase but convert nested test-cases to independent test items at runtime
  • Instead of using callTestCase for anything you want reported separately, include those called test-cases in a parent Test Suite. If you still want a single “master” flow, you can write a small driver test-case that triggers test-cases by calling the Test Suite via the CLI (less common).
  1. Enhanced logging inside callTestCase (if you cannot restructure)
  • callTestCase will still show a single test-case entry, but you can make the report more informative by adding explicit logging at start/end of each nested test-case. Those logs appear in the HTML report and test logs, but not as separate test-case rows.

  • Example (inside each test case):

    • import com.kms.katalon.core.util.KeywordUtil

    • KeywordUtil.logInfo(‘START: TC-002 - Verify Login’)

    • KeywordUtil.logInfo(‘END: TC-002 - Verify Login - PASSED’)

  1. Push custom results to TestOps or external reporting (advanced)
  • If you use Katalon TestOps and need hierarchical/child test items, you can use the TestOps REST API (or any custom integration) to push custom test result items from inside a nested test-case. This requires implementing calls to TestOps API or your reporting backend in a custom keyword.

  • Use this when you need to keep callTestCase structure but still require separate test items in TestOps or a custom dashboard.

Concrete options and samples

A) Quick fix: change how you run tests

  • Stop running just test-case#1. Put test-case#1, #2, #3 into one Test Suite and run the Test Suite. Each test-case will be reported separately.

B) Logging improvement (simple custom keyword)

  • Create a keyword to log start/end; call it at the beginning and end of each test-case. Example (Groovy / Katalon):

// Keyword class (Groovy) package custom.logging

import com.kms.katalon.core.annotation.Keyword import com.kms.katalon.core.util.KeywordUtil

class TCLogger { @Keyword def startCase(String id) { KeywordUtil.logInfo(“— START ${id} —”) }

@Keyword
def endCase(String id, boolean passed=true) {
    if (passed) KeywordUtil.logInfo("--- END ${id} : PASSED ---")
    else KeywordUtil.markFailed("--- END ${id} : FAILED ---")
}

}

  • Usage inside a test-case: import custom.logging.TCLogger new TCLogger().startCase(‘TC-002’) // … test steps … new TCLogger().endCase(‘TC-002’, true)

Note: These appear in the test case log and HTML report, but they do not create separate test-case rows in the Katalon generated report.

C) Advanced: push separate results to TestOps

  • If you need actual separate test-case objects in TestOps for nested steps, implement a custom keyword that calls the TestOps API to create test items / send test results. Refer to TestOps docs for Test Results API and authentication. (If you need code for this I can provide a sample.)

Which approach to choose?

  • If you want simple, standard reporting per test-case: restructure runs using Test Suites (option 1). This is the simplest and most maintainable.

  • If you must keep nested callTestCase architecture but need better visibility: add structured logs (option 3) or push results to TestOps with a custom integration (option 4).

Hi Kazurayam, Im expecting something like this

Kindly refer to the attached and let me know

1 Like

Thanks everyone for your valueable replies

Passed 1
Here, in the test ops report, I want say 10 or 15, as the case maybe, instead of 1

In that case, you need to stop nesting test cases using the callTestCase keyword. You need to bind your 10 or 15 test cases in your test suite.

But I wonder why you want to see 10 or 15 instead of 1 here. Do you really need it? Why?

In my case, I would be interested only in the number of Failed test cases in a Test Suite; if it is 0 or >0 (more than zero).

If the number of Failed test cases is 0, I would be happy and go home.

If the number of Failed test cases is >0, regardless how many, I would continue working to fix all the failures until I see 0. The exact number of Passed/Failed test cases doesn’t really matter to me.

1 Like

ok thanks Kazurayam

I will check

1 Like

Respectfully, AI has come up with a misleading answer here:
Solution 1: Add All Test Cases Directly to the Test Suite (Recommended)

Any test case that cannot run as a standalone test cannot be added to the test suite without further work (eg any web test that lacks an ‘Open Browser’ step for example). The answer above is correct if the user wants to see a clear pass/fail for that part of the process but I thought it was worth pointing out that they might need extra work to do so, since there are always some tradeoffs in every approach!

Thanks everyone for your valueable answers

1 Like

Hi @anandkumar.venkatara,

Have you found the answer for your issue? Feel free to share the workaround and mark the solution for reference to others. Thank you