Upgrade TestLink

If you are using an earlier version of the TeamForge - TestLink installer, you can upgrade to TeamForge - TestLink v2.1.3. However, you can use TeamForge - TestLink v2.1.3 only with TestLink v1.9.11.

If you have an earlier version of TestLink, you will not be allowed to proceed unless you upgrade to TestLink v1.9.11.

Important: This section contains instructions for a generic upgrade and so the downloadable file name used in this section is ctf-testlink-<single box or two box>-2.1.3.tar. You must download and install the appropriate file depending upon your TeamForge - TestLink server setup (single server, or two servers).
  1. Download the following files:
    • testlink-1.9.11.tar.gz from testlink.org.
    • ctf-testlink-<single box or two box>-2.1.3.tar file
  2. Take a backup of the current install.conf [/opt/collabnet/testlink-installer/installer/install.conf]file.
    • cp /opt/collabnet/testlink-installer/installer/install.conf /tmp/
  3. Edit the install.conf file by providing the location of the TestLink binaries as they were downloaded:
    • vi install.conf
    • testlink_download_location=/tmp/testlink-1.9.11.tar.gz
  4. Untar the ctf-testlink-<single box or two box>-2.1.3.tar file to the /opt/collabnet directory.
    • cd /opt/collabnet/
    • tar zxvf /tmp/ctf-testlink-<single box or two box>-2.1.3.tar
  5. Copy install.conf from the /tmp directory.
    • cd testlink-installer/Installer
    • cp /tmp/install.conf
    Important:
    If you are upgrading from TeamForge - TestLink v2.1.1, before copying, you must edit install.conf to make sure all the tokens are set correctly.
    Warning: While editing the install.conf file, do not set the path to /opt/collabnet as this will completely wipe out the collabnet folder (with all the files inside that folder) and recreate a new one.
  6. Install the TestLink application.
    • cd /opt/collabnet/testlink-installer
    • ./install.py -i
  7. Recreate the runtime. ./install.py -r
    Note: For every TeamForge migration or update, you must recreate the runtime for TestLink.
  8. If you are upgrading from an older version (TeamForge - TestLink v2.1.1), you must upgrade your TestLink database version (DBv1.9.9 to DBv1.9.11) by doing the following:
    1. Connect to MySQL by running the following command:
      • mysql -u<user> -p<password>

      For example:

      • mysql -utestlink -ptestlink
    2. In the MySQL prompt, run the following:

      <mysql>use testlink

      <mysql>CREATE TABLE execution_tcsteps (execution_id int(10) unsigned NOT NULL default '0', tcstep_id int(10) unsigned NOT NULL default '0', notes text, status char(1) default NULL, PRIMARY KEY (`execution_id`,`tcstep_id`) ) DEFAULT CHARSET=utf8;

      <mysql>INSERT INTO /*prefix*/db_version (version,notes,upgrade_ts) VALUES('DB 1.9.11', 'TestLink 1.9.11',CURRENT_TIMESTAMP());

  9. Restart TeamForge. /etc/init.d/collabnet restart
  10. Upload the newly generated XML files to TeamForge.
    Note: For a two box setup, copy and upload the newly generated JAR files to the TeamForge server.

Migrate TeamForge site from stage to production

While migrating TeamForge from stage to production, you need to do the following to get TestLink running with the version 2.1.3.

  1. Perform a fresh TestLink installation.
  2. Stop MySQL.
  3. Take a backup of the default MySQL from /var/lib/mysql.
  4. Mount the NetApp mysql volume.
  5. Start MySQL.
  6. Run install.py –r
  7. Restart TeamForge.

    If your data (MySQL database) resides in the NFS (Network File System) directory, and if it is an SELinux enabled box, then follow these steps.