TestLink 1.9.4 integration with JIRA

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
indioo
TestLink user
Posts: 3
Joined: Wed Sep 19, 2012 7:53 pm

TestLink 1.9.4 integration with JIRA

Post by indioo »

I'm trying to integrate TestLink 1.9.4 with JIRA 5.1.5, running in MacOSX.
TestLink is running through XAMPP 1.7.3 with MySQL database.

I've tried with both integration methods:

Jira SOAP:

1. Added $g_interface_bugs = 'JIRASOAP'; in the '/custom_config.inc.php' file.
2. Created a '/cfg/jirasoap.cfg.php' file with the following configuration:

Code: Select all

<?php
/* 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]');

/** The Username being used by JIRA logon */
define('BUG_TRACK_USERNAME', 'admin');

/** The Password being used by JIRA logon*/
define('BUG_TRACK_PASSWORD', 'admin');
/** link of the web server for JIRA*/
define('BUG_TRACK_HREF', "http://localhost:8080/");
/** path of JIRA WSDL */
define('BUG_TRACK_SOAP_HREF', "rpc/soap/jirasoapservice-v2?wsdl");

/** link of the web server for jira ticket*/
define('BUG_TRACK_SHOW_BUG_HREF', "browse/");
/** link of the web server for creating new jira ticket*/
define('BUG_TRACK_ENTER_BUG_HREF', "secure/CreateIssue.jspa");
?>
3. Just in case, enabled "Issue Tracker Integration" for my project in TestLink, with the following configuration in the "Issue Tracker Management" screen for "jira (interface: soap)" type selected:

Code: Select all

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]');
define('BUG_TRACK_USERNAME', 'admin');
define('BUG_TRACK_PASSWORD', 'admin');
define('BUG_TRACK_HREF', "http://localhost:8080/");
define('BUG_TRACK_SOAP_HREF', "rpc/soap/jirasoapservice-v2?wsdl");
define('BUG_TRACK_SHOW_BUG_HREF', "browse/");
define('BUG_TRACK_ENTER_BUG_HREF', "secure/CreateIssue.jspa");
4. When I go to "Test Execution" screen, I can read on the top:
Attention Please: Something is preventing connection to Bug Tracking System, and is going to create performance issues. Please contact your TestLink Administrator

No information in the log files though. And I check the SOAP services work in Jira (http://localhost:8080/rpc/soap/jirasoapservice-v2?wsdl).


Jira DB:

1. Added $g_interface_bugs = 'JIRA'; in the '/custom_config.inc.php' file.
2. Created a '/cfg/jira.cfg.php' file with the following configuration:

Code: Select all

<?php
/** The DB host to use when connecting to the JIRA db */
define('BUG_TRACK_DB_HOST', 'localhost:3306');

/** The name of the database that contains the jira tables */
define('BUG_TRACK_DB_NAME', 'jira');

/** The DB type being used by jira */
define('BUG_TRACK_DB_USER', 'root');

/** The DB password to use for connecting to the jira db */
define('BUG_TRACK_DB_PASS', '');

/** link of the web server for jira */
define('BUG_TRACK_HREF', "http://localhost:8080/"); 
//define('BUG_TRACK_HREF', "http://10.1.6.110:8080/browse/"); 

/** The DB type to use for connecting to the bugtracking db */
define('BUG_TRACK_DB_TYPE', 'mysql');

/** link to the bugtracking system, for entering new bugs */
define('BUG_TRACK_ENTER_BUG_HREF',"http://localhost:8080/secure/CreateIssue.jspa");
?>
3. Just in case, enabled "Issue Tracker Integration" for my project in TestLink, with the following configuration in the "Issue Tracker Management" screen for "jira (interface: soap)" type selected:

Code: Select all

define('BUG_TRACK_DB_HOST', 'localhost:3306');
define('BUG_TRACK_DB_NAME', 'jira');
define('BUG_TRACK_DB_USER', 'root');
define('BUG_TRACK_DB_PASS', '');
define('BUG_TRACK_HREF', "http://localhost:8080/");
define('BUG_TRACK_DB_TYPE', 'mysql');
define('BUG_TRACK_ENTER_BUG_HREF',"http://localhost:8080/secure/CreateIssue.jspa");
4. When I go to "Test Execution" screen, I can read this error message:
Fatal error: require_once() [function.require]: Failed opening required 'jiradbInterface.class.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear:.:/Applications/XAMPP/xamppfiles/htdocs/testlink/lib/functions/:/Applications/XAMPP/xamppfiles/htdocs/testlink/lib/issuetrackerintegration/:/Applications/XAMPP/xamppfiles/htdocs/testlink/third_party/') in /Applications/XAMPP/xamppfiles/htdocs/testlink/lib/functions/common.php on line 99

