Menu

Sessions 4.0.2 to 4.1 Single Server Upgrade Guide for Windows

Overview

In this article, we provide step-by-step instructions to upgrade qTest Sessions 4.0.2 to 4.1 on a single Windows machine. Please read the instructions thoroughly before starting your installations.

To request assistance with upgrading or obtain the self-upgrade links, complete the Upgrade Request Form and reference the OnPremise Upgrades Guide.

Note: If you are performing a fresh install, use the OnPremise New Install Form and reference the OnPremise Install Guide.

Before You Begin

  • qTest Sessions 4.1 only works with qTest Manager 9.0 or later.
  • If you are using an older version, you will need to upgrade to qTest Session 4.0.2 before proceeding to this version.

Read the following:

Collect Current Sessions Configurations

  1. Access the Sessions 4.0.2 folder.
    Example: c:\qtestctl
  2. Open the qtest.config file.
  3. Replace the blue text in the brackets with your custom values. Only the information listed below in blue should be updated, all other data should remain unchanged.
postgres {
  host = '[PostgreSQL server's IP or hostname]'
  port = '[PostgreSQL server's Port]'
  auth {
    user = '[PostgreSQL username]'
    pass = '[PostgreSQL password]'   
}
  db {
    qtest = '[Database name of qTest Manager]'
    session = '[Database name of qTest Sessions]'
  }
}
...
sessions {
  port = [qTest Sessions Running Port]
ssl {
  enabled = false
    key = '/absolute/path/to/dist/ssl/server.key'
   cert = '/absolute/path/to/dist/ssl/server.crt'
 

qtest {
    host = '[http or https]://[qTest Manager's IP or Hostname]:[Port]'
  mastertoken = "QToy"
  }
 storage {
    // value must in ['amazon_s3', 'disk_storage']   
// amazon_s3: stores resource files on amazon ec2
  // disk_storage: stores resource files on local disk
  type = "disk_storage"
  // if stores resource on EC2
  accesskey = ''
    secretkey = ''
    bucketname = ''
    // if stores resource on local disk
    rootpath = '/absolute/path/to/sessions/resources'
  }
}

Stop qTest Sessions

  1. Open the Command Prompt as an Administrator and navigate to C:\qtestctl folder
  2. Execute the command below to stop qTest Sessions.
C:\qtestctl> net stop qtest

Backup Data

  1. From the command prompt, execute this command to backup your data.
    Note: This command might take a while to complete.
    C:\qtestctl> qtestctl sessions:backup
  2. When the execution is successful, the backed up data is stored in: C:\qtestctl\sessions\build\tmp.

Upgrade to qTest Sessions 4.1

Download qTest Sessions 4.1

If you plan to upgrade qTest Sessions 4.1 in the same server as other qTest application(s), e.g. qTest Manager, you do not need to re-download the package but use the one you have already downloaded. Otherwise, download the new package at <DOWNLOAD LINK>.

  1. Assume that the new package is extracted to C:\qtestctl-4.1
  2. Navigate to the extracted folder C:\qtestctl-4.1 
  3. Editqtest.config’ file in your favorite text editor.

Configure Applications

  • If you are upgrading qTest Sessions on a separate machine, make sure there is a sessions item in the apps list.
apps = ['sessions']
  • If you are upgrading qTest Sessions on the same server with other qTest applications, e.g. qTest Manager, append sessions to the app list.
apps = ['manager', 'sessions']

Configure qTest Sessions Database

Navigate to the postgres section in the qtest.config file shown below to configure the qTest Sessions database. Use the collected database configurations in blue. Only the information listed below in blue should be updated, all other data should remain unchanged.

external {
postgres {
   host = '[PostgreSQL server's IP or hostname]'
   port = '[PostgreSQL server's Port]'
  auth {
     user = '[PostgreSQL username]'
     pass = '[PostgreSQL password]'   
}
  db {
     qtest = '[Database name of qTest Manager]'
     session = '[Database name of qTest Sessions]'
   }
}
  ...
}

