Testlink VS JIRA

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
Ananth
TestLink user
Posts: 2
Joined: Tue Jan 05, 2010 12:01 pm

Testlink VS JIRA

Post by Ananth »

Hi,

I am new user for testlink and trying to integrate jira with testlink.
I am having the testlink and jira setup that runs on different servers. The jira works with oracle backend.

Placed the necessary entries, as mentioned below in jira.cfg.php and custom_config.inc.php file

In jira.cfg.php file

define('BUG_TRACK_DB_HOST', 'hostname');
define('BUG_TRACK_DB_NAME', 'dbname');
define('BUG_TRACK_DB_USER', 'dbusername');
define('BUG_TRACK_DB_PASS', 'dbpassword');
define('BUG_TRACK_DB_TYPE', 'ORACLE');
/** also tried this
define('BUG_TRACK_DB_TYPE', 'oci8'); */

/** link to the bugtracking system, for viewing bugs */
define('BUG_TRACK_HREF', "corresponding url");
/** link to the bugtracking system, for entering new bugs */
define('BUG_TRACK_ENTER_BUG_HREF',"corresponding url");

In custom_config.inc.php file

$g_interface_bugs='JIRA';

$g_bugInterfaceOn = TRUE;
$g_bugInterface = null;
if ($g_interface_bugs != 'NO')
require_once(TL_ABS_PATH . 'lib/bugtracking/int_jira.php');

No error was received when i open the testlink. But unable to see the bug tracking link for failure cases . Am i missing something.

I have been searching forum for this topic. But haven't get any good solution.

Has anyone successfully integrated TestLink with JIRA with an Oracle backend?

Please help me..


Thanks in advance.
Amaradana
Member of TestLink Community
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am
Contact:

Post by Amaradana »

hi,
Did u change the following line in Config.inc.php?

$g_interface_bugs = 'NO'; to $g_interface_bugs = 'JIRA';
Thanks,
TesterWorld
Http://amartester.blogspot.com
Ananth
TestLink user
Posts: 2
Joined: Tue Jan 05, 2010 12:01 pm

Post by Ananth »

Hi Amaradana,

Thanks for the reply.

When i change the
the following line in Config.inc.php,

$g_interface_bugs = 'NO'; to $g_interface_bugs = 'JIRA';

I am just receiving blank page and unable to login with Testlink.

Also haven't find any errors in the log file.
eeijlar
Advanced user
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Post by eeijlar »

Hi,

I have integrated Testlink with JIRA and an Oracle backend. My advice first is to check your connection to the Oracle JIRA instance using a piece of code like this:

Code: Select all


 PutEnv("ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/");
   PutEnv("LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib");
   PutEnv("PATH=$ORACLE_HOME/bin:$PATH");


$conn = oci_connect("jira user", "jira user password", "lego102") or die "Could not connect";

    $stid = oci_parse($conn, "SELECT s.pname as issuestatus FROM issuestatus s, jiraissue i WHERE i.pkey='bug id' AND i.issuestatus = s.ID");
    oci_execute($stid);

    $nrows = oci_fetch_all($stid, $results);

    echo "<html><head><title>Oracle PHP Test</title></head><body>";
    echo "<center><h2>Oracle PHP Test</h2><br>";
    echo "<table border=1 cellspacing='0' width='50%'>\n<tr>\n";
    echo "<td><b>Bug</b></td>\n<td><b>Status</b></td>\n</tr>\n";

    for ($i = 0; $i < $nrows; $i++ ) {
      echo "<tr>\n";
      echo "<td>PMUC-148</td><td>". $results["ISSUESTATUS"][$i] . "</td>";
      echo "</tr>\n";
    }

    echo "<tr><td colspan='2'> Number of Rows: $nrows</td></tr></table>";
    echo "<br><em>If you see data, then it works!</em><br></center></body></html>\n";

?>

[/code]
angelus
TestLink user
Posts: 9
Joined: Wed Aug 12, 2009 3:07 pm
Location: Montreal, Quebec

Post by angelus »

Hi Ananth,
I'm facing the same issue (blank page). Were you able to solve this integration with JIRA on Oracle backend? Thanks
eeijlar
Advanced user
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Post by eeijlar »