No information in the log files either.

I'd say I don't know the format for the configuration in the "Issue Tracker Management" screen, since the "Show configuration example" button doesn't work for me (no pop-up displayed). So I assumed the format is the same as in the .cfg.php files.

What else do I need to do or change to get this integration working?
GunnarD

Re: TestLink 1.9.4 integration with JIRA

Post by GunnarD »

You don't do it via .cfg files anymore in 1.9.4.

In webgui, go to project, then under "test project" select "Issue tracker management".

To bad that the documentation is not up to date anymore :(
indioo
TestLink user
Posts: 3
Joined: Wed Sep 19, 2012 7:53 pm

Re: TestLink 1.9.4 integration with JIRA

Post by indioo »

Nice to know then!

But how should the configuration format be in the "Issue Tracker Management" screen?
I guess my configuration is wrong... It might be xml format instead?

Thank you!
GunnarD

Re: TestLink 1.9.4 integration with JIRA

Post by GunnarD »

Just go there, select "Jira (Interface soap)" amd click "Show configuration example".

Then copy&Paste and change to what you want.

I don't have Jira, but i have done it with bugzilla and it was easy.
GunnarD

Re: TestLink 1.9.4 integration with JIRA

Post by GunnarD »

And worth notice, you do it per project, you can't do it global for all projects.
indioo
TestLink user
Posts: 3
Joined: Wed Sep 19, 2012 7:53 pm

Re: TestLink 1.9.4 integration with JIRA

Post by indioo »

Well, problem solved.

I couldn't get the pop-up for the configuration example... so I had to check the code under the /lib/issuetrackerintegration/code_testing/test.jirasoapInterface.class file.

Working nice now :)

Thanks everyone for the replies.
venn
TestLink user
Posts: 4
Joined: Wed Sep 19, 2012 7:52 pm

Re: TestLink 1.9.4 integration with JIRA

Post by venn »

Indioo, I've been resolving an equal problem with Jira and Testlink integration. Could you provide more info about action from your last post?
venn
TestLink user
Posts: 4
Joined: Wed Sep 19, 2012 7:52 pm

Re: TestLink 1.9.4 integration with JIRA

Post by venn »

We fix our problem. It linked with symbol '&' in uricreate tag in Issue Tracker Management/Configuration section. See more info by http://www.teamst.org/forum/viewtopic.p ... 004#p16940
El_Capitan
TestLink user
Posts: 1
Joined: Mon Oct 08, 2012 7:43 pm

Re: TestLink 1.9.4 integration with JIRA

Post by El_Capitan »

I can't seem to make ours work following the configuration example. When the Issue Tracker Integration is active for a project, when we try to view the Test Cases inside "Test Execution", the page won't display. Any ideas?
narsu
Advanced user
Posts: 43
Joined: Sat Feb 17, 2007 2:07 pm
Contact:

Re: TestLink 1.9.4 integration with JIRA

Post by narsu »

Hello!

I am also working for Integrate JIRA 5.1.7 and Testlink 1.9.4. There is something odd going on


I have installed all componets to virtual machine Windows server 2008 R2 with 32bit XAMPP 1.7.4 - VC6
Jira is also installed on same machine image

I have activated Testlink JIRA soap integration with values

Code: Select all

<!-- Template jirasoapInterface -->
<issuetracker>
<username>adminuser</username>
<password>adminuser</password>
<uribase>http://10.0.2.15:8080/</uribase>
<uriwsdl>http://10.0.2.15:8080/rpc/soap/jirasoapservice-v2?wsdl</uriwsdl>
<uriview>10.0.2.15:8080/browse/</uriview>
<uricreate>10.0.2.15:8080/secure/CreateIssue!default.jspa</uricreate>
</issuetracker>
But when I try to execute some test I will still get message
Attention Please:
Something is preventing connection to Bug Tracking System,
and is going to create performance issues.
Please contact your TestLink Administrator

