Katalon Studio Integration with TestRail


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/tutorials/katalon-testrail-integration.html

Hello Nikita,
First of all, thank you for such great tutorial!
I am a bit stuck on the last step.

WebUI.callTestCase(findTestCase('%replace this with path to your test case, for example:_nb/sync/testrail -- update run tc results%'), [:], FailureHandling.CONTINUE_ON_FAILURE)
}

Where to find this path?

I am taking a wild guess and guess that they are asking to place the path where all of your test cases are:

/call test case using WebUI Class
WebUI.callTestCase(findTestCase("Test Case ID"}), ["key1":"value1", "key2":"value2", ā€¦ , "keyN":"valueN"], FailureHandling.OPTIONAL)

Test Cases/LoginUser

@alex.perez @ivy This is the path of test case creating for ā€œcommunication between Katalon Studio and TestRailā€. Second last step mentioned in document. lets say the name of test case is TestRail

WebUI.callTestCase(findTestCase(ā€˜TestRailā€™), [:], FailureHandling.STOP_ON_FAILURE)

Thanks
Ashwin N.

Iā€™m having problems with this code
for (def n : (0ā€¦response[ā€œidā€].size)) {
if ((response[ā€˜case_idā€™])[n].toString() != ā€˜nullā€™) {
tcs_to_add.add((response[ā€˜case_idā€™])[n].toString())
}
}

I got this:

groovy.lang.MissingPropertyException: No such property: size for class: java.lang.String

Does someone managed to get this tutorial up and running?

Thanks,
Darius

Iā€™ve been close yet so far :frowning: Quite confusing this guide and not really clear on what needs doing. Iā€™ve managed to run this test however it fails on the last AfterTestSuite case.

For the problem you are having, I assume itā€™s for the first part to get_tests in the long code? If so, this would be because your test doesnā€™t know where the get_tests lives so in the def response = CustomKeywords, you need to tell it where to look i.e.:

For me Testrail is the name of the .groovy file inside Keywords folder. Let me know how you get along.

Thanks for the reply. The place of the keywords is ok, and they are referenced correctly. The problem that I have is that for "for (def n : (0ā€¦response[ā€œidā€].size)) " there is no .size property. Please see attached screenshot.

Thank you,
Darius

Getting error for code:
tc_ids = getTestCaseVariables()[ā€œtestrail_tc_idā€].split(ā€œ,ā€)

Hi @apurva.sonak

Can you send us the full log. The error indicates that you are trying to call a function that doesnā€™t exist. For example, there is no method split() on an Integer type.

Regards !

Hi Guys,

Please see the following forum Iā€™ve written with instructions on Katalon and TestRail Integration:

I hope the above is clear to understand and easy to follow. Do post any questions and issues on that forum.

Thanks,
Jay

3 Likes

Hi @darius,

I have to ask. Were you able to fix the ā€œfor (def n : (0ā€¦response[ā€œidā€].size))ā€ error that you got last February 1?
Iā€™m in the same boat. :sweat_smile:

Jason

Just FYI - weā€™ve built a TestRail integration plugin for Katalon Studio. If you have any feedback or suggestions we are happy to hear from you.

https://store.katalon.com/product/13/TestRail-Integration

2 Likes

Hi @devalex88, I have a problem with the integration of Katalon with Testrail. I have followed the documentation exactly. However, Testrail does not process the summary of the output of Katalonā€™s test suite. A new Test run is generated in Testrail, but the data after export in Katalon is not processed. Do you have any suggestions?

To enable the integration of Katalon Studio with TestRail, you need to:

In TestRail
Log in to your account > Administration > Site Settings > API > Enable API > Save Settings.

In Katalon Studio
Enable TestRail Integration plugin in Project Settings:
After installing and reloading the plugin, open Katalon Studio > from Katalon Studio menu bar > Project > Settings.
In the Project Settings window > Plugins > TestRail > Check Using TestRail to enable the integration.
Enter the credentials required for Authentication:
URL: your TestRail instance https://.testrail.io.

Username: your TestRail Username.

Password: your TestRail password.

Project: Specify the TestRail projectā€™s ID (an integer) youā€™d like to integrate with Katalon Studio.

To view the project ID, open your project in TestRail > view the TestRail Project URL.

Click Test Connection and then OK.

Hi Lewis-H,
This is clear and is one of the first steps. My problem is in one of the last steps in TestRail. TestRail does not process the results. I am getting a 400 bad request.
Thanks for respons,
Heidi

Lewis-H,
I have done the following steps . 1. Plugin installed (connection succeeded), 2. Open a project in TestRail and test cases created, 3. In Katalon the number of the test cases linked, 4 in TestRail created a test run with specific test cases, 5. In Katalon test performed (name starts with S1 ). 6. In TestRail a run is created with S1 in the name. However, the results are not processed in TestRail . I think hereā€™s the problem here. But canā€™t find any information about it.
Heidi

Hi @Lewis-H @devalex88
I think my problem has been solved. I had to fill in a result_field which I didnā€™t. I unchecked and then TestRail displayed the correct result. Thank you for the quick response and the effort you have put in. Hopefully I will enjoy the integration of TestRail in Katalon, I am very happy with it.
Heidi

4 Likes

Hi @h.kramer , Iā€™m having the same issue. Where did you fill the result_field or what steps did you follow to see the results in the TestRails Dashboard?

At the moment we have to wait for an update from Katalon. TestRail has made an api change in the bulk get-Api, this will be solved within 4 weeks. Then the results are visible again in TestRail.