QMetry Test Management for Jira v3.3 and below

QTM4J Bamboo Integration - DevOps/CD add-on is designed for QMetry Test Management for Jira. QTM4J Bamboo Integration – DevOps/CD is a free add-on.

Download Link: QTM4J Bamboo Integration - DevOps/CD

Once you are done with its installation, follow these steps to set up a simple build Plan.

Note

This document is only applicable for QTM4J v3.3 and below.

Build Plan

Perform the following steps to build a plan:

  1. Open Bamboo in a web browser.

  2. Click the Create drop-down list and select Create a new Plan. If you are using Bamboo for the first time, click Create your first build plan.

  3. The Configure plan page appears. Enter the Project name, Plan name, and other details related to the plan.

  4. Click Create.

    Bamboo3x Project Plan

    You can even link a code repository with the plan.

  5. Then click the Save and Continue.

  6. The Configure tasks screen appears.

    Note

    Bamboo follows a hierarchical order: Plan > Stage > Job > Task.

    This task remains under the default Job, and the default Job remains under the default Stage.

  7. Set up repository for the newly created test plan. Add the Source Code Checkout task that uses the repository you created earlier.

  8. Add a Builder Task type. Maven 3.x task is added here.

  9. Click Add task to add more tasks to the plan.

    Bamboo3x Add Task
  10. The Task types wizard appears. Select task “QTM4J Bamboo Integration” from the All tab.

  11. Configure the QTM4J Bamboo Integration task. The integration supports QTM4J Cloud and Server.

Jira Cloud

Refer to this section for information on the Bamboo plugin for Jira Cloud.

Bamboo Cloud Integration3x

The following table shows the parameters used during configuration.

Parameter

Required

Description

Automation Api Key

Yes

Your API Key. An 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.

Test Run Name

No

Name of the test run to be created. It will be appended with the Jenkins build Number.

Test Run Key

No

Existing Issue Key of Test Run. Test run will be appended with the test case and executions.

Result File path/Result Directory

Yes

Path to your result file to be uploaded.

Example : The Bamboo plugin is expecting the file in BambooHome/xml-data/build-dir/<Project Name>

If your project name is TestNGProject, then you will find a folder name with TestNGProject <Key Name> in the bamboo home BambooHome/xml-data/build-dir/<Project Name>.

Your result file should be under BambooHome/xml-data/build-dir/<Project Name>.

The path that should be set in plugin configuration is /Testng-result.xml.

Format

Yes

Format of result file to be imported. Supported formats:

cucumber/json

testng/xml

junit/xml

qas/json

hpuft/xml

specflow/json

Test Asset Hierarchy

Yes

Level of Hierarchy : Test Scenario-Test Case Or Test Case-Test Step

testCaseUpdateLevel

No

Test Case update level while reusing a test case starts from 0 to 2. (This is only applicable when you use the TestCase-TestStep Hierarchy option)

0 Append test steps while reusing a Test Case.

1 Override test steps while reusing the Test Case.

2 No change in test steps while reusing Test Case.

Default: No change in test steps while reusing Test Case.

attachFile

No

Check for upload attachments in execution. Default value: false.

Platform

No

Name of Platform on which test run to be executed.

Labels

No

Comma separated names of Labels to be added to the test run.

Versions

No

Comma separated names of versions to be added to the test run.

Components

No

Comma separated names of Components to be added to the test run.

Sprint

No

Name of Sprint to be added to the test run.

Comment

No

Comment to be added to the test run.

JIRAFields

No

Check the specific Automation custom fields' possible values and format in the Jira Feids section.

Jira Server

Refer to this section for information on the Bamboo plugin for Jira Server.

Bamboo Server Integration3x

The following table shows the parameters used during configuration.

Parameter

Type

Required

Description

Jira URL

String

Yes

Enter JIRA URL.

Basic Authentication OR

Personal Access Token

String

Yes

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.

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.

Format

selection

Yes

Format of the result file to be imported. Supported formats:

cucumber/json

testng/xml

junit/xml

qas/json

hpuft/xml

specflow/json

Result File path/Result Directory

string

Yes

Path to your result file to be uploaded.

Example : The Bamboo plugin is expecting the file in BambooHome/xml-data/build-dir/<Project Name>

If your project name is TestNGProject, then you will find a folder named TestNGProject <Key Name> in the Bamboo home BambooHome/xml-data/build-dir/<Project Name>.

Your result file should be under BambooHome/xml-data/build-dir/<Project Name>

The path that should be set in plugin configuration is /Testng-result.xml.

Test Run Name

string

No

Name of the test run to be created. It will be appended with the Jenkins build Number.

Test Run Key

string

No

