Versioning and Branching with Qyrus
Last updated
Last updated
By cloning Projects and Suites--and cloning and updating Scripts--a basic versioning and branching functionality can be accomplished, similar to a Git workflow.
When a project is cloned, all of the suites and scripts from the project will be cloned, in addition to any environment variables in the existing project. From the project listing page, click on the options menu icon (the three dots) at the top right of the card of the project that needs to be cloned. Click on “Clone.”
Enter the name for the project and provide a description of the project. Click on the “Clone” button to create the new project.
Projects can be cloned multiple times to create as many branches as needed.
Suites can be cloned between projects, allowing for the creation of a set of master tests that sit in one place. Suites can then be copied into another project/branch as needed. Click on the options menu icon (the three dots) and then click on “Clone.”
A project selection dialog box will open. Locate the projects you wish to clone the suite into (the suite can be cloned into multiple projects). The suite name can be changed by editing the “Suite Name” text field. Click “Clone Suite.”
All target projects will now have the cloned suite.
Different “versions” of a suite, can be created by cloning the suite into the same project and changing the name.
Once a branching structure is set in place, scripts can be “pulled” from another project. Updating a script will replace the entire contents of a script, so be careful when making this change. Click on the options menu icon (the three dots) from the script that needs updating and select “Update.”
Select “Update from Qyrus” from the dialog box.
Select the project containing the script that will update the current script and click “Select Project.”
Select the suite that contains the script that will update the current script and click “Select Suite.”
Select the script that will update the current script and click “Update Script.” Note the warning provided; this will erase the steps that currently exist in the script.
The script will now show the updated number of steps.
Test scripts can also be updated from a properly formatted JSON or XSLX file (see the section “Exporting a Script to a File” to learn how to export a test script). After selecting the “Update” option from the target script, select “Update from File.”
Click on “Choose file” to select a file.
Select the JSON or XSLX file that will update the current script.
Click on “Update Script.” Note the warning that this will replace the existing steps in the target script.
The script will now show the updated number of steps.
Scripts can also be exported to another project. This allows scripts to be added to other “branches.” From a suite, select a script in the script listing by clicking on the checkbox next to the target script. Then click “Export.”
Click on “Export to Project”
Select the target project and click “Select Project.”
Select the targeted suites. This is where the script will be exported. Note that multiple suites can be selected. Click “Export to Project.”
The imported script will appear in the suite that was selected. It will have the tag “_imported” attached to it.
A .json or .xslx representation of a test script can be exported using the “Export to File” option. Using this options, test scripts can be maintained offline or with a Version Control System such as GitHub, GitLab, etc. After selecting a script click on the “Export” button and select the “Export to File” option.
Select the File Type (JSON or XSLX) and name the file in the provided text field. Then click on “Export Script.”
The file dialog box will open. After selecting the destination folder and clicking “Save”, the file will be saved to the computer.
By making use of the cloning, updating, exporting and importing features, projects can be maintained in a structure similar to Git’s versioning and branching system. Using the Import and Export features, test scripts can be further maintained in an offline manner or using a Version Control System. For more information on integration with GitHub and Bitbucket, see the appropriate sections in this documentation.