It is fairely easy to write a TestListener class in Katalon project in Groovy language. A TestListener can compile a summary report in your custom format.
For example, have a look at my previous project: Custom Test Report compiled by TestListener (kazurayam-ks-plainreport)
The TLPlainReport will give you an idea what you should write.
import com.kazurayam.ks.plainreport.ReportGenerator
import com.kms.katalon.core.annotation.AfterTestCase
import com.kms.katalon.core.annotation.AfterTestSuite
import com.kms.katalon.core.annotation.BeforeTestCase
import com.kms.katalon.core.annotation.BeforeTestSuite
import com.kms.katalon.core.context.TestCaseContext
import com.kms.katalon.core.context.TestSuiteContext
import com.kms.katalon.core.configuration.RunConfiguration
import java.nio.file.Path
import java.nio.file.Paths
class TLPlainReport {
private ReportGenerator reportgen
TLPlainReport() {
reportgen = new ReportGenerator()
reportgen.setOutputDir("./PlainReport")
}
@BeforeTestSuite
def beforeTestSuite(TestSuiteContext testSuiteContext) {
reportgen.beforeTestSuite(testSuiteContext)
}
@BeforeTestCase
def beforeTestCase(TestCaseContext testCaseContext) {
reportgen.beforeTestCase(testCaseContext)
}
@AfterTestCase
def afterTestCase(TestCaseContext testCaseContext) {
reportgen.afterTestCase(testCaseContext)
}
@AfterTestSuite
def afterTestSuite(TestSuiteContext testSuiteContext) {
reportgen.afterTestSuite(testSuiteContext)
}
}
This TestListener redirects the event stream originated by Katalon’s Test Runner into my reporting class com.kazurayam.ks.plainreport.ReportGenerator
. Once my reporting object is notified of @AfterTestXXXX
events, then my reporting object can generate a file with error details in any format I’d like.
TestListener is the gearbox of custom reporting mechanism. Easy, isn’t it?
You should create a new TestListener and a reporting class that meets your specific needs.