Execution

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 

  • 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

Controller

Installation

Plugins migration

For every plugin you are using you will have to copy the plugin binaries into the new controller lib folder and tweak the controller step.properties configuration file. See below instructions for each plugin.

HP ALM

  • Following jar files have to be copied on the controller, under ...\step-controller-X.Y.Z\lib\
    • alm-plugin-X.Y.Z.jar
    • alm-repository-X.Y.Z.jar
  • Following lines must be taken from the old controller step.properties configuration file and copied to new one, located at ...\step-controller-X.Y.Z\conf\step.properties.
  • almrepository.daemon.javapath=C:\YOUR\JAVA\PATH\java.exe
    almrepository.daemon.calltimeout=1200000
    almrepository.profile.prod.url=http://<ip>/qcbin/
    almrepository.profile.prod.user=<user>
    almrepository.profile.prod.pwd=<password>
    almrepository.bdd.parsers=step.repositories.parser.annotated.DefaultDescriptionStepParser,step.repositories.parser.CustomExpectedStepParser,step.repositories.parser.CustomDescriptionStepParser

    attachmentsdir=C:\YOUR\ATTACHMENTS\DIR\PATH

    tec.expressions.scriptbaseclass=TEMPLATE_FILE_NAME

  • If you are using groovy templates with this plugin, make sure to also copy the line used to start the controller located in file ...\step-controller-X.Y.Z\bin\startController.bat :
    • "%JAVA_PATH%java.exe" %JAVA_OPTS% -cp "..\lib\*;C:\YOUR\TEMPLATE\FOLDER\PATH" step.controller.ControllerServer -config=../conf/step.properties

SoapUI

  • Following jar files have to be copied on the controller, under ...\step-controller-X.Y.Z\lib\:
    • soapui-plugin-def-X.Y.Z.jar
    • soapui-plugin-handler-X.Y.Z.jar
  • The following lines must be taken from the old controller step.properties configuration file and copied to new one, located at ...\step-controller-X.Y.Z\conf\step.properties.
  • plugins.soapui.home=C:/YOUR/SOAPUI/PATH/SoapUI-X.Y.Z

JMeter

  • The following lines must be taken from the old controller step.properties configuration file and copied to new one, located at ...\step-controller-X.Y.Z\conf\step.properties.

    plugins.jmeter.home=C:/YOUR/JMETER/PATH/apache-jmeter-X.Y/

.NET Plugin

  • Copy the dotnet-plugin-X.Y.Z.jar file to  ...\step-controller-X.Y.Z\lib\

Node.js

  • Copy the node-plugin-X.Y.Z.jar file to  ...\step-controller-X.Y.Z\lib\

Configuration review

Now that you have migrated the plugins configuration, you will also have to migrate the remaining 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"
  • make sure the "parametermanager.config" entry is up to date (pointing to the Parameter.js configuration file location)
  • make sure the "screentemplate.config" entry is up to date (pointing to the ScreenTemplate.js configuration file location)
  • 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

Parameter.js

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

Make sure to migrate the settings coming from the old configuration file to the new one.

If you have any custom configuration entries in this file, you will have to insert them all into STEP using the GUI :

  • open your Parameter.js file and locate your custom configurations entries. See an example below :
    • ["IPADRESSE","192.168.0.1", "environment === 'DEV'"]
  • login in to STEP and click on the Parameters tab then on the "New parameter" button :

1525439585508-556.png

  • fill in the corresponding fields as per the entry found in the Parameter.js file and click on the "Save" button :

1525439733936-972.png

  • Repeat the operation for every parameter to insert

ScreenTemplate.js

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

Make sure to migrate the settings coming from the old configuration file to the new one.


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 Jonathan Rubiero on 2018/05/04 11:25
     
Copyright © exense GmbH
v1.0