Skip to main content

Self-Hosting TestLink

This document provides a comprehensive guide to self-hosting TestLink, an open-source test management tool. It covers prerequisites, installation steps, configuration, and basic troubleshooting.

Prerequisites

Before you begin the self-hosting process, ensure your environment meets the following requirements:

  • Operating System: Windows, Linux, macOS (TestLink is platform-independent, but your web server platform choice will influence the setup).
  • Software:
    • Web Server: Apache is highly recommended and commonly used.
    • PHP: TestLink requires PHP to run. The specific required version depends on the TestLink version. Consult the official TestLink documentation for compatibility information. Usually, PHP 7.2 or higher is required.
    • Database: MySQL is the recommended database. Again, consult the documentation for the required version. MySQL 5.7+ or MariaDB 10.x usually works well.
    • XAMPP/WAMP/LAMP (Recommended for beginners): These packages bundle Apache, PHP, and MySQL, simplifying the installation process.
      • XAMPP: Windows, Linux, macOS
      • WAMP: Windows
      • LAMP: Linux
    • (For standalone installations): You may need to install a mail transfer agent (MTA) like Sendmail or Postfix if you want to use TestLink's email features.

Installation (Using XAMPP/WAMP/LAMP)

This section describes the installation process using XAMPP. The process is similar for WAMP and LAMP.

  1. Download and Install XAMPP:

    Download the appropriate XAMPP package for your operating system from the Apache Friends website (https://www.apachefriends.org/). Follow the installation instructions provided on the website or within the installer.

  2. Start Apache and MySQL:

    After installation, open the XAMPP Control Panel. Start the Apache web server and the MySQL database server. Ensure that both services are running without errors.

  3. Download TestLink:

    Download the latest stable version of TestLink from the TestLink website (https://testlink.org/). Make sure to download the full package, not just update files.

  4. Extract TestLink Files:

    Extract the contents of the TestLink ZIP archive to a directory within your web server's document root. The document root is typically:

    • XAMPP: C:\xampp\htdocs\ (Windows) or /opt/lampp/htdocs/ (Linux) or /Applications/XAMPP/htdocs (macOS)
    • WAMP: C:\wamp\www\
    • LAMP: /var/www/html/

    It's good practice to create a dedicated subdirectory for TestLink, such as C:\xampp\htdocs\testlink\.

  5. Configure MySQL Database:

    • Open your web browser and navigate to http://localhost/phpmyadmin/. This will open the phpMyAdmin interface for managing your MySQL database.
    • Create a new database for TestLink. Choose a descriptive name, such as testlink_db.
    • Create a user for the TestLink database. Grant this user appropriate permissions (at least CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER) on the testlink_db database. Make a note of the username and password.
  6. Run the TestLink Installation Script:

    • Open your web browser and navigate to the TestLink directory (e.g., http://localhost/testlink/). You should see the TestLink installation page.
    • Follow the on-screen instructions to complete the installation. You will need to provide:
      • The database connection details (hostname, username, password, database name). Use the credentials you created in the previous step.
      • A username and password for the TestLink administrator account.
      • Other configuration options as prompted.
  7. Complete the installation

    Follow the provided instructions. If necessary, change define("$tlCfg->config_check_warning_mode", 'FILE'); in custom_config.inc.php to "SILENT".

  8. Login to TestLink:

    After the installation is complete, you should be able to log in to TestLink using the administrator credentials you created.

Configuration (Post-Installation)

After the initial installation, you'll likely need to configure TestLink further:

  • User Management: Create and manage users, assigning appropriate roles and permissions.
  • Project Management: Create projects and define test plans, test cases, and test suites.
  • Integration with Bug Trackers: Configure TestLink to integrate with bug tracking systems like Jira, Bugzilla, or MantisBT.
  • Email Configuration: Configure TestLink to send email notifications (e.g., when test cases are assigned or when test runs are completed). This may require configuring a mail server on your system.

Common Issues and Troubleshooting

  • Database Connection Errors: Verify that the MySQL server is running, that the database exists, and that the credentials you entered during the installation are correct. Check the MySQL error log for connection problems.
  • "file_uploads" issue: Enable allow_url_fopen in php.ini.
  • Blank Page or PHP Errors: Check the PHP error log for errors. Common causes include missing PHP extensions or incorrect PHP configuration. Enable error reporting in php.ini for debugging (set display_errors = On).
  • Permissions Issues: Ensure that the web server user (usually www-data or apache) has the necessary permissions to read and write to the TestLink files and directories.
  • Email Problems: Verify that your mail server is configured correctly and that TestLink is configured to use it. Check the mail server logs for errors.
  • "Session save path" error: If you encounter a session save path-related error, check your php.ini file's session.save_path configuration. Ensure that it is set to a valid directory and that the web server user has write access to that directory.

Upgrading TestLink typically involves replacing the old files with the files from the new version and running a database upgrade script. Always back up your database before performing an upgrade. Consult the official TestLink documentation for the specific upgrade procedure for your version. A general outline is:

  1. Backup the Database: Create a full backup of your TestLink database.
  2. Backup the TestLink Files: Back up your existing TestLink installation directory.
  3. Extract the New Version: Extract the files from the new TestLink version to a temporary directory.
  4. Copy the New Files: Copy the files from the temporary directory to your TestLink installation directory, overwriting the old files (except for the custom_config.inc.php file, which you should preserve or carefully merge any changes).
  5. Run the Database Upgrade Script: Navigate to the install directory in your TestLink installation directory and run the database upgrade script (usually via your web browser). Follow the on-screen instructions.
  6. **Check the logs and update file location details.

Further Reading

  • TestLink Official Documentation: [Link to Official Documentation] (Replace with the actual link)
  • TestLink Website: [Link to TestLink Site] (Replace with the actual link)

This documentation is a starting point. Refer to the official TestLink documentation for the most up-to-date and detailed information.