When I look at event list:

I will see couple interesting events:

__CLASS_ - SOAP Fault: (code: Client, string: Function ("login") is not a valid method for this service)


E_NOTICE Use of undefined constant __CLASS_ - assumed '__CLASS_' - in C:\xampp\htdocs\testlink194\lib\issuetrackerintegration\jirasoapInterface.class.php - Line 203


IS this JIRA related problem? I can open those links eg. http://10.0.2.15:8080/rpc/soap/jirasoapservice-v2?wsdl
in browser?

BR,
NarsuMan
narsu
Advanced user
Posts: 43
Joined: Sat Feb 17, 2007 2:07 pm
Contact:

Re: TestLink 1.9.4 integration with JIRA

Post by narsu »

Some reporting around problem solving:

I have bee trying several ways to debug a problem:

I changed my localhost address to 127.0.0.1 -> no affect
I changed php.ini soap.wsdl_cache=0 - no affect


I have been trying to do some debugging to understand why connection is not working I found that code line 194
in jirasoapinterface.class.php cannot establish a connection to Jira. Error catch is happening something odd?

What could be next feasible way to debug a problem?

I am not php coder, just trying to find some evidence for real bug ? This is just a incident now :)

Br,
NarsuMan
narsu
Advanced user
Posts: 43
Joined: Sat Feb 17, 2007 2:07 pm
Contact:

Re: TestLink 1.9.4 integration with JIRA

Post by narsu »

More progress..

I will try to report all what I have found :) If you are working with same kind of issues:

INSTALLATION SCENARIO:

I am trying to install JIRA 5.1.7 with evaluation license version on Windows Server 2008 R2 + SP 1 + all updates
I have also installed XAMPP 1.7.4 version with VC6 support

CURRENT STATUS:

Testlink 1.9.4 is running xampp environment perfectly, but next step is to integrate Testlink with JIRA Soap interface.
This integration is now working yet! Testlink event manager is showing there is no login method available on Soap connection.....

NEW EVIDENCES:

This morning I tried to check what kind of wsdl responce I get from testlink.atlassian.com (Ondemand environment)

It's looking good :) Lot's of stuff in there https://testlink.atlassian.net/rpc/soap ... ce-v2?wsdl

But If I try to look at my own host's (localhost) JIRA wsdl response it is just limited version! This leads me to think that problem is JIRA originated? I have to try configure soap interface to do something else :)

My own server's wsdl response....
------------------
<wsdl:definitions targetNamespace="http://localhost:8080/rpc/soap/jirasoap ... "><!--WSDL created by Apache Axis version: 1.3-atlassian-1
Built on Sep 13, 2010 (04:22:38 GMT+10:00)--><wsdl:portType name="JiraSoapService">

</wsdl:portType><wsdl:binding name="jirasoapservice-v2SoapBinding" type="impl:JiraSoapService"><wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> ... dl:service name="JiraSoapServiceService"><wsdl:port binding="impl:jirasoapservice-v2SoapBinding" name="jirasoapservice-v2"><wsdlsoap:address location="http://localhost:8080/rpc/soap/jirasoap ... efinitions>
----------------------------

WHAT NEXT:

Any ideas what I should change at JIRA side to enable full wsdl responce
narsu
Advanced user
Posts: 43
Joined: Sat Feb 17, 2007 2:07 pm
Contact:

Re: TestLink 1.9.4 integration with JIRA 5.1.7 -Resolved

Post by narsu »

Hi!

This is a one resolution for my problems with Jira 5.1.7 and Testlink 1.9.4

I had to disable both

JIRA JSON-RPC Plugin

and

RPC JIRA Plugin/ System XML-RPC Services (xmlrpc)

Now I can get correct wsdl response from JIRA server!

:D I hope this helps some of you with new JIRA installations

BR,
NarsuMan

Please come to visit our project :) http://freenest.org
Post Reply