This topic explains how to upgrade an existing TestRail installation to a new version. Please follow these steps to upgrade your TestRail installation.
As of TestRail 7.0, PHP 7.2.x is no longer supported. You can learn how to upgrade PHP here.
It is strongly recommended to make a backup of your TestRail installation files and TestRail database before upgrading to a newer version. In case there’s a problem with the upgrade, a backup is the only way to roll back the changes and revert to your previous (working) installation. We recommend making backups of your TestRail installation and database regularly, and especially before upgrading to a newer version.
Before proceeding with an upgrade to TestRail, please review the requirements documentation and operating specific instructions (Windows/Linux). Software dependencies such as PHP and SQL can change over time, so it is important to review these requirements prior to updating your TestRail software.
Replace installation files
To upgrade your TestRail installation, upload and extract the TestRail installation files to your web server and copy the files of the new TestRail version over your existing installation files. You can just replace all files, as files that are unique to your installation (e.g. the config.php file) aren’t part of the installation archive.
Some web server configurations can prevent files from being overridden while the web server is active. You might need to stop the web server before replacing TestRail’s installation files. We noticed that this happens mainly with Windows/IIS systems. If you have upgrade issues, try stopping the web server and overriding the files again.
Upgrading the database
Some, but not all, TestRail upgrades also need to upgrade the TestRail database. If a database upgrade is required, TestRail will automatically redirect you to the database upgrade screen when you access TestRail with your web browser. Only administrators can upgrade the database and all other users won’t be able to access TestRail until the database upgrade has been completed.
Once TestRail is updated and Cassandra settings are saved, you are ready to start the migration tool, which migrates your existing attachments from SQL database into Cassandra database.
SQL Server Database
$ cd migration_script (folder in TestRail application) $ php ./TestRailSqlToCassandraMigration.php -d9 -m"driver=sqlsrv;host=localhost;port=1433;database=testrail;user=testrail;password=123456789" -s"host=localhost;port=9042;keyspace=testrail;user=cassandra;password=cassandra"
$ cd migration_script (folder in TestRail application) $ php ./TestRailSqlToCassandraMigration.php -d9 -m"driver=mysql;host=localhost;port=3306;database=testrail;user=testrail;password=123456789" -s"host=localhost;port=9042;keyspace=testrail;user=cassandra;password=cassandra"
This process may take a while. Note that you will only see icons instead of attachments while the migration is taking place.
If you override current TestRail installation with new files, then you have to remove two old files from previous version:
- app/models/attachment.php - app/helpers/attachments.php