How to configure the Test suite Collection Report?

While configuring the Test suite collection, we will add the profile information for each test suite. Is it possible to add ‘Profile’ column to the Test suite Collection Report and also to the Exported HTML of Test suite Collection?

1 Like

I maintain different Environments info in Profiles. While executing a Test Suite Collection, we can have the same test suites executed for different Environments(Profiles). But in Test Suite Collection report, profile information is not displayed. Is there any way to display Profile column in Reports OR I am happy to know how others maintain Environments Information to parameterize them to run across all the Test Suites in a simpler way

Let me assume you have a Katalon Studio project which has a Tests Suite Collection named “Main/Execute” which calls a Test Suite named “Main/TS1”. Let me assume the Test Suite “Main/TS1” is called with a Profile named “product” applied.

When you execute the Test Suite Collection, you will get output in the Reports directory under the project dir something like this:

$ tree ./Reports
./Reports
├── Main
│   ├── Execute
│   │   └── 20181117_214933
│   │       └── 20181117_214933.rp
│   └── TS1
│       ├── 20181117_214933
│       │   ├── 20181117_214933.csv
│       │   ├── 20181117_214933.html
│       │   ├── JSON_Report.json
│       │   ├── JUnit_Report.xml
│       │   ├── Report.html
│       │   ├── execution.properties
│       │   └── execution0.log

Please look into the file “execution.properties”. The file will be something like this:

{  "sessionServer.port": 50330,  "sessionServer.host": "localhost",  "source": "\/Users\/kazurayam\/katalon-workspace\/VisualTestingInKatalonStudio\/Test Suites\/Main\/TS1.ts",  "description": "",  "name": "TS1",  "id": "Test Suites\/Main\/TS1",  "execution": {    "drivers": {      "preferences": {        "WebUI": {          "firefox_profile": {            "pdfjs.disable": true,            "browser.download.manager.showWhenStarting": false,            "browser.helperApps.neverAsk.openFile": "applicati\/zlib,application\/gzip,application\/java-archive,application\/json,application\/msexcel,application\/msword,application\/pdf,application\/vnd-ms-office,application\/vnd-xls,application\/vnd.ms-excel,application\/vnd.ms-powerpoint,application\/vnd.openxmlformats-officedocument.presentationml.presentation,application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application\/vnd.openxmlformats-officedocument.wordprocessingml.document,application\/x-dos_mx_excel,application\/x-excel,application\/x-ms-excel,application\/x-msexcel,application\/x-xls,application\/x-zip-compressed,application\/xls,application\/xml,application\/zip,image\/bmp,image\/gif,image\/jpeg,image\/png,text\/plain",            "browser.helperApps.neverAsk.saveToDisk": "applicati\/zlib,application\/gzip,application\/java-archive,application\/json,application\/msexcel,application\/msword,application\/pdf,application\/vnd-ms-office,application\/vnd-xls,application\/vnd.ms-excel,application\/vnd.ms-powerpoint,application\/vnd.openxmlformats-officedocument.presentationml.presentation,application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application\/vnd.openxmlformats-officedocument.wordprocessingml.document,application\/x-dos_mx_excel,application\/x-excel,application\/x-ms-excel,application\/x-msexcel,application\/x-xls,application\/x-zip-compressed,application\/xls,application\/xml,application\/zip,image\/bmp,image\/gif,image\/jpeg,image\/png,text\/plain",            "browser.download.folderList": 1.0,            "browser.download.useDownloadDir": true          }        }      },      "system": {        "WebUI": {          "geckoDriverPath": "\/Applications\/Katalon Studio.app\/Contents\/Eclipse\/configuration\/resources\/drivers\/firefox_mac\/geckodriver",          "browserType": "FIREFOX_DRIVER"        }      }    },    "general": {      "actionDelay": 0,      "timeout": 30,      "testDataInfo": null,      "terminateDriverAfterTestSuite": true,      "enablePageLoadTimeout": false,      "report": {        "reportFolder": "\/Users\/kazurayam\/katalon-workspace\/VisualTestingInKatalonStudio\/Reports\/Main\/TS1\/20181117_214933",        "screenCaptureOption": true,        "videoRecorderOption": {          "allowedRecordIfPassed": false,          "allowedRecordIfFailed": true,          "videoQuality": "LOW",          "videoFormat": "AVI",          "enable": false        }      },      "executionProfile": "product",      "ignorePageLoadTimeoutException": false,      "defaultPageLoadTimeout": 30,      "terminateDriverAfterTestCase": false,      "defaultFailureHandling": "STOP_ON_FAILURE",      "proxy": "{\"proxyOption\":\"NO_PROXY\",\"proxyServerType\":\"HTTP\",\"username\":\"\",\"password\":\"\",\"proxyServerAddress\":\"\",\"proxyServerPort\":0}"    }  },  "host": {    "hostAddress": "172.20.10.3",    "hostPort": 52432,    "os": "Mac OS X 64bit",    "hostName": "kazurayam - 172.20.10.3"  },  "projectDir": "\/Users\/kazurayam\/katalon-workspace\/VisualTestingInKatalonStudio",  "Name": "Firefox"}

