TestLink integration with TRAC

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
vramos
TestLink user
Posts: 1
Joined: Fri Feb 06, 2009 8:23 pm

TestLink integration with TRAC

Post by vramos »

Hello all,

I am facing the following problem with the TestLink integration with TRAC system.

It looks like Testlink cannot connect to trac in order to retrieve ticket information. After creating the ticked on Trac, I went to testlink BUG management and tried to add the ticket number but I always get the error "Bug ID does not exist on BTS!".

I have Eclipse Mylyn plugin that also uses XML RPC to connect to Trac and it is working fine with the same Trac Project.

I hope someone can get me some ideas of how to get this integration working.

I am using Trac 0.10.4 and my TestLink configuration is the following:

Code: Select all

//Set the bug tracking system Interface to Trac 0.10.x
//also tested with Trac 0.10.4

// Note: Please save this file in the character set same as PHP.

/** Trac Project Root */
define('BUG_TRACK_DB_HOST', 'http://issuetracking.crm.mycompany.com/trac/');

/** Mapping TL test project name vs trac project url */
$g_interface_bugs_project_name_mapping = array(
    'Custom_Solution_B' => 'test',
);

/*--- Don't change the following parameters. ---*/
/** Link to the bugtracking system, for entering new bugs. */
define('BUG_TRACK_ENTER_BUG_HREF', '/newticket');
/** Link to the bugtracking system, for show bugs. */
define('BUG_TRACK_HREF', '/ticket');

/* The following parameters are not in use. */
define('BUG_TRACK_DB_TYPE', '[Not in Use]');
define('BUG_TRACK_DB_NAME', '[Not in Use]');
define('BUG_TRACK_DB_CHARSET', '[Not in Use]');
define('BUG_TRACK_DB_USER', '[Not in Use]');
define('BUG_TRACK_DB_PASS', '[Not in Use]');
?>
gibson.nascimento
TestLink user
Posts: 4
Joined: Fri Feb 13, 2009 12:29 pm

Post by gibson.nascimento »

Hi, i'm facing the same problem as you.
I tryed some different configurations that i've found online, but nothig works.
Some of what I've read:
http://groups.google.com/group/testlink ... 405d22f343
http://51elliot.blogspot.com/2009/01/tr ... l-rpc.html

Now, i'm facing another problem

First I had my Trac installation in a different machine and I installed it in the same machine where TL is, just to find out if the problem was the network but now, my TL doesn't work anymore, it's like if some lib was uninstalled but i've checked and all the libs are ok. This is the site where i found the Trac installation (it's in portuguese):

http://www.jornaldojerimum.com.br/2007/ ... isty-fawn/

If someone know what to do, i'll be very glad...

Tks
gibson.nascimento
TestLink user
Posts: 4
Joined: Fri Feb 13, 2009 12:29 pm

Post by gibson.nascimento »

Hi, I finally found what was going on between TL and Trac, some of Trac lib disabled php5 on apache sites-enabled folder.

But I'm still looking for a solution to the other problem.
gibson.nascimento
TestLink user
Posts: 4
Joined: Fri Feb 13, 2009 12:29 pm

Post by gibson.nascimento »

Hi vramos, I finally found out a way to solve the integration between TL and Trac.
It uses a Trac plugin named XMLRPC:

follow the steps to install de plugin
http://trac-hacks.org/wiki/XmlRpcPlugin

and follow this to configure TL:
http://51elliot.blogspot.com/2009/01/tr ... l-rpc.html

just take care while doing the second modification, change the name of the variable m_xmlrpcClient to xmlrpcClient.

I have everything working fine here now.
gosanjeev
TestLink user
Posts: 4
Joined: Mon Mar 23, 2009 1:57 am

Post by gosanjeev »

Hi,
I'm using Trac 11.2 (with Agilo for Scrum plugin) and TestLink 1.8. The eclispe plugin to connect Trac using XMLRPC is working fine.
The 'Access to Bug Tracking System (Trac)' is working fine as well but when I provide an existing bug to add I get a white screen after a long pause and the logs indicate the following:

