lczub / TestLink-API-Python-client

A Python client to use the TestLink API
104 stars 63 forks source link

how to use reportTCresults with custom fields. #134

Closed dikenzz closed 3 years ago

dikenzz commented 4 years ago

I can update testlink results using the reportTCresults however when trying to add custom fields to the results, no custom field is updated.

[{'status': True, 'operation': 'reportTCResult', 'overwrite': True, 'message': 'Success!', 'id': '119', 'customfieldstatus': True}]

lczub commented 4 years ago

Hello dikenzz,

please apologize the very late response. The secret how to return custom field values is, that they have to be omitted in a separate dictionary. Sample

newResult = myTestLink.reportTCResult(newTestCaseID_B, newTestPlanID_A, 
                newBuildName_A, 'p', "bugid 4711 is assigned", 
                platformname=NEWPLATFORM_B, bugid='4711',
                customfields={'cf_tc_ex_string' : 'a custom exec value set via api',
                              'cf_tc_sd_listen' : 'ernie'})

You find more detailed sample how to use keywords and customfields here: example/TestLinkExample_CF_KW.py.

Hope this helps, Regards Luiko