Hi,
I am using perl xml rpc library to report test case results. I have a custom field called "config" for each test case during test case execution.
I am not able to find out how to update this custom field using rpc. In http://jetmore.org/john/misc/phpdoc-tes ... rtTCResult they have vaguely mentioned about using map , but I have no idea what that means. I tried using hash , but it did not work too. I was not able to find any sample code on the net too. Can some one please guide me in this regard.
Thanks,
Ashwin
[SOLVED] How to update custom field using reportTCResult API
Moderators: Amaradana, TurboPT, TL Developers
Re: How to update custom field using reportTCResult API
use PHP sample clients provided with TL installation to fullt understood how call has to be done
Re: How to update custom field using reportTCResult API
In the php client examples, "array" is being used.
The equivalent to it in perl is "hash".
So, I tried -
and its not working. I tried with key and value instead of CF_EXE1 and CF_DAT. I was still not able to make it work. I am clueless . Please let me know what I am doing wrong.
Thanks
The equivalent to it in perl is "hash".
So, I tried -
Code: Select all
my %ash=( "CF_EXE1" => "Configuration","CF_DT"=>"Configuration created by API");
$response = $client->send_request('tl.reportTCResult',{
'devKey' => $APIKey,
'testcaseexternalid' => $TCXID,
'testplanid' => $planID,
'status' => $TCStatus,
'buildid' => $buildID,
'notes' => $TCnotes,
'platformname' => $platformName,
'customfields' => %ash
});
Thanks
Re: How to update custom field using reportTCResult API
figured it out. Slight part of confusion made me break head on this. working code is given below, for others -
Configuration is the CF name, and mxp320I is the CF value.
Code: Select all
$response = $client->send_request('tl.reportTCResult',{
'devKey' => $APIKey,
'testcaseexternalid' => $TCXID,
'testplanid' => $planID,
'status' => $TCStatus,
'buildid' => $buildID,
'notes' => $TCnotes,
'platformname' => $platformName,
'customfields' => {'Configuration'=>'mxp320I'}
});