Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

u'TestRail API returned HTTP 500 ("Undefined variable: config_key")'

Hello,

I am trying to do the following when I get this error.

Update run

                    request = { 'name' : runs[0]['name'], 

                                'include_all' : False,

                                'description' : 'Testsuite run added automatically for suite in plan',

                                'case_ids'    : previous_tc_ids + list( filter( lambda x: x not in previous_tc_ids, tc_ids)) }

                    try:

                        r = self.user_client.send_post( '/update_plan_entry/%d/%s' % (plan_id, entry_id ), request )

Even with this error the results get posted.
However, in some cases, there is additional error due to which the results don’t get posted.
The error is following-
TestRail API returned HTTP 400 (“Field :results contains one or more invalid results (case C2974081 unknown or not part of the test run)”)

How to solve this issue?

This issue happens when it is trying to post the results of the testsuite in an existing Testrun.
It is unable to create a new fresh section for the testsuite in the existing Testrun.

The C is NOT part of the case id in the database… The C is just for the UI - the ID in the database is actually 2974081