Configure SSL

If you want to deploy qTest Sessions with SSL, navigate to the section common in the qTest.config file as shown below.
IMPORTANT: Replace the blue text in the brackets with your custom values. Only the information listed below in blue should be updated, all other data should remain unchanged

  • enable: set to true to enable a secure connection (HTTPS) between the user browser and the server. Default value is false.
  • cert: absolute path to the certificate file on this server. Please use \\ or / in the path. It is mandatory if enable is set to true.
  • key: absolute path to the private key file on this server. Please use \\ or / in the path. It is mandatory if enable is set to true.
  • pass: passphrase of your certificate. This field is optional (default value is empty).
  • strict: set this to false to allow self-signed SSL certificate.
common {
ssl {
enabled = false
cert = "${path}/server.crt"
key = "${path}/server.key"
pass = ""
strict = false
}
}

Configure qTest Sessions Server

  1. In the qtest.config file, navigate to the sessions section, shown below to configure your qTest Sessions server. Use the collected database configurations in blue. Only the information listed below in blue should be updated, all other data should remain unchanged.
  2. Save and close qtest.config file when you are done.
...
sessions {
port: [qTest Sessions Running Port]
...
qtest {
host = '[http or https]://[qTest Manager's IP or Hostname]:[Port]'
mastertoken='QToy'
}
storage {
// value must be in ['amazon_s3', 'disk_storage']
// * amazon_s3: stores resource files on amazon ec2
// * disk_storage: stores resource files on local disk
type = 'disk_storage'
// if storage type is set to amazon_s3, this is the access key to access to it
accesskey = ''
// if storage type is set to amazon_s3, this is the secret key to access to it
secretkey = ''
// if storage type is set to amazon_s3, this is the bucket where resource files are stored
bucketname = ''
// if storage type is set to disk_storage, this is the path to the directory where resource files are stored. Make sure you use \\ or / for the path
rootpath = '/absolute/path/to/sessions/resources'
}
...
}

Start qTest Sessions 

If this step is successful, you can install qTest Sessions as a Windows Service.

C:\qtestctl-4.1> qtestctl.bat start
Done configuration qTest site
Done configuration storage
<===========--> 85% EXECUTING [57m 45s]
> :sessions:start
> IDLE

Troubleshooting: if the step above is not successful, you need to rollback qTest Sessions to version 4.0.2 by following the steps below:

  1. Restore backup data by running below command from the qTest Sessions 4.0.2's qtestctl folder.
    > cd c:\qtestctl 
    c:\qtestctl> qtestctl sessions:restore
    Note: The command might take a while to complete depending on how large your data is.
  2. When the restore process is completed, execute the following command to start qTest Sessions 4.0.2:
    C:\qtestctl> net start qtest
  3. Contact Customer Support to troubleshoot the issue with upgrading qTest Sessions.

Install qTest Sessions as a Windows Service

Important: 

  • only proceed to this step when you have successfully started qTest Sessions.
  • If you upgrade qTest Sessions on the same machine with other qTest application(s), you only need to execute the command below once and only once when you have finished upgrading ALL the applications on this server. Refer to this article to learn more about installing qtest service.

You will install qTest Sessions as a Windows service to enable it to automatically start when Windows starts.

  1. In the Command Prompt, press `ctl + c` if qtestctl is running.
  2. Navigate to the  qTest Sessions 4.0.2 installation folder.
    Example: c:\qtestctl
  3. Execute the following command to uninstall qTest Sessions service.
    C:\qtestctl> Uninstall.bat
  4. Navigate to the folder
    C:\qtestctl-4.1
  5. Execute the command below to install qTest Sessions service.
    C:\qtestctl-4.1> Install.bat
  6. You have now finished upgrading qTest Sessions to version 4.1
  7. Access to qTest Sessions and verify the new version.
Subscribe To Our Blog
Powered by Zendesk