Child pages
  • QMetry Test Managment Plugin
Skip to end of metadata
Go to start of metadata

About the Plugin

QMetry Test Management plugin for Jenkins has been designed to seamlessly integrate your CI/CD pipeline with QMetry.

Easily configure Jenkins to submit your test results to QMetry without needing to write any code or deal with REST API. Your Test Results could be from any automation framework like Cucumber, Test NG, JUnit, QAF and more.

For more info visit QMetry Test Management. 

Read the following topics on this page:

  1. Pre-requisites
  2. How to install QMetry Test Management Plugin for Jenkins
  3. Configuring a standard Jenkins Job.
  4. Configuring QMetry Plugin job as a post build action.
  5. Triggering the job and publishing results in QMetry.

Pre-requisites

  1. QMetry Test Management installed on Server or Cloud
  2. Jenkins installation

 

How to install QMetry Test Management Plugin for Jenkins

  1. Login to Jenkins and go to Manage Jenkins.

 

 

2. Locate the Manage Plugins section.

 

 

 

3. Open the Available  tab and search for "QMetry Test Management".

 

 

4. Locate and select the QMetry Test Management Plugin. Choose install option either Install without Restart OR Download Now and install after restart.

 

 

Configuring a Standard Jenkins job

Let’s create a standard Freestyle job in Jenkins.

  1. To create a new Jenkins job, click on the New Item option on the Jenkins menu.

2. Provide a name for your job.

    Select Freestyle project on the screen and then click OK.

 

 

 

3. Next, the configuration page appears where you can configure your job by various categories: General, Source Code Management (SCM), Build Triggers, Build, and Post build actions.

    

 

 

4. On the Source Code Management tab, select the appropriate option in which you have your source code. For example, here it is “Git”. So, select “Git” and provide the necessary information. (Note: You need to configure GitHub plugin in global configuration).

 

5.  Optionally, you can set Build Triggers.

Select the Build Triggers tab. Let’s just add a periodic trigger which triggers build every minute – every hour – every day (Schedule: * * * * *).

 

6. Next, Select a build step. You can select from various options: Ant, Maven, Windows batch process, etc. For example, for a maven project, trigger a maven build and specify goals.

 

 

 

Next step is to add Post-build Actions. Here, add the plugin: “QMetry Test Management Plugin”.

 

Configuring QMetry Test Management Plugin as a Post-build Action

Jenkins works as a bridge between QMetry Test Management and automation frameworks. To publish results in QMetry, define another post-build action.

1. On the Add post-build Actions drop-down, select the "Publish test result to QMetry" option.

 

 

2.  Fill in the required data. You can get more information regarding fields by clicking on the Help icon for respective fields. It explains what to enter in that particular field.

 

 

Parameters

Parameter

Type

Required

Description

QMetry URL

string

Yes

QMetry Test Management URL

Automation API Key

string

Yes

Your API Key. API Key is unique for a specific user in a single project. The result will be imported for the project associated with the given API Key.

Automation Framework 

 

stringYes

Format of result file to be imported. Supported formats:

CucumberTestNGJUnitQASHP UFT
Result File(s) Path/DirectorystringYes

Path wherein your result file to be uploaded. Supported file extensions: .json, .xml and .zip (zip file must contain files of the format given in the 'Automation Framework' param).

Test Suite IDstringNoKey of the test suite exists in QMetry. In the absence of Key, a new test suite will be created.
ProjectstringYesID/Key/Name of the Project within which the test suite will be created.
Releasestring*NoID/Name of the Release in which the test execution will be created. If Release is not mentioned, then Default Release will be considered.
CyclestringNoID/Name of the Cycle in which the test execution will be created. If Cycle is not mentioned, then Default Cycle will be considered.
Build   stringNoBuild Name/Id. In the absence of value, it will create  the default build.
PlatformstringNoName of Platform on which test run to be executed.

Release is mandatory if Cycle is mentioned.

 

3. On successful completion of the process, you can see the console output. It displays success message for uploading the result file.

4. Finally check test execution page in QMetry and review your test run results.

 

 

Define Parameters

To define parameters for your job, select the This project is parameterized check box.

The Add Parameter drop-down is enabled with the list of parameter types. Use the drop-down button to add as many parameters as you need.

 

 

 

There are different parameter types available. The way parameters take effect according their respective parameter type.

For example,

Choice Parameter and String Parameter are selected, and corresponding parameters are added as shown below.

 

 

The above parameters will be parsed dynamically at the run time.

The field values should be entered in the following syntax:

${ParameterName}

For example,

For the parameters created above, the field value would be ${API} and ${TRID} respectively. The parameter values will be parsed accordingly for the corresponding fields.

 

 

 

The values can also be changed before triggering the Jenkins build.

 

 

 

 

 

Automation API URL

Write a comment…