In katalon I have a test suite with many tc in it and I run on my local system.
Can I get pdf of each tc individually? Katalon produces export report step by step. Similarly I want to see pdf per test case and not as a whole.
No. Simply, not supported.
Alternatively you can make many Test Suites which contains one Test Case each, and get its report.
Hello there,
As @kazurayam mentioned, this is not supported, and I believe it makes sense that it isn’t. Generating multiple PDF documents—one for each executed test case—would result in a large number of reports, which could quickly become unmanageable.
This is why Katalon only generates exportable reports at the Test Suite and Test Suite Collection levels.
However, if you could share more details about why you need this type of report and how it would benefit your automation activities, we might be able to explore some alternative workarounds.
I looked at the source code of /com/kms/katalon/core/reporting/ ReportWriterUtil.java
bundled in the <KatalonStudioInstallationFolder>/configuration/resources/source/com.kms.katalon.core/com.kms.katalon.core-sources.jar
. I found the following code:
public static File writePdfReport(TestSuiteLogRecord suiteLogEntity, File logFolder)
throws JasperReportException, IOException {
List<TestCaseLogRecord> testCases = suiteLogEntity.getAllTestCaseLogRecords();
List<String> originalTestCaseNames = new ArrayList<>();
for (TestCaseLogRecord testCase : testCases) {
originalTestCaseNames.add(testCase.getName());
testCase.setName(testCase.getTestCaseNameWithIteration());
}
TestSuitePdfGenerator pdfGenerator = new TestSuitePdfGenerator(suiteLogEntity);
File exportLocation = new File(logFolder, logFolder.getName() + ".pdf");
pdfGenerator.exportToPDF(exportLocation.getAbsolutePath());
// Restore original names after PDF generation
for (int i = 0; i < originalTestCaseNames.size(); i++) {
testCases.get(i).setName(originalTestCaseNames.get(i));
}
return exportLocation;
}
The code fragment
= suiteLogEntity.getAllTestCaseLogRecords()
selects all TestCase log records contained in a TestSuite execution log file. Consequently the resulting report contains all Test Cases in the Test Suite.
However, I can imagin a bit of twist; it should be possible to select a single TestCase out of a TestSuite execution log and compile a PDF report.
Only Katalon developers can do such change. @dsharma should convince them.