testrail-python
testrail-python copied to clipboard
Unable to change custom fields for test case result
I cannot do something like:
result._content['platform'] = 'blahblah',
probably because request fields are statically defined in api.py:
@UpdateCache(_shared_state['_results'])
def add_results(self, results, run_id):
fields = ['status_id',
'test_id',
'comment',
'version',
'elapsed',
'defects',
'assignedto_id']
Custom fields are not yet supported. This is something that I hope to have soon as I need it as well. In the mean time you could use _post in apy.py directly.
Hi @travispavek
First, I'd like to ask and make sure that custom fields are still not yet supported. If that's correct, can you elaborate on what you mean by "use _post in apy.py directly" ?
@ldfalcon17 You can add results into custom field like:
result = tr.result()
result.test = test
result.status = test_status
result.comment = test_comment
....
result._content['platform'] = 'linux' # Custom parameter
Thanks @spiperac
Your response helped a ton.