How to import Test Results using Command Line


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-analytics/docs/project-management-import-cli.html

Is there a way to know what execution id a particular upload has created at Analytics ? is there any rest api or anything using which we can get execution id… I am trying to form a url which i can share to team when upload done as part of our testing in CI…so they can correlate the result to analytics better

Hello @musaffir.puthukudi

When you’ve finished executing test execution in console mode, at the end of the console log, you will see a URL to your test execution in Katalon TestOps.

For example, Katalon TestOps - Execution URL: https://analytics.katalon.com/from-ks/execution-result?teamId=5955&projectId=6600&id=4362618

Copy this link and share it with your team members.

Happy testing~

Jass

Hello @Jass

Thanks you for replying here.
I am not yet moved to Katalon 7, and i think your logs are from K7

And I am using the standalone jar to upload the test results to analytics from CMD as mentioned in the below wiki

This is because we do not want to save the analytics configuration as part of our Katalon project , we keep them blank . If we keep configuration along with the project, different members of the team will be cloning this to their local and it would be difficult to keep remember about not to upload any results of run that they do in their local for the suite trail run purpose.

So in this way, do you have any clue about how to get the execution id to form the URL

Warm Regards
Musaffir

Hi @Jass

I checked your suggestion with K7 and K Runtime engine

In console log i see analytics url as - https://analytics.katalon.com/from-ks/execution-result?teamId=27156&projectId=35379&id=4374241

but that id=4374241 looks not same as one I see at anayltics end
At analytics ends it is
https://analytics.katalon.com/team/27156/project/35379/executions/35

Thanks

Hello @musaffir.puthukudi

The ID=4374241 is an ID of uploading batch while the ID=35 is the execution ID. These two IDs will be automatically mapped with each other.

Jass

Ha yes
I am concerned about only execution id . ID=35
which is what i would need to form the execution url

Hi @musaffir.puthukudi

You don’t have to form it yourself, mate. You just need to send this link https://analytics.katalon.com/from-ks/execution-result?teamId=27156&projectId=35379&id=4374241to your team. It will be redirected to https://analytics.katalon.com/team/27156/project/35379/executions/35.

Jass

How do we upload results to katalon after the jenkins job ?

Usage of ready to run package:

Make sure java is installed and is available in PATH
Unzip CommandLineTestResultImporter.zip into a folder
Setup config/CommandLineTestResultImporter.properties
Set codebeamer host and port
Set user, password
Set projectKey property to the key of your project to import results to
Set testCaseTrackerID to the ID of test cases tracker
Set testCaseTrackerKey to the key of test cases tracker (TESTCASE in a new empty project)
Set testConfigId to the ID of the test configuration to use
Set testConfigName to the name of the test configuration to use
In your build tool ensure that there is a process which creates a CSV file with test results
The file should be in the input folder of the tool
The name of the file must be result.csv
To find out the format, see the example file in input folder
In your build tool, add a new build step: run command line program
Set the program to call to the launch.bat in the unzipped tool folder
Add a command line parameter which is the name of the current test suite in quotes.
Example: launch.bat “MyOwnTestSuite”
Optionally add a command line parameter which is the name of the property file to use from config folder (see below)
Example: launch.bat “MyOwnTestSuite” “MyOwnTestSuite.properties”

Using Gitlab CI, I can upload tests results to my project. I now miss a configuration option : How can I link the test to specific release ?

I would love to have such parameter :

variables:
    PROJECT_ID: 858295
    RELEASE_NAME: myrelease
    TYPE: katalon
    REPORT_PATH: report
    EMAIL: john.doe@example.com
    PASSWORD: password