If you are getting a blank page, then that means you have an error in your config file. Check the Apache log files to see what the error is. This is usually located somewhere like:

Code: Select all

/etc/httpd/logs/error_log
It depends though on what Linux distribution you are using.
eeijlar
Advanced user
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Post by eeijlar »

To test your connection to JIRA, create file called test.php and paste following code into it:

Code: Select all

<?php

 PutEnv("ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/");
   PutEnv("LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib");
   PutEnv("PATH=$ORACLE_HOME/bin:$PATH");


$conn = oci_connect("jira user", "jira user password", "jira_sid") or die "Could not connect";

    $stid = oci_parse($conn, "SELECT s.pname as issuestatus FROM issuestatus s, jiraissue i WHERE i.pkey='bug id' AND i.issuestatus = s.ID");
    oci_execute($stid);

    $nrows = oci_fetch_all($stid, $results);

    echo "<html><head><title>Oracle PHP Test</title></head><body>";
    echo "<center><h2>Oracle PHP Test</h2><br>";
    echo "<table border=1 cellspacing='0' width='50%'>\n<tr>\n";
    echo "<td><b>Bug</b></td>\n<td><b>Status</b></td>\n</tr>\n";

    for ($i = 0; $i < $nrows; $i++ ) {
      echo "<tr>\n";
      echo "<td>Bug Id</td><td>". $results["ISSUESTATUS"][$i] . "</td>";
      echo "</tr>\n";
    }

    echo "<tr><td colspan='2'> Number of Rows: $nrows</td></tr></table>";
    echo "<br><em>If you see data, then it works!</em><br></center></body></html>\n";

?> 
You will then need to modify the following to match your own installation:

- ORACLE_HOME
- jira_user
- jira_password
- jira_sid
- change WHERE i.pkey='bug id', replace 'bug id' with a bug you know exists on the JIRA database

[/list][/code]
eeijlar
Advanced user
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Post by eeijlar »

Another thing to try would be the following:

- create a file called index.php
- Paste the following code into it:

Code: Select all

<?php
phpinfo();
?>
- Browse to index.php
- You should see a lot of phpinfo
- Make sure that your Oracle driver is loaded:
- You should see a section called oci8 or similar, depening on the driver you are using.
eeijlar
Advanced user
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Post by eeijlar »

eeijlar wrote:To test your connection to JIRA, create file called test.php and paste following code into it:

Code: Select all

<?php

 PutEnv("ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/");
   PutEnv("LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib");
   PutEnv("PATH=$ORACLE_HOME/bin:$PATH");


$conn = oci_connect("jira user", "jira user password", "jira_sid") or die "Could not connect";

    $stid = oci_parse($conn, "SELECT s.pname as issuestatus FROM issuestatus s, jiraissue i WHERE i.pkey='bug id' AND i.issuestatus = s.ID");
    oci_execute($stid);

    $nrows = oci_fetch_all($stid, $results);

    echo "<html><head><title>Oracle PHP Test</title></head><body>";
    echo "<center><h2>Oracle PHP Test</h2><br>";
    echo "<table border=1 cellspacing='0' width='50%'>\n<tr>\n";
    echo "<td><b>Bug</b></td>\n<td><b>Status</b></td>\n</tr>\n";

    for ($i = 0; $i < $nrows; $i++ ) {
      echo "<tr>\n";
      echo "<td>Bug Id</td><td>". $results["ISSUESTATUS"][$i] . "</td>";
      echo "</tr>\n";
    }

    echo "<tr><td colspan='2'> Number of Rows: $nrows</td></tr></table>";
    echo "<br><em>If you see data, then it works!</em><br></center></body></html>\n";

?> 
You will then need to modify the following to match your own installation:

- ORACLE_HOME
- jira_user
- jira_password
- jira_sid
- change WHERE i.pkey='bug id', replace 'bug id' with a bug you know exists on the JIRA database

[/list][/code]
I forgot to say, after you have done that, then do:

- Open your web browser
- browse to test.php
- If it works you will see a message to indicate that it found the bug
angelus
TestLink user
Posts: 9
Joined: Wed Aug 12, 2009 3:07 pm
Location: Montreal, Quebec

Post by angelus »

Thanks eeijlar for the info. I will try it and will let you know. :)
Post Reply