Katalon Studio Integration with TestRail


#1

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

#2

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?


#3

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


#4

@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.


#5

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


#6

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.


#7

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


#8

Getting error for code:
tc_ids = getTestCaseVariables()[“testrail_tc_id”].split(",")


#9

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 !


#10

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


#12

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


#13

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