Reputation: 3728
While using the TestLink APIConst values below, the xml-rpc call produced an Exception. No report was printed for the corresponding Test case
testlinkResult = TestLinkAPIResults.TEST_DEPARTED;
testlinkResult = TestLinkAPIResults.TEST_WRONG;
calling reportTCResult() with either of those status codes produced the following Exceptions
The xml-rpc call to TestLink API method tl.reportTCResult failed.
Result[0] = {message=The status code (d) provided is not valid!, code=6000}
The xml-rpc call to TestLink API method tl.reportTCResult failed.
Result[0] = {message=The status code (w) provided is not valid!, code=6000}
when i used TEST_PASSED
,TEST_FAILED
, results were printed successfully. My question is why do the TEST_DEPARTED
and TEST_WRONG
fail?
Testing Framework : TestNG with Selenum Webdriver & Java
let me know if any changes or information about config files etc are required.
Upvotes: 1
Views: 1213
Reputation: 3728
with help of Richard, need to update the following files in Testlink
cfg/const.inc.php
in the above file will update the following
$tlCfg->results['status_label']
$tlCfg->results['status_label_for_exec_ui']
$tlCfg->results['charts']['status_colour']
add all the newly introduced status should be added
locale/en_gb /string.txt
Status (used wide)
Upvotes: 0
Reputation: 20344
The documentation for the Testlink server API is very hard to find! However, I did a bit of searching and found some auto generated documentation on someones blog here, which led me to this question (with regard to integrating Testlink with Jenkins)
The result is that it seems on your testlink server, you need to set up the status codes you want to use. Looking at the testlink server code here it seems they are set up in the const.inc.php
file (line 420 in the version posted there). The default appears to be:
$tlCfg->results['status_code'] = array (
'failed' => 'f',
'blocked' => 'b',
'passed' => 'p',
'not_run' => 'n',
'not_available' => 'x',
'unknown' => 'u',
'all' => 'a'
);
One way to do this is to add the statuses you want to use directly to that file. If you already have something called custom_config.inc.php
or similar in your installation - you might have to add the array there instead - see this question in the testlink bug tracker.
You need to add
'departed` => 'd'
and
'wrong' => 'w'
so your array now looks like:
$tlCfg->results['status_code'] = array (
'failed' => 'f',
'blocked' => 'b',
'passed' => 'p',
'not_run' => 'n',
'not_available' => 'x',
'unknown' => 'u',
'all' => 'a',
'departed' => 'd',
'wrong' => 'w'
);
Don't forget the commas, or you might run into this problem (reported on the Testlink bug system)
Upvotes: 2