[>>][49c9b849622d0171091293][DEFAULT][/testlink/lib/execute/execSetResults.php][09/Mar/25 04:51:21]
[09/Mar/25 04:51:21][WARNING][gb450iedfs4hqteuvhvneoufp5][GUI]
E_NOTICE
Undefined index: tester_id - in E:\Gorku\apps\apps\testlink\htdocs\lib\execute\execSetResults.php - Line 175
[09/Mar/25 04:51:21][WARNING][gb450iedfs4hqteuvhvneoufp5][GUI]
E_NOTICE
Undefined index: map_last_exec_any_build - in E:\Gorku\apps\apps\testlink\htdocs\gui\templates_c\%%8E^8EC^8ECF17FA%%inc_exec_show_tc_exec.tpl.php - Line 83

Also followed this to configure TL:
http://51elliot.blogspot.com/2009/01/tr ... l-rpc.html

I'm using the admin user in TestLink. Any help in resolving this issue is appreciated.
Thanks,
Sanjeev
gosanjeev
TestLink user
Posts: 4
Joined: Mon Mar 23, 2009 1:57 am

Post by gosanjeev »

Disabling the flag below removed the error message from the log file but the white screen is still coming on trying to add a bug.

$tlCfg->exec_cfg->show_last_exec_any_build = FALSE;
gibson.nascimento
TestLink user
Posts: 4
Joined: Fri Feb 13, 2009 12:29 pm

Post by gibson.nascimento »

I didn't face this kind of problem ..

but, try to assure that the user you configured to TestLink to connect to Trac has permission to do it. Run:

trac-admim [TRAC/PROJECT/FOLDER] permission list

This will show if the user is able to connect to trac. In case there is no permission for it run
trac-admim [TRAC/PROJECT/FOLDER] permission add [USER_NAME] XML_RPC

Hope it helps...

bye
gosanjeev
TestLink user
Posts: 4
Joined: Mon Mar 23, 2009 1:57 am

Post by gosanjeev »

Found the resolution to the issue after spending hours to find Vista's weird default setting.

PHP5 fsockopen(localhost, ...) doesn't work in MS Windows Vista http://kerneltrap.org/node/16932
xenita
TestLink user
Posts: 4
Joined: Mon Mar 30, 2009 11:57 am

TL and TRAC integration

Post by xenita »

Hi all,

I understood that my question can seem to be ridiculous, but I lookув up and down all posts on this forum with same problem and haven't found exact reply. I have TRAC with anonymous access and rpc plugin worked (this link is working and show information http://yoursite/trac/xmlrpc).
I set all trac files and strings in TL and as result I CAN post defects to TRAC but I CAN'T add defects from trac (Bug ID does not exist on BTS! error appears).
Configuration: Win XP
Trac: 0.11.3 (127.0.0.1:8000)
Python: 2.5
TestLink 1.8.0 (localhost:8080)
PHP 5.2

Is this a problem of RPC (due to that fact that I'm able to add new issues thought link from TL: Access to Bug Tracking System (Trac) ?
postb99
TestLink user
Posts: 10
Joined: Mon Jun 08, 2009 10:43 am

Post by postb99 »

Xenita, did you resolve your issue ?

I have the same "timeout/blank screen" problem when adding a bug reference to TestLink, if I use "localhost" or "<netbios computer name>" in trac.cfg.php, but I get "Bug ID does not exist on BTS!" if I use "127.0.0.1".

My setup :

Windows Vista...
Apache listening and serving Trac and TestLink on localhost:8080
PHP 5.2.9
Trac 0.11.4
XMLRPC plugin works (tested /login/xmlrpc)
Python 2.5.4
TestLink 1.8.2

Thanks for your help,

Barbara
postb99
TestLink user
Posts: 10
Joined: Mon Jun 08, 2009 10:43 am

Post by postb99 »

xenita
TestLink user
Posts: 4
Joined: Mon Mar 30, 2009 11:57 am

Post by xenita »

In my case all these issues weer because I have not disable connection to svn, but connection itself wasn't configured, so the error was catch by TRAC and all other connections were disabled.
I disable the connection to svn and all stat work fine.
postb99
TestLink user
Posts: 10
Joined: Mon Jun 08, 2009 10:43 am

Post by postb99 »

OK, glad for you. I have a working SVN connection so will wait for the the resolution of the bug I mentioned.
Post Reply