Please note the execution.properties file contains an interesting portion for you.

...        "executionProfile": "product",...

This portion tells you which Profile was applied to the Test Suite run.

Is it possible to add ‘Profile’ column to the Test suite Collection Report and also to the Exported HTML of Test suite Collection?

No, not possible. The built-in reports are not designed configurable at all.

You can request to Katalon Team to cover Profile in the built-in Report. I believe it is worth doing.

You can find the location of the Report folder for each Test Suite run where you can find the execution.properties file. See the following article.

RunConfiguration.getReportFolder() will return a string

"<projectDir>/Reports/Main/TS1/20181117_214933"

Once you have got to know where the information source resides, you have chances to fulfill your requirements yourself. You can extract the

"executionProfile": "product"

portion from the execution.properties file and use it any way you want.

Or, you can write a Groovy script (test case) which reads the execution.properties file to generate your own custom report in whatever format you like.

Or, your script can modify the HTML generated by Katalon Studio to cover Property info.

You can get the execution profile using the RunConfiguration class, as well:

import com.kms.katalon.core.configuration.RunConfiguration as RC
RC.getExecutionProfile()

I made the following test case as example:

import com.kms.katalon.core.configuration.RunConfiguration as RC
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
def executionProfile = RC.getExecutionProfile()
WebUI.comment("executionProfile = ${executionProfile}")
def projectDir = RC.getProjectDir()
WebUI.comment("projectDir = ${projectDir}")
def reportFolder = RC.getReportFolder()
WebUI.comment("reportFolder = ${reportFolder}")

When I ran it I got the following output:

11-20-2018 02:06:26 PM - [INFO]   - executionProfile = default
11-20-2018 02:06:26 PM - [INFO]   - projectDir = C:/Users/kazurayam/katalon-workspace/KatalonDiscussion10217
11-20-2018 02:06:26 PM - [INFO]   - reportFolder = C:\Users\kazurayam\AppData\Local\Temp\Katalon\Test Cases\TC2\20181120_140623

kazurayam said:

Is it possible to add ‘Profile’ column to the Test suite Collection Report and also to the Exported HTML of Test suite Collection?

No, not possible. The built-in reports are not designed configurable at all.

You can request to Katalon Team to cover Profile in the built-in Report. I believe it is worth doing.

I have made another discussion post to suggest modifying Katalon Studio to cover Exection Profile in the Report.html:

----

I have thought about modifying the Report.html generated by KS with my groovy code, but I found it is difficult to implement. I have concluded that requesting KS to cover ‘Profile’ in Report.html is most straight forward and possibly easiest way to implement.

Or, your script can modify the HTML generated by Katalon Studio to cover Property info.

After I have read through all your comments, finally decided to work on modifying the HTML generated by KS. But, I found it cannot be implemented.

@4280-kazurayam
As per your screenshot in the new feature request, Profile value seems to be displaying. Is this yet to be added or added in newer version??

As per your screenshot in the new feature request, Profile value seems to be displaying.

My screenshot confused you, sorry.
I edited a Report.html manually and took the screenshot.