Prerequisites


STEP requires at least Java 8 installed in order to run. Depending on your platform, make sure to install at least Java JDK 8 on the machine(s) running STEP component(s).

Installation


Database

Follow instructions at : MongoDB documentation

Configuration

If you want to tune your MongoDB instance, you will find all necessary informations on the official website at : MongoDB configuration and maintenance.

Controller

Controller latest version can be downloaded from our Github repository at : STEP.

You can then extract the zip file with any unarchiver tool that support the zip format.

Folder Structure

Below the description of the Controller structure folder :

controller/
├── bin  : contains startup scripts
├── conf : contains configurations files
├── data : contains demo scripts and testing data
├── ext  : default location for external software binaries
├── lib  : contains dependencies libraries
└── log  : default location for the log files

Configuration

Configuration files can be found under the controller/conf folder and contains the following :

conf/
├── Parameters.js
├── QuotaManagerConfig.xml
├── ScreenTemplates.js
└── step.properties

Main configuration file that needs to be tuned is step.properties, other ones can be left untouched. You will have to amend this file in the following way :

  • port = <port_to_access_controller_gui>
  • grid.port = <port_for_agents_to_access_the_controller>
  • db.host = <mongo_hostname_or_ip>
  • db.port = <mongo_port>

For example :

  • port = 8080 -> Controller GUI will be accesible on port 8080
  • grid.port = 8081 -> Agents will connect to the Controller on port 8081
  • db.host = 127.0.0.1 -> Controller will try to access to MongoDB running on localhost
  • db.port = 27017 -> Controller will try to access to MongoDB on port 27017

Startup

Startup scripts can be found under controller/bin and contains the following :

bin/
├── logback.xml
├── startController.bat
├── startController.command
├── startController.sh
├── startMongo.bat
├── startMongo.command
└── startMongo.sh

There are convenients scripts in order to start MongoDB too, you can use them once you have MongoDB installed and set in your path.
Warning : before trying to start the Controller, make sure Java binaries are set in your system path !

Depending on your platform, they are various ways to start the Controller :

  • Windows
    execute startController.bat
  • Linux
    make startController.sh executable and execute it
  • Mac OS
    make startController.command executable and execute it.

