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

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
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?

Post by Laurent »

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
abadve
TestLink user
Posts: 13
Joined: Wed Feb 18, 2009 1:56 am

Post by abadve »

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
Laurent
Advanced user
Posts: 22
Joined: Thu Apr 13, 2006 5:46 pm
Location: Milpitas

Thanks

Post by Laurent »

Hi Aparna,

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

/Laurent
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?

Post by bharath018 »

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.
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?

Post by Laurent »

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
bharath018
TestLink user
Posts: 3
Joined: Thu Dec 23, 2010 12:41 pm

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

Post by bharath018 »

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.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

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

Post by fman »

You have to install 1.9.0 available on sourceforge
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?

Post by Laurent »

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.
bharath018
TestLink user
Posts: 3
Joined: Thu Dec 23, 2010 12:41 pm

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

Post by bharath018 »

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.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

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

Post by fman »

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
Post Reply