Page 1 of 1

How to use "getTestCaseCustomFieldDesignValue"

PostPosted: Wed Nov 12, 2008 1:30 pm
by partymungo
Hi,
does somebody know how to use "getTestCaseCustomFieldDesignValue"? I try the following:


Code: Select all
class TestlinkAPIClient:
        # substitute your server URL Here
        SERVER_URL = "http://localhost/testlink/lib/api/xmlrpc.php"
        DEV_KEY = "415b2ad35607e3548e4554d160a61e4a"
        def __init__(self):
                self.server = xmlrpclib.Server(self.SERVER_URL)

        def getTestCaseCustomFieldDesignValue(self, tcid, tpid, customfieldname):
                data ={"devKey":self.DEV_KEY, "testcaseid":tcid, "testplanid":tpid, "customfieldname":customfieldname}
                return self.server.tl.getTestCaseCustomFieldDesignValue(data)

...

Code: Select all
custom = client.getTestCaseCustomFieldDesignValue(5, 24, "tc_server_path")
print custom

(The arguments are valid)

While executing the script i get the following:

host@test:~/Testsuite> python xmlrpcapi.py
[]

Shouldn't i got the value of "tc_server_path"?

Thanks for your help.

PostPosted: Fri Nov 14, 2008 11:24 am
by fman
think is not fully implemented yet ( will check)

PostPosted: Mon May 11, 2009 1:07 pm
by aprepo
fman wrote:think is not fully implemented yet ( will check)


Well, should it work or not?

PostPosted: Tue May 12, 2009 9:31 am
by fman
Well what about asking in a more polite way ?

PostPosted: Tue May 12, 2009 12:12 pm
by aprepo
fman wrote:Well what about asking in a more polite way ?


Please? :)

(Didn't mean to be rude on a first post to the forum :)

PostPosted: Tue May 12, 2009 8:37 pm
by tfeathers
Is there any thing I can do to get this to work? I am trying to use testlink as part of an automation framework and I have created a field called "Automation Command line" that I need to be able to get to run the testcase.

PostPosted: Wed May 13, 2009 5:10 am
by tfeathers
Here is my guess. Let me know if I am in the right direction.

public function getTestCaseCustomFieldDesignValue($args)
{

$this->_setArgs($args);
if($this->_checkGetTestCaseCustomFieldDesignValueRequest() && $this->userHasRight("mgt_view_tc"))
{
//return $this->errors;
$tcase_id=$this>args[self::$testCaseExternalIDParamName];
$sql = "select * from cfield_design_values where node_id = '" . $tcase_id . "';"
return $this->dbObj->fetchRowsIntoMap($sql,'node_id');
//return $this->errors;
}
else
{
return $this->errors;
}
}

My guess is I need to comment out return $this->errors; and return an SQL query instead... right?