This page describes the specific migration tasks that have to be executed when migrating from a specific version to the following and suggests a general non-version specific migration process.

Specific migration tasks

3.9.x to 3.10.x

  • The attachments (saved in the folder configured with the property 'attachmentdir' until 3.9.x) are now managed by the new ResourceManager and will be saved in the resource directory (configured with the property 'resources.dir').

    No automatic migration of the attachments from the old attachments folder to the new resource folder will be done by STEP. Attachments generated under 3.9 will be therefore not available under 3.10. If you need to migrate your attachments please contact us.

  • Remote-Client API: The class step.client.ControllerClient of the remote API has been renamed step.client.StepClient. This should be changed accordingly in the code using this API. If you don't use the Remote-Client API, you're not concerned by this change.

General migration process

Stop running instance

  • If you installed STEP component as service, just stop the services.
  • If not, make sure to kill the associated Java processes (1 for the controller, 1 per agent).

Database

Backup

Case 1 : full backup

If you want to create a full dump of your database, follow the instruction below :

Perform a full backup of the STEP database : use the following command to output the dump to the backup folder:

mongodump -d step -o backup

Case 2 : partial backup

If you only want to backup your work and not the executions data, follow the instruction below :

  • use the following commands to export you keywords, test plans, users and scheduled entries :

mongoexport  -d step -c functions -o functions.json
mongoexport  -d step -c artefacts -o artefacts.json
mongoexport  -d step -c users -o users.json
mongoexport  -d step -c tasks -o tasks.json

Instance

Case 1 : new instance running instead of the old one

If your new STEP instance will replace the existing one, you have nothing to do regarding the database instance.

Case 2 : new instance running alongside the old one

Start new instance

If you new STEP instance will run alongside the existing one, you will have to start a new instance of MongoDB on a different port that the one used by the previous instance.

Follow below instruction in order to achieve this :

In ...\step-controller-X.Y.Z\bin\, edit the file startMongo.bat

  • Replace the line

%MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > mongod_%mydate%.log 2>&1

  • With

%MONGO_PATH%mongod.exe --port PORT_NUMBER -dbpath ..\data\mongodb > mongod_%mydate%.log 2>&1 

Then use this modified script to start your new MongoDB instance 

Restore the data

Now that your new instance is running, you can restore your data into it (considering the new MongoDB instance is running on port 27018) :

Case 1 : full backup available

Considering your backup folder is called "backup", execute the following command :

mongorestore --port 27018 -d step backup

Case 2 : partial backup available

Execute the following commands to restore your keywords, test plans, users and scheduled entries :

mongoimport --port 27018 -d step -c functions functions.json
mongoimport --port 27018 -d step -c artefacts artefacts.json
mongoimport --port 27018 -d step -c users users.json
mongoimport --port 27018 -d step -c tasks tasks.json

This page describes the specific manual migration tasks that have to be executed when migrating from one specific version to the next.

It also suggests a general migration process.

Controller

Installation

Configuration review

You will have to migrate the configurations entries from the old configurations files to the new ones.

step.properties

Default path : ...\step-controller-X.Y.Z\conf\step.properties.

  • make sure the "demo" entry is set to "false"
  • leave other entries untouched
Case 1 : new instance running instead of the old one

If your new installation will replace the current one, replace the following entries with the old configuration file values :

  • port
  • grid.port
  • db.host
  • db.port
  • db.database
Case 2 : new instance running alongside the old one

If your new installation will run alongside the existing one, make sure to update the following settings with the new instance corresponding values:

  • port
  • grid.port
  • db.host
  • db.port

Agents

Installation

Configuration review

Note that you will have to repeat below steps for every agent.

Migrate the configurations entries from the old configurations file to the new one :

AgentConf.json

Default path :  ...\step-agent-X.Y.Z\conf\AgentConf.json

  • Compare the content of the old configuration file with the new one and adjust the necessary settings : (do not simply erase the new configuration file with the old one, you may loose any new settings introduced by the release)
  • If you new instance is running alongside the existing one, make sure to update the agents port used to connect to the controller Grid !!!

{
"gridHost":"http://localhost:CONTROLLER_GRID_PORT",
....
}

Binaries migrations

If you have installed any custom binaries in the Agent bin folder, make sure copy them to the new agents bin folder at  ...\step-agent-X.Y.Z\bin

Keywords

Re-compilation

In order for your keyword to work in a newest version of STEP, you will have then to recompile them with the new version of the STEP Api.

  • For Java, you can change the version of Step specified in your pom.xml
  • For .NET, follow below steps :
    • Remove the dependencies of Newtonsoft.Json, ScriptDev and ScriptApi from your Visual Studio project

      1526479857654-525.png

    • You will find the new version of these 3 DLLs in the bin folder of the new agent. You need to add them back to your Visual Studio project.
    • Rebuild your project and make sure the Keyword DLL is generated properly.
    • Go to next section "Re-deployment"

Re-deployment

Once your keyword have been recompiled, if the keyword location has changed you will have to update it using STEP GUI :

  • Click on the Keywords tab, search your keyword and click on the Configure button :

1525437178268-576.png

  • Update the keyword path and press the Save button

1525437239861-843.png

Validation

Once you recompiled and redeployed your Keywords, we highly advise you to run a Smoke Test in order to make sure the migration completed successfully.

Tags:
Created by Jerome Brongniart on 2019/03/11 13:43
     
Copyright © exense GmbH
v1.0