How to generate reports like QAF

I have a BDD Feature file with multiple scenarios that I call via test case, then via test suite to run and generate reports

So for instance :
Feature file →
Feature: Example Feature

@scenario1
Scenario: First Scenario
When I call for the “firstRequest” request

@scenario2
Scenario: Second Scenario
When I call for the “secondRequest” request

Test case →
CucumberKW.runFeatureFile(‘Include/features/myFeature.feature’)

Then i call the test case on test suite

The report generated only counts the test case which is 1. and logs the subsequent scenarios as test step

My question is how can i count the scenarios or even make the scenarios be read as test case like on QAF , Because on QAF each scenario is counted as one test

1 Like

QAF stands ?

Looking into Katalon’s documentation, there’s a way to use CucumberKW.runFeatureFileWithTags() which allows specifying tags. So instead of running the entire feature file, the test case can run a specific scenario by its tag. By parameterizing the tag, the test case can be reused for each scenario.

Therefore, the solution involves parameterizing the test case with scenario tags and creating a data-driven test suite that runs the test case for each tag. This should result in each scenario being treated as a separate test case in the report.

To achieve scenario-level reporting in Katalon Studio , let’s try to use this workaround:

:one: Solution Architecture

Feature File (Scenarios) → Test Suite (Data-Driven) → Individual Scenario Execution → Separate Reports

:two: Step-by-Step Implementation

A. Modify Your Feature File

Add unique tags to scenarios:

@scenario1
Scenario: First Scenario
When I call "firstRequest"

@scenario2
Scenario: Second Scenario
When I call "secondRequest"

B. Create a Parameterized Test Case

  1. Create a new test case (e.g., BDD_Scenario_Runner):

groovy

// Test Case Script (Groovy)
def tag = (String) CustomKeywords.'com.kms.katalon.core.testobject.ResponseData.getKeywordTestProperty'('tag')
CucumberKW.runFeatureFileWithTags('Include/features/myFeature.feature', tag)
  1. Add a “tag” variable in the test case’s Variables tab.

C. Create a Data-Driven Test Suite

  1. Create a test suite
  2. Add a data file (CSV/Excel) with scenario tags:
tag
@scenario1
@scenario2
  1. Configure the test suite to iterate through rows:
    Test Suite Data Binding
  2. Add BDD_Scenario_Runner test case and bind the “tag” parameter:
    Parameter Binding

:three: Execution & Reporting

  • Before:
Test Suite → 1 Test Case → 2 Test Steps
  • After:
Test Suite → 2 Test Cases (1 per scenario)

Scenario-Level Reports

:four: Alternative Approach: Manual Test Case Creation

If you have few scenarios, manually create test cases for each tag:

groovy

// Test Case for Scenario 1
CucumberKW.runFeatureFileWithTags('Include/features/myFeature.feature', '@scenario1')

// Test Case for Scenario 2
CucumberKW.runFeatureFileWithTags('Include/features/myFeature.feature', '@scenario2')

Key Advantages:

  • :white_check_mark: Accurate Scenario Count: Each scenario appears as separate test case in reports
  • :white_check_mark: Traceability: Directly map failed tests to specific scenarios
  • :white_check_mark: Data-Driven Scaling: Easily add new scenarios via CSV updates

Limitations to Note:

  • :warning: Requires Katalon Studio 8.0+ for full tag-filtering support
  • :warning: Test case names will show the same script name (use dynamic reporting plugins for custom names)
1 Like

Hi @michael_joseph_polin,

Welcome to our community. Thank you for sharing issue.

In Katalon Studio, when you run a feature file using CucumberKW.runFeatureFile(), all scenarios within the feature file are treated as test steps rather than individual test cases. This is why the test report only logs a single test case instead of separate scenarios.

I would like to suggest some of the following workarounds here:

1. Run Each Scenario as a Separate Test Case

Instead of calling CucumberKW.runFeatureFile() at the test case level, use CucumberKW.runFeatureFileWithTags(), which allows running individual scenarios separately.

Example:

CucumberKW.runFeatureFileWithTags('Include/features/myFeature.feature', ['@scenario1'])
CucumberKW.runFeatureFileWithTags('Include/features/myFeature.feature', ['@scenario2'])

This way, each scenario will be executed as an individual test case.

2. Use Test Listeners to Modify Reporting

You can create a Test Listener to modify how results are logged, ensuring each scenario appears as a separate test case in reports. However, this requires custom handling.

3. Use a Different BDD-Compatible Framework

Since QAF treats each scenario as a test case, you may consider using QAF with Katalon or an alternative framework like Karate or SpecFlow, which natively report scenarios as test cases.

Hope this can help you. Thank you

1 Like

@michael_joseph_polin Please let us know on your query resolution

still awaiting post approval for my replies

thank you for your response, some of the images are broken , so the work around is on the test case and test suite level, i was wondering if i can somehow override the reports using test listeners

i was wondering how can i do your second suggestion of using Test Listeners to Modify Reporting, can you point me to some resources or guide me on how i can do this, i have done my research but what i have come up is creation of custom reports but not the modification, it would be nice if i could just modify the default reports generated by katalon, since it would also save execution time

Greetings to all testing and quality assurance specialists!

Today I want to discuss the topic of generating reports similar to QA (Quality Assurance Framework). Have any of you already encountered the creation of such reports or use them in your work?

Please share your experience.:

What tools or platforms do you use to generate reports?

What key metrics and data do you include in your reports?

How can I automate the reporting process to save time?

It is also interesting to know how you visualize data (graphs, charts) and what patterns you use for ease of perception.

@Russ_Thomas once posted this:

He reported that he created a custom report of the productional quality for him in Katalon Studio. As far as I am aware, in this forum, he is the only one who managed it.

1 Like

sadly he did not post any code on how he did it, just the the general idea of how he did it, which brings us back to my post regarding on how to do it

See my previous post:

The project is a public GitHub repository of which Source.zip is downloadable from Release refactored to publish PlainReport · kazurayam/kazurayam-ks-plainreport · GitHub

The report is in JSON. like this:

This JSON is meant to cover the info I need to see.

I don’t intend to make it look beautiful.

I created this project just to demonstrate an alternative way of reporting in Katalon Studio.

I don’t really use this project for my day-to-day business.


Just a small set of custom scripts in Groovy that I wrote.

No sophisticated reporting tools or platforams employed.

No visualization by graphics, charts.


reports also include cucumber reports
which is similar to what you made, it contains the test run details as well as the steps, my goal was to override this so that i can use it for my custom reports , any luck with this?

I don’t know. I don’t do cucumber things at all.

Hi everyone, in the end i ended up making my own reporting,
i found a json file with the scenario details and worked on from there to create my test listener

I did. I’m still using it, too.

And Kaz, I read this, yesterday: A fake KeywordLogger could integrate Extent Reports into Katalon project nicely

Great job! I was reminded of some of the hurdles I needed to jump over getting it working :sweat_smile:

@Russ_Thomas

Thank you for your attention. You always understand my intentions very well.