The web application should now be available on your host on the port you defined in the configuration file (for example at http://localhost:8080)
You will be then prompted for login information, default is admin // init :

LoginScreen.png

You can now see the Controller interface, by default opened on the "Plan" tab :

PlanTab.png

Maintenance

Running process

Depending on your platform, they are various ways to check if the Controller is running :

  • Windows
    open the Task Manager and look for the Java processes
  • Linux
    execute the following command as : ps -efl | grep ControllerServer. You should end up with the PID of the running process
  • Mac OS
     ????

Log file

The Controller log file will be created on first startup under the log folder. (You can change the log file location by editing the bin/logback.xml file). A successfull startup should display the following entry into the log file :

2017-09-26 02:02:11,371 INFO [main] o.e.j.u.log [Log.java:186] Logging initialized @1068ms
2017-09-26 02:02:12,046 INFO [main] o.r.Reflections [Reflections.java:229] Reflections took 560 ms to scan 13 urls, producing 124 keys and 413 values
2017-09-26 02:02:12,241 INFO [main] o.m.d.cluster [SLF4JLogger.java:71] Cluster created with settings {hosts=[mongo:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2017-09-26 02:02:12,278 INFO [main] o.m.d.cluster [SLF4JLogger.java:71] Cluster created with settings {hosts=[mongo:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2017-09-26 02:02:12,464 INFO [cluster-ClusterId{value='59c9b524133ae60008eec74f', description='null'}-mongo:27017] o.m.d.connection [SLF4JLogger.java:71] Opened connection [connectionId{localValue:2, serverValue:2}] to mongo:27017
2017-09-26 02:02:12,470 INFO [cluster-ClusterId{value='59c9b524133ae60008eec74f', description='null'}-mongo:27017] o.m.d.cluster [SLF4JLogger.java:71] Monitor thread successfully connected to server with description ServerDescription{address=mongo:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 4, 9]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, roundTripTimeNanos=3533336}
2017-09-26 02:02:12,491 INFO [cluster-ClusterId{value='59c9b524133ae60008eec74e', description='null'}-mongo:27017] o.m.d.connection [SLF4JLogger.java:71] Opened connection [connectionId{localValue:1, serverValue:1}] to mongo:27017
2017-09-26 02:02:12,498 INFO [cluster-ClusterId{value='59c9b524133ae60008eec74e', description='null'}-mongo:27017] o.m.d.cluster [SLF4JLogger.java:71] Monitor thread successfully connected to server with description ServerDescription{address=mongo:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 4, 9]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, roundTripTimeNanos=6662765}
2017-09-26 02:02:12,900 INFO [main] o.m.d.connection [SLF4JLogger.java:71] Opened connection [connectionId{localValue:3, serverValue:3}] to mongo:27017
2017-09-26 02:02:14,453 INFO [main] s.i.InitializationPlugin [InitializationPlugin.java:110] Searching for artefacts of type 'CallFunction' to be migrated...
2017-09-26 02:02:14,456 INFO [main] s.i.InitializationPlugin [InitializationPlugin.java:139] Migrated 0 artefacts of type 'CallFunction'
2017-09-26 02:02:14,456 INFO [main] s.i.InitializationPlugin [InitializationPlugin.java:143] Searching for artefacts of type 'FunctionGroup' to be migrated...
2017-09-26 02:02:14,458 INFO [main] s.i.InitializationPlugin [InitializationPlugin.java:166] Migrated 0 artefacts of type 'FunctionGroup'
2017-09-26 02:02:14,458 INFO [main] s.i.InitializationPlugin [InitializationPlugin.java:143] Searching for artefacts of type 'CallFunction' to be migrated...
2017-09-26 02:02:14,459 INFO [main] s.i.InitializationPlugin [InitializationPlugin.java:166] Migrated 0 artefacts of type 'CallFunction'
2017-09-26 02:02:16,210 INFO [main] o.r.c.MeasurementAccessor [MeasurementAccessor.java:74] Initializing db with address=mongo:27017, credentials=[]
2017-09-26 02:02:16,210 INFO [main] o.m.d.cluster [SLF4JLogger.java:71] Cluster created with settings {hosts=[mongo:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2017-09-26 02:02:16,212 INFO [main] o.m.d.cluster [SLF4JLogger.java:71] Cluster description not yet available. Waiting for 30000 ms before timing out
2017-09-26 02:02:16,218 INFO [cluster-ClusterId{value='59c9b528133ae60008eec75c', description='null'}-mongo:27017] o.m.d.connection [SLF4JLogger.java:71] Opened connection [connectionId{localValue:4, serverValue:6}] to mongo:27017
2017-09-26 02:02:16,219 INFO [cluster-ClusterId{value='59c9b528133ae60008eec75c', description='null'}-mongo:27017] o.m.d.cluster [SLF4JLogger.java:71] Monitor thread successfully connected to server with description ServerDescription{address=mongo:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 4, 9]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, roundTripTimeNanos=559924}
2017-09-26 02:02:16,639 INFO [main] o.r.Reflections [Reflections.java:229] Reflections took 270 ms to scan 13 urls, producing 124 keys and 413 values
2017-09-26 02:02:16,861 INFO [main] o.e.j.s.Server [Server.java:327] jetty-9.2.17.v20160517
2017-09-26 02:02:18,048 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.ServletContextHandler@acd3460{/,null,AVAILABLE}
2017-09-26 02:02:18,068 INFO [main] o.e.j.s.ServerConnector [AbstractConnector.java:266] Started ServerConnector@5bba9949{HTTP/1.1}{0.0.0.0:8081}
2017-09-26 02:02:18,069 INFO [main] o.e.j.s.Server [Server.java:379] Started @7768ms
2017-09-26 02:02:18,208 WARN [main] o.e.j.s.h.ContextHandler [ContextHandler.java:1344] o.e.j.s.h.ContextHandler@206bd7a0{/,null,null} contextPath ends with /
2017-09-26 02:02:18,214 WARN [main] o.e.j.s.h.ContextHandler [ContextHandler.java:1344] o.e.j.s.h.ContextHandler@5a31abe9{/,null,null} contextPath ends with /
2017-09-26 02:02:18,216 WARN [main] o.e.j.s.h.ContextHandler [ContextHandler.java:1344] o.e.j.s.h.ContextHandler@2dacda9a{/,null,null} contextPath ends with /
2017-09-26 02:02:18,275 INFO [main] o.q.i.StdSchedulerFactory [StdSchedulerFactory.java:1184] Using default implementation for ThreadExecutor
2017-09-26 02:02:18,299 INFO [main] o.q.c.SchedulerSignalerImpl [SchedulerSignalerImpl.java:61] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2017-09-26 02:02:18,302 INFO [main] o.q.c.QuartzScheduler [QuartzScheduler.java:240] Quartz Scheduler v.2.2.1 created.
2017-09-26 02:02:18,304 INFO [main] o.q.s.RAMJobStore [RAMJobStore.java:155] RAMJobStore initialized.
2017-09-26 02:02:18,307 INFO [main] o.q.c.QuartzScheduler [QuartzScheduler.java:305] Scheduler meta-data: Quartz Scheduler (v2.2.1) 'QuartzScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

2017-09-26 02:02:18,308 INFO [main] o.q.i.StdSchedulerFactory [StdSchedulerFactory.java:1339] Quartz scheduler 'QuartzScheduler' initialized from an externally provided properties instance.
2017-09-26 02:02:18,308 INFO [main] o.q.i.StdSchedulerFactory [StdSchedulerFactory.java:1343] Quartz scheduler version: 2.2.1
2017-09-26 02:02:18,312 INFO [main] o.q.c.QuartzScheduler [QuartzScheduler.java:2311] JobFactory set to: step.core.scheduler.ExecutionJobFactory@153409b8
2017-09-26 02:02:18,313 INFO [main] o.q.c.QuartzScheduler [QuartzScheduler.java:575] Scheduler QuartzScheduler_$_NON_CLUSTERED started.
2017-09-26 02:02:18,341 INFO [main] o.e.j.s.Server [Server.java:327] jetty-9.2.17.v20160517
2017-09-26 02:02:19,100 INFO [main] o.e.j.w.StandardDescriptorProcessor [StandardDescriptorProcessor.java:297] NO JSP Support for /rtm, did not find org.eclipse.jetty.jsp.JettyJspServlet
2017-09-26 02:02:19,289 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.w.WebAppContext@9825465{/rtm,file:/tmp/jetty-0.0.0.0-8080-rtm-2.0.3.war-_rtm-any-4312820959754652971.dir/webapp/,AVAILABLE}{../ext/rtm-2.0.3.war}
2017-09-26 02:02:19,290 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.h.ContextHandler@206bd7a0{/scripteditor,null,AVAILABLE}
2017-09-26 02:02:19,290 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.h.ContextHandler@5a31abe9{/seleniumplugin,null,AVAILABLE}
2017-09-26 02:02:19,291 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.h.ContextHandler@2dacda9a{/jmeterplugin,null,AVAILABLE}
2017-09-26 02:02:19,645 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.ServletContextHandler@36cf6377{/rest,null,AVAILABLE}
2017-09-26 02:02:19,646 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.h.ContextHandler@2befb16f{/,null,AVAILABLE}
2017-09-26 02:02:19,647 INFO [main] o.e.j.s.h.ContextHandler [ContextHandler.java:744] Started o.e.j.s.ServletContextHandler@3151277f{/files,null,AVAILABLE}
2017-09-26 02:02:19,647 INFO [main] o.e.j.s.ServerConnector [AbstractConnector.java:266] Started ServerConnector@2d117280{HTTP/1.1}{0.0.0.0:8080}                                                                                                            2017-09-26 02:02:19,648 INFO [main] o.e.j.s.Server [Server.java:379] Started @9347ms

Troubleshooting

Startup issues

If you encounter any startup issues, please make sure to check the following :

  • An instance is not already running (adress already bound to port)
  • Nothing is running on ports you defined in the step.properties configuration file (default port 8080 for the http application and 8081 for the grid endpoint)
  • A MongoDB instance is running on the server and port you defined in the step.properties configuration file (default port 27017 and host is localhost)
  • You have sufficient memory to start the JVM
  • You're starting the controller from its bin/ folder
  • You've checked your logs for other typical errors (log/ folder)
  • You haven't edited the classpath or otherwise made any mistake while editing the start script
  • Java is installed on the system or that you've set the JDK variable inside the start script

Agent


Agent latest version can be downloaded from our Github repository at : STEP.

You can then extract the zip file with any unarchiver tool that support the zip format.

Folder Structure

Below the description of the Agent structure folder :

agent/
├── bin  : contains startup scripts
├── conf : contains configurations files
├── ext  : default location for external software binaries and libraries
├── lib  : contains dependencies libraries
└── log  : default location for the log files

Configuration

Configuration files can be found under the agent/conf folder and contains the following :

conf/
├── AgentConf.json

Only configuration file that needs to be tuned is AgentConf.json You will have to amend this file in the following way :

  • "gridHost":"<url_to_access_controller_grid>",

For example :

  • "gridHost":"http://controller:8081" -> Means that the Agent will try to connect to the port 8081 of the host called controller

You can also define the agent token capacity according to the ressource allowed to each agent by setting up the capacity value :

  • "capacity": <token_number>

Keep in mind that the token number represent the number of parallel executions that will be allowed to run on the machine where the agent is installed.

For example :

  • "capacity":200 -> Means that maximum 200 executions can run in parallel on this agent

Startup

Startup scripts can be found under agent/bin and contains the following :

bin
├── logback.xml
├── startAgent.bat
├── startAgent.command
└── startAgent.sh

Warning : before trying to start the Agent, make sure Java binaries are set in your system path !

Depending on your platform, they are various ways to start the Agent :

  • Windows
    execute startAgent.bat
  • Linux
    make startAgent.sh executable and execute it
  • Mac OS
    make startAgent.command executable and execute it.

Going to the Controller inteface under the "Grid" tab will show you that your agent is now connected and ready to receive requests from the Controller :

GridTab.png

Maintenance

Running process

Depending on your platform, they are various ways to check if the Agent is running :

  • Windows
    open the Task Manager and look for the Java processes
  • Linux
    execute the following command as : ps -efl | grep Agent. You should end up with the PID of the running process
  • Mac OS
     ????

Log file

The Agent log file will be created on first startup under the log folder. (You can change the log file location by editing the bin/logback.xml file). A successfull startup should display the following entry into the log file :

[Expand]

2017-09-26 13:22:40,639 INFO [main] o.e.j.s.Server [Server.java:379] Started @1326ms

Troubleshooting

Startup issues

If you encounted any startup issues, make sure to check the following :

  • You have sufficient memory to start the agent
  • You are starting the agent from its bin/ folder
  • You haven't edited the classpath or otherwise made any mistake while editing the start script.
  • You've checked your logs for other typical errors (log/ folder)
  • You haven't edited the classpath or otherwise made any mistake while editing the start script
  • Java is installed on the system or that you've set the JDK variable inside the start script*

Backup


Assuming you are running MongoDB with the default settings (host localhost, port 27017, no authentication), you can perform backups following below instructions.

Complete backup

To perform a full backup of the STEP database, use the following command to output the backup to the backup folder:

mongodump -d step -o backup

If you prefer create a compressed archive, use the following :

mongodump -d step --gzip --archive=backup.gzip

You should see the following output which confirms the backup succeeded :

mongodump -d step -o backup
2017-10-05T10:45:39.677+0000    writing step.functions to
2017-10-05T10:45:39.677+0000    writing step.reports to
2017-10-05T10:45:39.677+0000    writing step.artefacts to
2017-10-05T10:45:39.677+0000    writing step.views to
2017-10-05T10:45:39.678+0000    done dumping step.functions (6 documents)
2017-10-05T10:45:39.678+0000    writing step.measurements to
2017-10-05T10:45:39.678+0000    done dumping step.reports (3 documents)
2017-10-05T10:45:39.678+0000    writing step.users to
2017-10-05T10:45:39.679+0000    done dumping step.measurements (2 documents)
2017-10-05T10:45:39.679+0000    writing step.controllerlogs to
2017-10-05T10:45:39.679+0000    done dumping step.users (1 document)
2017-10-05T10:45:39.679+0000    writing step.executions to
2017-10-05T10:45:39.680+0000    done dumping step.artefacts (6 documents)
2017-10-05T10:45:39.680+0000    done dumping step.views (3 documents)
2017-10-05T10:45:39.680+0000    done dumping step.controllerlogs (1 document)
2017-10-05T10:45:39.681+0000    done dumping step.executions (1 document)

Partial backup

To perform a backup of a specific STEP collection, use the following command :

mongoexport -d step -c <collection_name> -o <collection_name>.json

To display the available collections for backup, connect to you mongo instance and execute the following :

> use step
switched to db step
> db.getCollectionNames()
[
        "artefacts",
        "controllerlogs",
        "executions",
        "functions",
        "measurements",
        "reports",
        "users",
        "views"
]
> exit

Backup your work (Keywords and Test Plans)

In order to perform a backup of your Keywords and your Test Plans, use the following command :

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

This will not dump the Test Plan executions nor their associated performance metrics !

Restore

Assuming you are running MongoDB with the default settings (host localhost, port 27017, no authentication) and that an archive previsouly created using the backup procedure exists, use below instructions to restore your database.

Complete Restore

To fully restore a STEP database from a backup folder, use the following command :

mongorestore --drop -d step backup

If you prefer to restore the database from a compressed archive previously created, use the following :

mongorestore --drop -d step --gzip --archive=backup.gzip

Warning : using the --drop flag will cause the existing content to be deleted ! You should see the following output which confirms the restore succeeded :

mongorestore --drop backup/
2017-10-05T10:48:29.070+0000    preparing collections to restore from
2017-10-05T10:48:29.089+0000    reading metadata for step.functions from backup/step/functions.metadata.json
2017-10-05T10:48:29.098+0000    reading metadata for step.artefacts from backup/step/artefacts.metadata.json
2017-10-05T10:48:29.148+0000    reading metadata for step.executions from backup/step/executions.metadata.json
2017-10-05T10:48:29.156+0000    reading metadata for step.views from backup/step/views.metadata.json
2017-10-05T10:48:29.265+0000    restoring step.functions from backup/step/functions.bson
2017-10-05T10:48:29.442+0000    restoring step.artefacts from backup/step/artefacts.bson
2017-10-05T10:48:29.584+0000    restoring step.executions from backup/step/executions.bson
2017-10-05T10:48:29.719+0000    restoring step.views from backup/step/views.bson
2017-10-05T10:48:29.720+0000    no indexes to restore
2017-10-05T10:48:29.720+0000    finished restoring step.functions (6 documents)
2017-10-05T10:48:29.720+0000    no indexes to restore
2017-10-05T10:48:29.720+0000    restoring indexes for collection step.executions from metadata
2017-10-05T10:48:29.721+0000    finished restoring step.artefacts (6 documents)
2017-10-05T10:48:29.721+0000    restoring indexes for collection step.views from metadata
2017-10-05T10:48:29.785+0000    reading metadata for step.reports from backup/step/reports.metadata.json
2017-10-05T10:48:30.113+0000    finished restoring step.executions (1 document)
2017-10-05T10:48:30.157+0000    reading metadata for step.measurements from backup/step/measurements.metadata.json
2017-10-05T10:48:30.255+0000    finished restoring step.views (3 documents)
2017-10-05T10:48:30.373+0000    restoring step.reports from backup/step/reports.bson
2017-10-05T10:48:30.382+0000    reading metadata for step.users from backup/step/users.metadata.json
2017-10-05T10:48:30.498+0000    restoring step.measurements from backup/step/measurements.bson
2017-10-05T10:48:30.565+0000    reading metadata for step.controllerlogs from backup/step/controllerlogs.metadata.json
2017-10-05T10:48:30.565+0000    restoring indexes for collection step.reports from metadata
2017-10-05T10:48:30.699+0000    restoring step.users from backup/step/users.bson
2017-10-05T10:48:30.699+0000    restoring indexes for collection step.measurements from metadata
2017-10-05T10:48:30.807+0000    restoring step.controllerlogs from backup/step/controllerlogs.bson
2017-10-05T10:48:31.235+0000    finished restoring step.reports (3 documents)
2017-10-05T10:48:31.316+0000    finished restoring step.measurements (2 documents)
2017-10-05T10:48:31.316+0000    no indexes to restore
2017-10-05T10:48:31.316+0000    finished restoring step.controllerlogs (1 document)
2017-10-05T10:48:31.316+0000    no indexes to restore
2017-10-05T10:48:31.316+0000    finished restoring step.users (1 document)
2017-10-05T10:48:31.316+0000    done

Partial restore

To perform a restore of a specific STEP collection, use the following command :

mongoimport --drop -d step -c <collection_name> <collection_name>.json

Warning : using the --drop flag will cause the existing collection content to be deleted !

Restore your work (Keywords and Test Plans)

You can restore your Keywords and Test Plans from a previous backup using the following commands :

mongoimport --drop -d step -c functions functions.json
mongoimport --drop -d step -c artefacts artefacts.json

Purge / Maintenance

Complete purge

If your database grows too much and you want to get rid of all the old executions and performance metrics, you can drop the whole database then re-import only your Keywords and Test Plan, which is the fastest way to execute a purge.
Follow below steps :

> use step
switched to db step
> db.dropDatabase();
{ "dropped" : "step", "ok" : 1 }
> exit

Keep only current month results

Idea is to execute a backup of the current months collections executions, reports and measurements in order to clean up the database from the previous executions. Let's say we are currently in October and that we want to remove all data concerning executions done before that month. We will first export the executions executed from 1st of October.

  • First get the timestamp as NumberLong format we will use to perform our queries. Connect to your database and run the following command :

> NumberLong(ISODate("2017-10-01"))
NumberLong("1506816000000") # This is the result we need
> exit # Exit the database

  • We can now export the executions, reports and measurements using following commands :

mongoexport -d step -c executions -q '{"startTime":{"$gt":NumberLong("1506816000000")}}' -o executions_gt_20171001.json
mongoexport -d step -c measurements -q '{"begin":{"$gt":NumberLong("1506816000000")}}' -o measurements_gt_20171001.json
mongoexport -d step -c reports -q '{"executionTime":{"$gt":NumberLong("1506816000000")}}' -o reports_gt_20171001.json

  • Execute a complete purge (do not forget to re-import your Keyword and Test Plans !)
  • Restore your last month executions by running following commands :

mongoimport -d step -c executions executions_gt_20171001.json
mongoimport -d step -c measurements measurements_gt_20171001.json
mongoimport -d step -c reports reports_gt_20171001.json

Export only 1 execution and its data

Sometimes you may want to backup only 1 test plan execution in order to keep it for later analysis. So first you need to gather the Execution ID of your test plan execution :

  • login to your STEP instance, go to the Executions tab and click to the execution you want to get the ID : 

ExecutionsTab.png

  • Now that you have the execution ID (in our example it is 59d4d8f9a63eaa00074f6dd0), you can export the executions and its data :
mongoexport -d step -c executions -q '{"_id":ObjectId("59d4d8f9a63eaa00074f6dd0")}' -o execution_59d4d8f9a63eaa00074f6dd0.json
# To export the measurement metrics :
mongoexport -d step -c measurements -q '{"eId":"59d4d8f9a63eaa00074f6dd0"}' -o measurements_59d4d8f9a63eaa00074f6dd0.json
# To export executions steps :
mongoexport -d step -c reports -q '{$or: [ { "parentID":ObjectId("59d4d8f9a63eaa00074f6dd0") }, { "executionID":"59d4d8f9a63eaa00074f6dd0" } ] }' -o reports_59d4d8f9a63eaa00074f6dd0.json

You can now restore the executions with its associated data using the following :

mongoimport -d step -c executions execution_59d4d8f9a63eaa00074f6dd0.json
mongoimport -d step -c measurements measurements_59d4d8f9a63eaa00074f6dd0.json
mongoimport -d step -c reports reports_59d4d8f9a63eaa00074f6dd0.json

Note that you can only restore the performance metrics or the functional results depending on your goal. To know which collections to restore use following table :

CollectionsFunctional resultsPerformance metrics
reportsmandatorymandatory
reportsmandatory

Execution.png

not mandatory
measurementsnot mandatorymandatory

Performance.png

Tags:
Created by Exense Admin on 2018/01/30 14:26
     
Copyright © exense GmbH
v1.0