I want to migrate my existing Testlab installation to a new server, what should I take into account?


As a database-backed Java web application, the migration of Testlab should be quite simple. In the guide below, it is presumed Testlab is installed according to the installation guide provided


When doing so, please take care of the following (The DOMAINROOT below refers to the .../glassfish/domains/domain1/ directory on your server):


  1. Always familiarize yourself with the installation memo of the previous install before doing anything. The server (or servers) might have some on-site customizations in place which you might need to take into account when configuring the OS services on the new server. If you don't happen to have any documentation on the previous install, migrating the services might require expert server knowledge or outside support for your OS of choice.
  2. Also, if you a new to the installation of on-premise Testlab, it is suggested to read through the installation guide referred above. This is the easiest way to familiarize yourself with a typical Testlab installation. The OS on the new server must be configured accordingly to support the Testlab runtime.
  3. Transferring the needed binaries: The easiest way is most likely to just copy the whole home directory of the testlab user. This is the OS user you are running the Payara/Glassfish application server with. This copies the binaries of the application server and all on-disk configuration files present.
  4. Java JDK: Java JDK is provided by the OS and is installed outside of the testlab home directory. If the path or the version of Java JDK differs on the target server, depending on the configuration, the application server might not start. If this happens, refer to the .../glassfish/config/asenv.conf file and make sure to correct the path of the JVM, if needed. Usually, the location of the JVM is picked up automatically if the Java is installed correctly on the server.
  5. Database: Testlab is built on a PostgreSQL hosted relational database. The easiest way to migrate the database is to take a full backup of the data and restore it to a new server, with the provided tools of the database system.
  6. File attachments: Testlab stores the attached files to disk. Most likely the files are stored in the home directory of the testlab user and are transferred automatically when transferring the home directory (see 3.). If you don't know where the files are located, you might want to inspect the DOMAINROOT/lib/classes/testlab.properties file and check the "attachments.root.path" property. These files must be copied to the new server.
  7. License keys: License key files (stored in DOMAINROOT/lib/classes) are bound to the external hostname of the server. If the external FQDN of the server changes during the migration, you must request for new keys by contacting our support and providing us with the full FQDN (server name including the domain) of your new server. Simply put: The FQDN is the name of the host you use to access Testlab with your browser. If the FQDN stays the same but the internal hostname of the server OS changes, the old license keys are still valid and require no changes.
  8. Notes on configuration files: All configuration files of Testlab are most likely located in DOMAINROOT/lib/classes/ directory. After you copy all the files of testlab user to the new server, please go through the configuration files and make the needed changes to match the new environment. At least check that the following are correct (the list is not comprehensive):

    - testlab.properties / server.*: Configures the hostname of your Testlab server (most likely matches your FQDN of the server)
    - testlab.properties / attachments.root.path: The directory which holds the file attachments
    - testlab.properties / TokenRedirectServlet.allowed: Check that the address of the reporting component is still valid and if not, update accordingly.
    - testlab.properties / session.kill.urls: Check that the address is still valid and if not, update accordingly.
    - cas.properties / company.cas.url: Address for your CAS server. If you are making changes to your CAS environment too, please update accordingly.

  9. Domain configuration file: The application server holds it's configuration in DOMAINROOT/config/domain.xml file. If the host or the port of the database server changes during the migration, you need to inspect and update this file to match to the new environment. Please look for the elements referring to "TestLabPool" and "TestLabReadOnlyPool" and adjust the settings if needed.
  10. Reverse proxy: If you have set up a reverse proxy, locally on the server to be migrated, in front of Testlab (such as the recommended Nginx or, something else) please take care to migrate its configuration to the new server.
  11. Other components, init scripts et al: If you have any custom components running on the server related to your Testlab installation, please migrate them accordingly. Also, take care to migrate any possible init scripts you might have to start up the services related to Testlab or Testlab itself, if the server to be migrated has any.