Existing Issue Key of Test Run. Test run will be appended with the test case and executions.

Test Asset Hierarchy

selection

Level of Hierarchy : Test Scenario-Test Case Or Test Case-Test Step

testCaseUpdateLevel

No

Test Case update level while reusing a test case, starts from 0 to 2. (This is only applicable when you use the TestCase-TestStep Hierarchy option)

0 Append test steps while reusing Test Case.

1 Override test steps while reusing Test Case.

2 No change in test steps while reusing Test Case.

Default: No change in test steps while reusing Test Case.

attachFile

selection

No

Check for upload attachments in execution. Default value: false.

Platform

string

No

Name of Platform on which test run to be executed.

Labels

string

No

Comma-separated names of Labels to be added to the test run.

Versions

string

No

Comma-separated names of versions to be added to the test run.

Components

string

No

Comma-separated names of Components to be added to the test run.

Sprint

string

No

Name of the Sprint to be added to the test run.

Comment

string

No

Comment to be added to the test run.

JIRAFields

JSON

No

Check specific Automation custom fields possible value and format in the Jira Fields section.

Once you filled the details,

  1. Click the Run drop-down list and select the Run plan option.

    Bamboo3x Run Plan

    The logs for the job include the success message.

  2. Now go to your JIRA Issue page. It displays the report for the run.

Configure Specflow

  1. Check out the code from the repository.

    Bamboo3x Source Code.png
  2. Add script in Script body field to update packages for msbuild using NuGet.exe file from checkout repository.

  3. Configure MS Build Executable:

    1. Click Add new executable.

    2. Set path for executable.

  4. MS Build Configuration:

    1. Project File: Give path to the Solution. Project File or MSBuild project will be executed when this Job runs.

  5. VS Test Executable:

    1. Click Add new executable.

    2. Add executable for vstest.

  6. VS Test Configuration:

    1. Tests File Path: The relative path to your .dll/.exe/.appx/.pyproj/.ps1/etc... that your Test Adapter will discover and execute tests from.

      Bamboo3x VStest Configuration

Jira Fields

i) How to get Custom Field ID?

Rest call to JIRA to get all JIRA fields.

The following URL gives all custom fields get ID for selected custom fields that you want to apply.

<Jira_Base_URL>/rest/api/2/field

ii) Base format for custom fields.

[
  {
    "testRun": [
      {
      }
    ]
  },
  {
    "testScenario": [
      {
      }
    ]
  },
  {
    "testCase": [
      {
      }
    ]
  }
]

iii) Standard Custom Field Types

The following types are for reference only, other types of Custom Field Types are also supported.

Custom Field Type

Validation Rule

Example

Checkboxes

The checkbox accepts comma separated multiple values

{ "customfield_10200": [ { "value": "true" }, { "value": "false" } ] }

Date Picker

The Date picker accepts only specified format Date

} "customfield_10202":"2017-09-06" {

Date Time Picker

The Date time picker accepts only specified format Date and time

{ "customfield_10203": "2013-03-01T00:00:00.000+0400" }

Number Field

The Number field accepts any number with a decimal

{ "customfield_10205": 2876784 }

Radio Buttons

The radio button accepts a single value from JIRA fields

{ "customfield_10206": { "value": "option1" } }

Select List (multiple choices)

The Select List Multiple accepts comma-separated multiple values

{ "customfield_10208": [ { "value": "Select List Multiple 1" }, { "value": "Select List Multiple 2" } ] }

Select List (single choice)

The radio button accepts single value from JIRA fields

{ "customfield_10209": { "value": "Select List single 1" } }

Text Field (multi-line)

It accepts text in multiple lines

{ "customfield_10210": "this is sample.\nexample" }

Text Field (single line)

It accepts text in single line

{ "customfield_10211": "this is sample.example" }

URL Field

It accepts Web URL

{ "customfield_10212": "http://www.url-encode-decode.com/" }

User Picker (single user)

The User field accepts only available JIRA users

{ "customfield_10213": { "name": "admin" } }

iv) JSON Example

If you want to set two custom fields (checkbox, single text) on test run issue type and one custom fields (Radio Button) on scenario and test case level.

"JIRAFields":
[
  {
    "testRun": [
      {
        "customfield_10200": [
          {
            "value": "true"
          },
          {
            "value": "false"
          }
        ]
      },
      {
        "customfield_10211": "this is sample.example"
      }
    ]
  },
  {
    "testScenario": [
      {
        "customfield_10206": {
          "value": "option1"
        }
      }
    ]
  },
  {
    "testCase": [
      {
        "customfield_10206": {
          "value": "option1"
        }
      }
    ]
  }
]
Publication date: