Menu

Scenario Migration Tool

Overview

The Scenario Migration Tool is for customers using Scenario 1.0 who want to migrate their feature files to Scenario 2.0. The Scenario 1.0 Feature Files are stored in Postgres SQL, while Scenario 2.0 stores Feature Files in your chosen VCS and MongoDB.

The Scenario Migration Tool will automatically create your Scenario 1.0 Feature Files inside of MongoDB as well as your chosen VCS, as opposed to moving them manually. 

Prerequisite Applications

  • MongoDB 3.4-3.6 should be installed for your Operating System.
    • This version of MongoDB is already a requirement for the latest On Premise qTest Manager Version 9.0.
  • Install Node and NPM (Node Package Manager) for your Operating System.
    • Select the download option for the version labeled 'Recommended for Most Users.'

Before You Begin

You will need to collect the information listed below for each project migration so that you can enter your own values into the config file to run the script.

Additionally, you will want to install Scenario v2.0 prior to beginning the migration. You will need to request the download link from our Implementation Team and follow the instructions provided here for your operating system. 

Jira

  • Jira URL-your Jira URL, do not include "/" after the URL.
    jira_URL.png
  • Jira Email-your personal email used to login into Jira
  • Jira Access token-for security purposes we are using a personal access token instead of a password, follow these instructions to generate your personal Access Token.
  • Project Key- access the Jira Project(s) for which you are using Scenario 1.0 so that you can notate the Project Keys.
    • These are located in your Project List in the 'Key' column.
      Jira_Project_Key.png

Git Repository

Access to one of the supported Git Repositories:

  • GitHub Cloud
  • GitHub Enterprise
  • Bitbucket Cloud
  • Bitbucket Server

GitHub Cloud

You will need the following if your vcs is GitHub Cloud:

  • GitHub Username-this is your personal username for GitHub, not your email ID associated with GitHub
  • GitHub Repo Name-name of the GitHub repository you have created to store these feature files. We suggest creating this repository in advance. If you have already configured Scenario v2.0, you would want to use that same repository. 
  • GitHub Token-for security purposes we are using a personal Access Token instead of a password, follow these instructions to generate your personal Access Token. Make sure to provide all rights to the user before generating a personal access token. 

GitHub Enterprise

You will need the following if your vcs is GitHub Enterprise:

  • GitHub URL-your hosted GitHub Enterprise URL, do not include "/" after the URL.
  • GitHub Username-this is your personal username for GitHub, not your email ID associated with GitHub Enterprise.
  • GitHub Repo Name-name of the GitHub repository you have created to insert these feature files. We suggest creating this repository in advance. If you have already configured Scenario v2.0, you would want to use that same repository. 
  • GitHub Token-for security purposes we are using a personal Access Token instead of a password, follow these instructions to generate your personal Access Token. Make sure to provide all rights to the user before generating a personal access token. 

 

BitBucket Cloud

You will need the following if your vcs is Bitbucket Cloud:

  • BitBucket Username-this is your personal username for Bitbucket Cloud, not your email ID associated with Bitbucket Cloud.
  • BitBucket Repo Name-name of the Bitbucket Cloud repository you have created to insert these feature files. We suggest creating this repository in advance. If you have already configured Scenario v2.0, you would want to use that same repository.
  • BitBucket Password-your personal Bitbucket password.

BitBucket Server

You will need the following if your vcs is Bitbucket Server:

  • Bitbucket URL with Port Number-your hosted Bitbucket Server URL with the port number, do not include "/" after the URL.
  • Bitbucket Username-this is your personal username for Bitbucket Server, not your email ID associated with Bitbucket Server.
  • Bitbucket Repo Name-name of the Bitbucket Server repository you have created to insert these feature files. We suggest creating this repository in advance. If you have already configured Scenario v2.0, you would want to use that same repository.
  • Bitbucket Password-your personal Bitbucket password

qTest

  • qTest Username
  • qTest Domain-your qTest URL, do not include "/" after the URL.
  • qTest Access Token-you can generate access token using a rest API call to qTest. Please provide credentials according to the sample below. You will receive access_token as a response. Make sure you do POST operation.access.png

PostgreSQL

  • Postgres Hostname
  • Postgres Username
  • Postgres Password
  • Postgres Database Name-your Scenario v1.0 database name
  • Account Name-query this command in your PostgreSQL database to retrieve your client key/account name.
    SELECT client_key FROM t_instance WHERE base_url=‘<JIRA URL>’;

MongoDB

  • MongoDB URL with the Database Name-example: mongodb://localhost:27017/meteor

Clone the scenario migration tool from given repository

Clone the migration tool from here and store it at your convenient location on the machine.

Install the dependencies

Navigate to the migration tool folder using the console/command line and run the below command to install dependencies.

npm install

Sample Config File for Bitbucket Cloud:

Config_file_example_for_scenario_migration_tool.png

Setup the Config File

Add all the required details as shown in the config file.

Run the Script

You will run the script for each Project Key. Therefore, if you have 3 Projects you will want to run this script for each. We identify the projects using Project key from Jira. 

Edit the Config File

This step is required if you are migrating more than one Project. You must change the Jira credentials according to your project key in the config file every time you run the script. Changing Jira credentials is only necessary if you have multiple Jira instances running Scenario v1.0.

Log File 

A Log file is available for each migration performed and will store in the script folder as 'output.log.' The log file will display the project keys that migrated, the date of migration, and if any errors were received.

Errors

If errors are received, you can edit the config file to correct the errors and rerun the script.

When rerunning the script, if there are existing feature files in your VCS, they will be deleted/updated. Simultaneously, the documents in your MongoDB will be cleared which are associated with that particular Project Key.

 

 

 

 

Powered by Zendesk