How to I generate a dev key to access the API?

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

How to I generate a dev key to access the API?

Postby Laurent » Sat Nov 14, 2009 12:49 am

I have installed 1.8.4 (on top of an existing 1.8.3 installation).

The testlink config file has the TL api set to true yet when I go to the user info page, I do not see the button to generate the dev key.

$tlCfg->api->enabled = TRUE;


I looked through the smarty templates and I see that there is code to enable this feature.

Also note that this was not working for me in 1.8.3 either.

Any help is greatly appreciated.Whether it is via the UI or by other means

Thanks
Laurent
Advanced user
 
Posts: 22
Joined: Thu Apr 13, 2006 5:46 pm
Location: Milpitas

Postby abadve » Sat Nov 14, 2009 3:09 am

Hello Laurent,

In my config file I have enabled below
$tlCfg->exec_cfg->enable_test_automation = ENABLED;
Then when I go to the personal tab button from the GUI on account setting web page
I see below change password button
API interface

Personal API access key = 9c2cdfb6e0072a652098d41622e50f4f
There is Generate a new key button below that.

Hope this helps!

Thanks
abadve
TestLink user
 
Posts: 13
Joined: Wed Feb 18, 2009 1:56 am

Thanks

Postby Laurent » Mon Nov 16, 2009 8:07 pm

Hi Aparna,

Thank you so much. I had completely forgotten to look under personal.

/Laurent
Laurent
Advanced user
 
Posts: 22
Joined: Thu Apr 13, 2006 5:46 pm
Location: Milpitas

Re: How to I generate a dev key to access the API?

Postby bharath018 » Thu Dec 23, 2010 12:54 pm

Hi,
This Bharath,
I installed Testlink 1.9 beta4 version, and I am trying to use Testlink Python api for the integration of Testlink in automation.
I followed below the steps for the generation of Dev key

$tlCfg->api->enabled = TRUE;

$tlCfg->exec_cfg->enable_test_automation = ENABLED;

and able to see the option "Generate a new Key", but when the I clicked on "Generate a new Key" it is displaying an Error message with


DB Access Error - debug_print_backtrace() OUTPUT START

==============================================================================

#0 database->exec_query(UPDATE users SET script_key='4280e873ef215582862939e8d63d40b2' WHERE id='1') called at [C:\xampp\htdocs\testlink-1.9.beta4\lib\api\APIKey.php:41]
#1 APIKey->addKeyForUser(1) called at [C:\xampp\htdocs\testlink-1.9.beta4\lib\usermanagement\userInfo.php:161]

Could any one help me regarding this..! and let me know how can i get the dev key.
bharath018
TestLink user
 
Posts: 3
Joined: Thu Dec 23, 2010 12:41 pm

Re: How to I generate a dev key to access the API?

Postby Laurent » Thu Dec 23, 2010 2:57 pm

Hi Bharath,

I strongly suggest that you upgrade your installation to the latest release which has been fully tested. I am running the latest and could not reproduce the issue you are talking about.

Speaking of the API, please note that there is actually way more APIs that appear to be available than what is currently documented (look at the php module under the lib/api folder). Finally, just of curiosity, when you are talking about the Python API, are you referring to an actual library or just the use of the API via python?

Good luck
Laurent
Advanced user
 
Posts: 22
Joined: Thu Apr 13, 2006 5:46 pm
Location: Milpitas

How to I generate a dev key to access the API?

Postby bharath018 » Fri Dec 24, 2010 7:35 am

Hi Laurent,

Thanks for suggestions, May I know which version should we use, I am using the Testlink 1.9.beta4, when I browsed, I got the information that Testlink 1.9. beta5 is the new version, so I need to install it?
I want to use the TestLink API via Python.
Thankful for anyother useful information.
bharath018
TestLink user
 
Posts: 3
Joined: Thu Dec 23, 2010 12:41 pm

Re: How to I generate a dev key to access the API?

Postby fman » Fri Dec 24, 2010 8:07 am

You have to install 1.9.0 available on sourceforge
fman
Member of TestLink Community
 
Posts: 3062
Joined: Tue Nov 15, 2005 7:19 am

Re: How to I generate a dev key to access the API?

Postby Laurent » Fri Dec 24, 2010 4:42 pm

Hi Bharath,

I am currently implementing a python and Perl version of the API providing an object model mapping the TL constructs. I am planning to release it back to the TL project but will need to get approval from my company to do so so it might take a few weeks - don't know if you can wait that long. Regardless, I just want to point out that there are way more API implemented than document as you will find out in the XML-RPC file located in the lib/API directory.

Good luck.
Laurent
Advanced user
 
Posts: 22
Joined: Thu Apr 13, 2006 5:46 pm
Location: Milpitas

How to I generate a dev key to access the API?

Postby bharath018 » Mon Jan 03, 2011 11:37 am

Hi Laurent and fman,

Thanks for your help, at last we found our mistake, that is Mysql is not running on the default port 3306, it is running in the 8306, so we changed the port to the default port 3306 and got the result finally. One more thing I want to know, please help me.

how can we select(export) multiple set of automated testcases according to the user requirement at once, so that the selected cases can go to the automation frame work, Is there any way that we can add "checkboxes" in the Navigator feild, in the Tree structure for selection and exporting them at once.
bharath018
TestLink user
 
Posts: 3
Joined: Thu Dec 23, 2010 12:41 pm

Re: How to I generate a dev key to access the API?

Postby fman » Mon Jan 03, 2011 8:10 pm

Please follow standard practices for using forums and report issues: do not use a post / issue with a SUBJECT to ask for things that are not related to subject.
This kind od 'vampirizing' a post make it useless to other people.
Thanks
fman
Member of TestLink Community
 
Posts: 3062
Joined: Tue Nov 15, 2005 7:19 am


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 3 guests