Testlink VS JIRA

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Testlink VS JIRA

Postby Ananth » Thu Jan 07, 2010 6:29 am

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.
Ananth
TestLink user
 
Posts: 2
Joined: Tue Jan 05, 2010 12:01 pm

Postby Amaradana » Mon Jan 11, 2010 8:03 am

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
Amaradana
Member of TestLink Community
 
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am

Postby Ananth » Mon Jan 11, 2010 9:03 am

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.
Ananth
TestLink user
 
Posts: 2
Joined: Tue Jan 05, 2010 12:01 pm

Postby eeijlar » Thu Jan 14, 2010 2:44 pm

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]
eeijlar
Advanced user
 
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Postby angelus » Mon Mar 29, 2010 8:02 pm

Hi Ananth,
I'm facing the same issue (blank page). Were you able to solve this integration with JIRA on Oracle backend? Thanks
angelus
TestLink user
 
Posts: 9
Joined: Wed Aug 12, 2009 3:07 pm
Location: Montreal, Quebec

Postby eeijlar » Tue Mar 30, 2010 8:53 am

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

Postby eeijlar » Tue Mar 30, 2010 9:04 am

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

Postby eeijlar » Tue Mar 30, 2010 9:09 am

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

Postby eeijlar » Tue Mar 30, 2010 9:10 am

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
eeijlar
Advanced user
 
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Postby angelus » Tue Mar 30, 2010 5:04 pm

Thanks eeijlar for the info. I will try it and will let you know. :)
angelus
TestLink user
 
Posts: 9
Joined: Wed Aug 12, 2009 3:07 pm
Location: Montreal, Quebec


Return to Installation and configuration



Who is online

Users browsing this forum: No registered users and 4 guests