HI All,
how can custom fields be red from test link 1.9 through xml RPC?
Advanced thanks.
Regards
Koti
how can custom fields be red from test link 1.9 through xm
Moderators: Amaradana, TurboPT, TL Developers
Re: how can custom fields be red from test link 1.9 through
you will find all info you need on lib\api\xmlrpc.class.php
Re: how can custom fields be red from test link 1.9 through
Hi, here are some small examples in perl and python:
Code: Select all
#!/usr/bin/perl -w
use RPC::XML::Client;
use strict;
my $devkey='YOURDEVKEY';
my $testlink_server = 'http://YOURSERVER/testlink/lib/api/xmlrpc.php';
my $xmlrpc_client = RPC::XML::Client->new($testlink_server);
my $testcase_ext_id="XYZ-1";
my $project_id=YOURPROJECTID;
my $customfieldname="YOURFIELDNAME";
my $version=YOURVERSION;
my $customfieldvalue=$xmlrpc_client->send_request('tl.getTestCaseCustomFieldDesignValue',
{ devKey=>$devkey,
testcaseexternalid=>$testcase_ext_id,
testprojectid=>$project_id,
customfieldname=>$customfieldname,
version=>$version
});
print $$customfieldvalue."\n";
Code: Select all
#!/usr/bin/python
import sys,xmlrpclib
URL = "http://YOURSERVER/testlink/lib/api/xmlrpc.php"
DEVKEY = "YOURDEVKEY"
xmlrpc_client = xmlrpclib.Server(URL)
project_id = "YOURPROJECTID"
testcase_ext_id = "XYZ-1"
customfieldname = "YOURFIELDNAME"
version = YOURVERSION
data = {}
data["devKey"] = DEVKEY
data["testprojectid"] = project_id
data["testcaseexternalid"] = testcase_ext_id
data["customfieldname"] = customfieldname
data["version"] = version
customfieldvalue = xmlrpc_client.tl.getTestCaseCustomFieldDesignValue(data)
print customfieldvalue
Re: how can custom fields be red from test link 1.9 through
I did run the perl code to retrieve custom fileds but the print $$customfieldvalue."\n" does not return anything.
How do we retrieve the customfieldvalue after doing a send request?
Is testcaseexternalid the value you see when the gettestCase method is run, indicated as tc_external_id?
How do we retrieve the customfieldvalue after doing a send request?
Is testcaseexternalid the value you see when the gettestCase method is run, indicated as tc_external_id?
Re: how can custom fields be red from test link 1.9 through
The testCaseExternalid is the test case id in TestLink GUI (project prefix + glue character + internal id).
e.g.: DEMO-1
e.g.: DEMO-1
Re: how can custom fields be red from test link 1.9 through
Is it possible to get the complete testcaseexternalid (project prefix + glue character + internal id) via the api?
I found only a way to get the internal id. It's a roundabout way to get the prefix via getProjects and then the id via getTestCase or getTestCaseIDByName.
I found only a way to get the internal id. It's a roundabout way to get the prefix via getProjects and then the id via getTestCase or getTestCaseIDByName.
Re: how can custom fields be red from test link 1.9 through
why you users continue to use one topic to start a subtopic ? this makes our work impossible. Please follow the right pattern to post, that you cna read may be on stackoverflow site
Re: how can custom fields be red from test link 1.9 through
Sorry, I started new topic ...
http://www.teamst.org/forum/viewtopic.p ... 34de94e232
http://www.teamst.org/forum/viewtopic.p ... 34de94e232