Testrun gets sent, but no results

Hey Community,

while I managed to connect TestRail and Katalon (Downloaded the Plugin, Credentials filled in, ConnectionTest succeeeded) I can now send Data to TestRail, but not all of the data I want.

I create a test Suite on Katalon, and execute it. (it was successful). It also gets sent to TestRail, but only the TestSuite( or in TestRail as “TestRun”) but NOT the results. It just looks like i created a testRun but never started it. Which doesn´t help at all, as the results are the most important thing :wink:

MAYBE the reason lies in here: Event log after Katalon Execution:

TestRail: Start sending summary message to channel:
Summary execution result of test suite: Test Suites/S3077
Total test cases: 1
Total passes: 1
Total failures: 0
Total errors: 0
Total skipped: 0
TestRail: Summary message has been successfully sent
Create new test run S3077
Send post url: add_run/6 data: {include_all=false, case_ids=[3077], name=S3077, suite_id=3077}
Receive: {"updated_on":1640518167,"completed_on":null,"milestone_id":null,"description":null,"custom_status3_count":0,"is_completed":false,"retest_count":0,"custom_status5_count":0,"project_id":6,"id":252,"suite_id":14,"custom_status2_count":0,"include_all":false,"passed_count":0,"custom_status7_count":0,"custom_status4_count":0,"created_by":5,"url":"https:\/\/testrail.XX.de\/index.php?\/runs\/view\/252","config_ids":[],"blocked_count":0,"created_on":1640518167,"refs":null,"untested_count":1,"name":"S3077","assignedto_id":null,"failed_count":0,"custom_status1_count":0,"custom_status6_count":0,"config":null,"plan_id":null}
Send get url get_tests/252
Receive: [{"custom_mission":null,"run_id":252,"custom_expected":null,"type_id":6,"custom_steps_separated":null,"custom_tst_multiselect":[0],"milestone_id":51,"estimate_forecast":null,"cases_display_order":1,"title":"test","custom_preconds":"|| Text|  <Tab> \\\\\r\nMultiple Row \\\\\r\nText \r\n||     | \r\n|| Row 2 .. |  \r\n|| Row 3 .. |  \r\n|| Row 4 .. |  \r\n|| Row 5 .. |  \r\n\r\n\r\nOr \r\n\r\n* Text\r\n    * Multiple \r\n    * row\r\n    * text \r\n\r\nU+2795\r\n\r\n➕\r\n\r\n\\u2795\r\n\r\n&#x26a0;\r\n","custom_goals":null,"custom_steps":null,"priority_id":2,"status_id":3,"custom_test_case_summary":null,"refs":null,"case_id":3077,"estimate":null,"sections_display_order":1,"assignedto_id":null,"template_id":2,"id":8765}]
java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject
	at com.katalon.plugin.testrail.TestRailConnector.getTestCaseIdInRun(TestRailConnector.java:90)
	at com.katalon.plugin.testrail.TestRailEventListenerInitializer.lambda$registerListener$2(TestRailEventListenerInitializer.java:140)
	at com.katalon.platform.internal.event.EventListernerDelegate.lambda$handleEvent$0(EventListernerDelegate.java:38)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
	at com.katalon.platform.internal.event.EventListernerDelegate.handleEvent(EventListernerDelegate.java:38)
	at com.katalon.platform.internal.event.EventListernerDelegate$1.handleEvent(EventListernerDelegate.java:24)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

So something goes bad here, like
java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject
at com.katalon.plugin.testrail.TestRailConnector.getTestCaseIdInRun(TestRailConnector.java:90)
at com.katalon.plugin.testrail.TestRailEventListenerInitializer.lambda$registerListener$2(TestRailEventListenerInitializer.java:140)
which could be the problem. But an Error like this doesn´t sound like an error of the user, maybe more like an error on the plugin side.

Can anyone help me with that? (Using Version 1.1.1 of the TestRail Plugin btw)

Thanks a lot!

Hi Patrick,

Could you describe how you set up the integration? The test case should be mapped using ID, please refer to https://docs.katalon.com/katalon-studio/docs/testrail-integration.html#create-a-new-test-run-in-testrail.