I updated my Testlink version from 1.9.0 to 1.9.2. In 1.9.0 the remote execution only works with a "small" workaround like this: http://www.teamst.org/forum/viewtopic.php?f=11&t=3663
And now it works out of the box

Here a short description:
Activate API in config.inc.php: $tlCfg->api->enabled = TRUE
Enable XML-RPC calls in config.inc.php: $tlCfg->exec_cfg->enable_test_automation = ENABLED
Define a custom field e.g. on Testcase level: RE-XMLRPC_url_tcase
Set value to IP:PORT/PATH, eg: 192.168.1.63:8000/RPC2
And an example server in perl:
Code: Select all
#!/usr/bin/perl -w
use Frontier::Daemon;
use RPC::XML::Client;
use strict;
#============================================================================
# Init
#============================================================================
# Methods used by frontier daemon
my $methods = {'executeTestCase' => \&ExecuteTest};
# Get testlink devkey
my $devkey = "1234567890";
# Testlink api url
my $testlink_server = 'http://localhost/testlink/lib/api/xmlrpc.php';
#============================================================================
# Main
#============================================================================
# Start frontier daemon
print "Starting Frontier Daemon...\n";
Frontier::Daemon->new(LocalPort => 8000, methods => $methods) or die "ERROR: Couldnt't start HTTP server: $!";
#============================================================================
# Subs
#============================================================================
# ---------------------------------------------------------------------------
# Test execution
# ---------------------------------------------------------------------------
sub ExecuteTest {
my ($testCaseName, $testCaseID, $testCaseVersionID, $testProjectID, $testPlanID, $platformID, $buildID, $executionMode);
my $b = $_[0];
foreach my $k (keys(%$b)){
if ($k eq "testCaseName") { $testCaseName = $b->{$k} }
if ($k eq "testCaseID") { $testCaseID = $b->{$k} }
if ($k eq "testCaseVersionID") { $testCaseVersionID = $b->{$k} }
if ($k eq "testProjectID") { $testProjectID = $b->{$k} }
if ($k eq "testPlanID") { $testPlanID = $b->{$k} }
if ($k eq "platformID") { $platformID = $b->{$k} }
if ($k eq "buildID") { $buildID = $b->{$k} }
if ($k eq "executionMode") { $executionMode = $b->{$k} }
}
# New XMLRPC client
my $xmlrpc_testlink = RPC::XML::Client->new($testlink_server);
# Check if testlink server is running
my $sayHello = $xmlrpc_testlink->send_request('tl.sayHello');
if ($$sayHello eq "Hello!") {
print "Testlink Server is running!\n";
} else {
print "ERROR: Testlink Server is down!\n";
exit 1;
}
# Do some execution and set return values
print "Execute $testCaseName!\n";
my $status = "f";
my $notes = "Testlink XMLRPC Server test";
# Report test result to testlink
my $reportTCResult = $xmlrpc_testlink->send_request('tl.reportTCResult',
{ devKey=>$devkey,
testcaseid=>$testCaseID,
testplanid=>$testPlanID,
buildid=>$buildID,
status=>$status,
notes=>$notes,
guess=>'TRUE',
});
my $report_result;
my @resp_array = @{$reportTCResult->value};
$b = $resp_array[0];
foreach my $k (keys(%$b)){
if ($k eq "message") { $report_result = $b->{$k} }
}
print "Report Result: $report_result\n";
}
Cheers, Tom