Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In case of Server instance for QMetry for Jira, select the Server option and fill in the required data.


Image RemovedImage Added



Parameters for Server instance:

...


Code Snippet for Server: QMetry for Jira v4.0 and above

Pipeline Script

→ Basic Authentication:


stage('Upload Result to QTM4J server V4'){ step([$class: 'TestReportDeployPublisherCloudV4', jiraUrlServer: 'http://qtm4jpostgres.qmetry.com:8080/', serverAuthenticationType:'BASICAUTH', username: 'admin', password: hudson.util.Secret.fromString('john123#'), testToRun: 'SERVER', apikeyServer: 'bc851b65c42259f4984f36d9e5f8931327b4985d1a68d9e8bc851b65c4224984f36d9e5f8931327b4985d1a68d9e8', formatServer: 'junit/xml', fileServer: 'junit.xml', testCycleToReuseServer: "", attachFileServer: true, environmentServer: "Firefox", buildServer: "1.0.0", testCycleSummaryServer: "Basic mode testing", testCycleDescriptionServer: "Unit testing", testCycleLabelsServer: "v8.2.1", testCycleComponentsServer: "FitBit", testCyclePriorityServer: "High", testCycleStatusServer: "To Do", testCycleSprintIdServer: "63", testCycleFixVersionIdServer: "10909", testCycleAssigneeServer: "JIRAUSER11200", testCycleReporterServer: "JIRAUSER11200", testCycleStartDateServer: "15/May/2020 00:00", testCycleEndDateServer: "30/May/2020 00:00", testCycleCustomFieldsServer: "[{"name": "Country", "value": "India"}, {"name": "Language", "value": "English"}, {"name": "TimeZone", "value": "IST"}]", testCaseDescriptionServer: "Verify the login page", testCaseLabelsServer: "v8.2.1", testCaseComponentsServer: "FitBit", testCasePriorityServer: "High", testCaseStatusServer: "To Do", testCaseSprintIdServer: "63", testCaseFixVersionIdServer: "10910", testCaseAssigneeServer: "JIRAUSER11200", testCaseReporterServer:"JIRAUSER11200", testCaseEstimatedTimeServer: "10:10", testCaseCustomFieldsServer: "[{"name": "Country", "value": "India"}, {"name": "Language", "value": "English"}, {"name": "TimeZone", "value": "IST"}]"])}

Syntax of format:

...


→ Token Authentication:

stage('Upload Result to QTM4J server V4'){ step([$class: 'TestReportDeployPublisherCloudV4', jiraUrlServer: 'http://qtm4jpostgres.qmetry.com:8080/', serverAuthenticationType:'TOKENAUTH', personalAccessToken:'NDY2OTIyOTYxkzOg17rGUmpZPMdFtGyWdDHX', testToRun: 'SERVER', apikeyServer: 'bc851b65c42259f49846d9e5f8931327b985d1a68d9e8', formatServer: 'junit/xml', fileServer: 'junit.xml', testCycleToReuseServer: "", attachFileServer: true, environmentServer: "Firefox", buildServer: "1.0.0", testCycleSummaryServer: "Basic mode testing", testCycleDescriptionServer: "Unit testing", testCycleLabelsServer: "v8.2.1", testCycleComponentsServer: "FitBit", testCyclePriorityServer: "High", testCycleStatusServer: "To Do", testCycleSprintIdServer: "63", testCycleFixVersionIdServer: "10909", testCycleAssigneeServer: "JIRAUSER11200", testCycleReporterServer: "JIRAUSER11200", testCycleStartDateServer: "15/May/2020 00:00", testCycleEndDateServer: "30/May/2020 00:00", testCycleCustomFieldsServer: "[{"name": "Country", "value": "India"}, {"name": "Language", "value": "English"}, {"name": "TimeZone", "value": "IST"}]", testCaseDescriptionServer: "Verify the login page", testCaseLabelsServer: "v8.2.1", testCaseComponentsServer: "FitBit", testCasePriorityServer: "High", testCaseStatusServer: "To Do", testCaseSprintIdServer: "63", testCaseFixVersionIdServer: "10910", testCaseAssigneeServer: "JIRAUSER11200", testCaseReporterServer:"JIRAUSER11200", testCaseEstimatedTimeServer: "10:10", testCaseCustomFieldsServer: "[{"name": "Country", "value": "India"}, {"name": "Language", "value": "English"}, {"name": "TimeZone", "value": "IST"}]"])}



Syntax of format:

  • cucumber/json
  • testng/xml
  • junit/xml
  • QAF
  • hpuft/xml
  • specflow/json

...


Password for Jira instance

Parameter

Type

Required

Description

Jira URL

string

Yes

Enter Jira URL

Username

string

Yes

Jira Username.

Password

string

Yes

Basic Authentication OR
Personal Access Token

stringYes


Basic Authentication

Basic authentication with Jira's credentials.

  • Jira Username

  • Jira Password: Password for Jira instance.



Personal Access Token

If the Allow basic authentication on API calls option is disabled in Jira, then Personal Access Token is required for authentication.

To generate personal access token, perform the following steps:

  1. Go to User Profile of your Jira.

  2. Click on Personal Access Tokens and click on Create token.


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.

Format

selection

Yes

Format of result file to be imported. Supported formats:

cucumber/json testng/xml junit/xml QAF hpuft/xml specflow/json

File

string

Yes

Path to your result file to be uploaded.

Example : The Jenkins plugin is expecting the file in Jenkins Workspace. 
If your workspace name is WithoutSouceCode, then you will find a folder name with "WithoutSouceCode" in your installation directory like Jenkins/Home/workspace/WithoutSouceCode. 
Your result file should be under Jenkins/Home/workspace/WithoutSouceCode/Testng-result.xml. 
The path that should be set in plugin configuration is "/Testng-result.xml"

Test Cycle To Reuse

stringNoKey of the test cycle to be reused.

Upload Screenshots

checkboxNoCheck to upload attachments in execution. Default value: false.

Environment

stringNoName of the environment on which test cycle has to be executed.
BuildstringNoName of the build for test cycle execution.


...