Perl API client sample

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
qaman
TestLink user
Posts: 3
Joined: Wed Feb 27, 2008 4:01 am

Perl API client sample

Post by qaman »

Does anyone have perl example for using the API to access TestLink data?

My test automation framework is done in perl and I'm looking for a way to integrate my automation framework with TestLink. I'd like to see an example for accessing TL data using perl.

Thanks,
Eli
qa9001
TestLink user
Posts: 8
Joined: Mon Aug 20, 2007 9:07 pm

Post by qa9001 »

I am now using RPC::XML::Client (debian/ ubunt package librpc-xml-perl)

Code: Select all

#!/usr/bin/perl
use RPC::XML::Client;
my $cli = RPC::XML::Client->new('http://testlink/lib/api/xmlrpc.php');
my $resp = $cli->send_request('system.listMethods');
print ref $resp ? join("\n", @{$resp->value}) : "Error: $resp";
I couldn't get it to work with tl 1.8.5
qa9001
TestLink user
Posts: 8
Joined: Mon Aug 20, 2007 9:07 pm

Re: Perl API client sample

Post by qa9001 »

I created three sample files - Is there a way of uploading them to the board?

They are:

createBuild.pl
getTestCasesIDByName.pl
getTestPlanByName.pl
reportTCResult.pl
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Perl API client sample

Post by fman »

this samples will be added to next TL distribution
stephen
TestLink user
Posts: 2
Joined: Tue Mar 16, 2010 6:05 pm

Re: Perl API client sample

Post by stephen »

Is there a way I could get these examples?
testlink19 has two perl examples - but does not seem to be as straightforward as listed above.

thanks
Stephen.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Perl API client sample

Post by fman »

do search on mantis site, removing filter that hide closed issues, to see if user have attached code
Post Reply