Install TestLink integration on existing TeamForge and TestLink servers (glue)

If you are already using TeamForge and TestLink as two separate systems, running separately on two different servers, you can link them together using the TestLink integration installer. This installer links both the servers enabling TeamForge and TestLink to work as a single integrated application.

This section explains the installation of the TestLink integration installer on the TeamForge and TestLink servers. Before you begin the installation process, it is assumed that the TestLink server has the following set up:

Note: Do not proceed without upgrading to TestLink v1.9.11.

And the TeamForge server has the following already set up:

  1. Click https://ctf.open.collab.net/sf/go/projects.ctftestlink/frs and select the appropriate file to download.
    Note: Perform steps 1 to 8 in the TestLink server except the instruction to obfuscate TeamForge PostgreSQL database password explained in step 6.
  2. Untar the ctf-testlink-glue-installer-2.1.3.tar file to the /opt/ directory.
    • cd /opt/testlink-installer
  3. Modify the install.conf file values given in the following table to suit your installation environment.
    Option Description
    testlink_dir The path of the directory where the TestLink files and libraries are installed (directory containing index.php)
    domain=<domain name or host name> The TestLink site information. For example, mydomain.collab.net/testlink or testlink.collab.net. You need not give the protocol information here.
    protocol The protocol used for TestLink installation (http or https).
    database_name The MySQL database for TestLink.
    database_user The MySQL database user for TestLink.
    ctf_host The host name/IP address where TeamForge is installed.
    ctf_protocol The protocol used for TeamForge (http or https).
    ctf_db_name The database name for TeamForge.
    ctf_db_username The user name for the TeamForge database.
  4. Run the following command:
    • yum install python-psycopg2.x86_64 python-suds
  5. Run the following commands to provide permission to TestLink users to access the TestLink database:
    • mysql -uroot -p testlink
    • mysql> grant all on testlink.* to 'testlink'@'localhost';
    • mysql> FLUSH PRIVILEGES;
  6. Install the TestLink application.
    1. Run the following command:
      • ./install.py -i
    2. The following text will appear prompting you to provide the MySQL TestLink database password and the TeamForge PostgreSQL database password:
      • "Enter mysql password for testlink database"
        Note: Enter your existing mysql password.
      • "Enter postgres database password to connect to CTF"
      Important: To obtain the obfuscated TeamForge PostgreSQL database password, run the following command in the TeamForge server:
      • /opt/collabnet/teamforge/runtime/scripts/get-runtime-property.sh DATABASE_PASSWORD
  7. Create the runtime. ./install.py -r
  8. Create a namespace for TestLink.
    1. Go to the TestLink installer directory.
      • cd /opt/collabnet/testlink-installer/installer/files
      • vi createnamespace.php
    2. Change the CTF_BASE_URL to point to the correct host.
    3. Provide the user name and password of any user with site administrator privileges.
    4. Run the following command: php createnamespace.php
      Note: You must run it only once for a TestLink installation.
    5. The following text will appear prompting you to provide the TeamForge administrator user name and password:
      • "What administrative user would you like to use to integrate TestLink to TeamForge": <TeamForge administrator user name>
      • "What is the password for the user you entered": <TeamForge administrator password>
  9. The newly generated JAR files are found in /opt/testlink-installer/installer/conf of the TestLink server. Copy these files from the TestLink server and upload them to the TeamForge server. These JAR files can be uploaded via Admin > System Tools > Custom event handlers.
  10. The newly generated configuration files testlink-application.xml and testlink-deploy.xml are found in the /opt/collabnet/testlink-installer/installer/conf folder. Copy these files from the TestLink server and upload them onto the TeamForge server. These files enable the TestLink application to work as part of TeamForge. For more information on how to use them, see Configure TestLink for your TeamForge site. You will notice that the integration setup has been completed and is running successfully.
  11. Next, you must migrate TeamForge users to TestLink by running the following script in the TestLink server:
    • cd /opt/collabnet/testlink-installer
    • python migrate_users.py
    All TeamForge users are now available in TestLink.
    Note: Once the migration is done, every time new users are added in TeamForge, they are synchronized automatically with TestLink.

    Once the users are migrated to TestLink, the permission to access TestLink for migrated users has to be manually created in TeamForge.

  12. To access the existing projects in TestLink, you must migrate them to TeamForge. This migration includes all the project related data and users being moved from TestLink to TeamForge.
    Important: Users can be migrated from TestLink to TeamForge ONLY if the user name from TestLink is at least 3 characters in length.

    Perform the following steps in the TestLink server:

    1. Run the following migration script first:
      • cd /opt/testlink-installer
      • ./migrate_setup.sh
    2. Next run the following:
      • sudo ./migrate.py -p <project X>
      For example:
      • ./migrate.py -p 2boxsetup

      The following illustration shows the migration path.

    3. The following text will appear prompting you to enter the TeamForge administrator user name and password:
      • "What administrative user would you like to use to migrate TestLink Project to TeamForge": <TeamForge administrator user name>
      • "What is the password for the user you entered": <TeamForge administrator password>
    4. Restart TeamForge.