oracletestlink

Integrate TestLink with Mantis

The integration between TestLink and Mantis Bug Tracking System (BTS) has the following characteristics:

  • All communication between Test Link and the BTS is done through database tables.
  • Testlink (at the time of this writing) is neither able to send data to the BTS, either able to receive data from the BTS, in the traditional model of function call.

Once you have a running TestLink application at http://DOMAIN/testlink and a Mantis application at http://DOMAIN/mantis, follow the steps below to integrate both applications:

Mantis configuration

Allow anonymous logins for Mantis applications as below:

  • Create a user in the Mantis application from the manager control panel under the “Manage -> Manage Users” menu. For example, add a testlink user.

  • Check that this user is enabled and give it the “Reporter” access level.

  • Add the following lines in the /opt/bitnami/apps/mantis/htdocs/config_inc.php file

    $g_allow_anonymous_login = ON;
    $g_anonymous_account = 'testlink';
    
  • Log out from the Mantis application and check if the “Login Anonymously” link works properly.

Once you configure Mantis, create a sample project to integrate with TestLink.

There two different methods to configure the TestLink and Mantis connection, through the database or using SOAP. This guide documents the database method.

  • Browse to the TestLink application and click the “Issue Tracker Management” link.

  • Create a new issue tracker called “Mantis DB”. Select the type “Mantis (Interface: db)” and view the “configuration example” options.

  • Copy and paste the sample configuration below, changing the PASSWORD and DOMAIN placeholders to reflect your password and domain name, in the /opt/bitnami/apps/mantis/htdocs/config_inc.php file. Here is an example:

    <issuetracker>
    <dbhost>localhost:3306</dbhost>
    <dbname>bitnami_mantis</dbname>
    <dbtype>mysql</dbtype>
    <dbuser>bn_mantis</dbuser>
    <dbpassword>PASSWORD</dbpassword>
    <uribase>http://DOMAIN/mantis</uribase>
    <uriview>http://DOMAIN/mantis/view.php?id=</uriview>
    <uricreate>http://DOMAIN/mantis/</uricreate>
    <!-- Optional -->
    <statuscfg>
    <status><code>10</code><verbose>new</verbose><color>#ffa0a0</color></status>
    <status><code>20</code><verbose>feedback</verbose><color>#ff50a8</color></status>
    <status><code>30</code><verbose>acknowledged</verbose><color>#ffd850</color></status>
    <status><code>40</code><verbose>confirmed</verbose><color>#ffffb0</color></status>
    <status><code>50</code><verbose>assigned</verbose><color>#c8c8ff</color></status>
    <status><code>80</code><verbose>resolved</verbose><color>#cceedd</color></status>
    <status><code>90</code><verbose>closed</verbose><color>#e8e8e8</color></status>
    </statuscfg>
    <!-- Configure This if you want NON STANDARD BEHAVIOUR for considered issue resolved -->
    <resolvedstatus>
    <status><code>80</code><verbose>resolved</verbose></status>
    <status><code>90</code><verbose>closed</verbose></status>
    </resolvedstatus>
    </issuetracker>
    
  • Save this configuration and create or edit a TestLink project to assign this bug tracker system using the path “Test Project Management -> Project Name -> Issue Tracker Integration -> Active Mantis DB”.

  • Run the tests and you should see a new “BUG management” button:

TestLink bug management

  • Once you run a test, you can connect the test with a bug ID in Mantis.