Getting Started

QMetry Test Management for Bamboo add-on is designed for QMetry Test Management v8.x. QMetry Test Management for Bamboo is a free add-on. 

Download Link: QMetry Test Management for Bamboo add-on


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

1. Launch Bamboo in a web browser.

2. Let's Create a simple plan. Open Create drop-down menu and select Create a new Plan. If you are using Bamboo for the first time, just click on the Create your first build plan button.


3. The Configure plan page opens. Provide Project name, Plan name and other details related to the plan. You can even link a code repository with the plan.

4. Finally, click on the Configure plan button.



5. The next screen of Configure tasks opens.

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

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

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


 


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

Click on the Add task button to add more tasks to the plan.


 

7. Click on the Add task button to add more tasks to the plan.

8. The Task types wizard opens next. Select task “QMetry Test Management for Bamboo” from the “All” tab.



9. Configure the QMetry Test Management for Bamboo task.



Parameters

Parameter

Required

Description

QMetry Base URL

Yes

QMetry Test Management URL

Automation API Key

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.

Login to QMetry >> Go to Integrations >> Automation API >> Generate

Test Result File Path or Directory Path
Yes

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 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

Supported Formats 

  1. junit/xml
  2. cucumber/json
  3. testng/xml
  4. qas/json
Automation HierarchyNo

Hierarchy which will be used to parse test result files on QTM. Supported formats are:

JUnit

1 - Use result file's 'testcase' tag as TestStep and 'testsuite' tag as Testcase (default)

2 - Create Single Testsuite and link all Testcases to that Testsuite ('testcase' tag will be treated as Testcase)

3 - Create Multiple Testsuites and then link their respective testcases in corresponding Testsuites ('testcase' tag will be treated as Testcase)

TestNG

1 - Use result file's 'class' tag as Testcase and 'test-method' tag as TestStep (default)

2 - Use result files 'test-method' tag as Testcase

3 - Use test 'name' as Testcase and test-method as TestStep

ProjectYesID/Key/Name of the Project within which the test suite will be created as mentioned in the Test Suite parameter below.
Release*NoID/Name of the Release in which the test execution will be created. If Release is not mentioned, then Default Release will be considered.
CycleNoID/Name of the Cycle in which the test execution will be created. If Cycle is not mentioned, then Default Cycle will be considered.
BuildNoID/Name of the Build that provides reference to the test run which is to be executed.
Test SuiteNo

Key/ID of the test suite exists in QMetry. In the absence of Key, a new test suite will be created in the following syntax:

Automation-<Format>-<Date & Time>

e.g. Automation-JUNIT-Mon Mar 12 07:25:22 UTC 2018

Note: If for Junit, Option 3 - Create Multiple Testsuites and then link their respective testcases in corresponding Testsuites - is chosen, then the parameter Test Suite ID will be ignored.

Test Suite NameNo

If existing "testsuiteId" is not being used and auto-generated name for the new test suite is not desired, then a custom test suite name can be entered for this parameter.

Note: If for Junit, Option 3 - Create Multiple Testsuites and then link their respective testcases in corresponding Testsuites - is chosen, then the parameter Test Suite Name will be ignored.

PlatformNo

Name/ID of Platform on which test run to be executed. If Platform is not mentioned, then the test run will be executed on the default platform named “No Platform”.

Test Case Fields

(JSON Format)

No

Mention system defined fields and user defined fields for test case as shown in Test Case JSON format below.

All the mandatory fields other than Summary should be mentioned in this parameter.

Test Suite Fields

(JSON Format)

No

Mention system defined fields and user defined fields for test case as shown in  Test Suite JSON format below.

All the mandatory fields other than Summary should be mentioned in this parameter.

This parameter will be ignored if existing Test suite Id is used to upload results. 

     

Release is mandatory if Cycle is mentioned.

Supported Fields for Test Case Fields and Test Suite Fields.

  • Field Name as mentioned in QMetry > Customization > Manage Fields > Field Name
  • For Look up list and multi lookup list fields
    • If the value does not exist in Project and Auto Create value feature is on for Project, the value will get added in the list and it will be assigned to the test case.
    • If the value does not exist in Project and Auto Create value feature is off for Project, the value will not be added in the list and Test Case field will be blank or have default value in it. 
    • If a new value is added to Multi Look Up List, the older value will remain unchanged and the new value will be added to the list.
    • List values are added to the same version of the test case.

Field

ExampleTest CaseTest SuiteNotes

"component"

"component" : ["Label1, "Label2"]

YesNo

Old values will persist and new value will get set e.g., L1 and L2 are set and L3 is assigned, then the updated values for component will be L1, L2 and L3.


"priority""priority" : "Minor"YesNo

As mentioned for Look Up and Multi Look Up lists above.

"testCaseState""testCaseState":"Open"YesNo
"testCaseType""testCaseType":"UI"YesNo

"testcaseOwner"

"testCaseType":"John"YesNo

userAlias should be passed in request. Owner will not be set if the requested user is not found or the user doesn't have right for the Test Case module.

"description"

"description":"Sample Description."

YesYes

This will be set as requested.

"estimatedTime""estimatedTime":6YesNoThis will be set as requested.

"testSuiteState"

"testSuiteState":"Open"NoYesA new Status value will be added if it does not exist in the project.

"testsuiteOwner"

"testsuiteOwner":"lizamathew"

No

Yes

userAlias should be passed in request. Owner will not be set if the requested user is not found or the user doesn't have right for the Test Suite module.

User Defined Fields

Custom Field TypeValidation RuleExampleNotes
STRINGIt accepts text in a single line"tagName": "Sample test asset."

The field value will be set as requested.
NUMBERIt accepts any number with decimal"executionTime": 4

The field value will be set as requested.
MULTILOOKUPLISTIt accepts comma separated multiple values "langaugePreference": ["English",Portuguese"]

Multi Lookup will be set as requested if its list value exists.

  • If the value does not exist in Project and Auto Create value feature is on for Project, the value will get added in the list and it will be assigned to the test case.
  • If the value does not exist in Project and Auto Create value feature is off for Project, the value will not be added in the list and Test Case field will be blank or have default value in it.
  • Additional value will be selected keeping the old values unchanged.
    E.g., A and B are set and we update with C then updated values for the list will be A, B and C.
LOOKUPLISTIt accepts a single value on the list"country": ["United States"]
 

Lookup type will be set as requested if its list value exists.

  • If the value does not exist in Project and Auto Create value feature is on for Project, the value will get added in the list and it will be assigned to the test case.
  • If the value does not exist in Project and Auto Create value feature is off for Project, the value will not be added in the list and Test Case field will be blank or have default value in it. 
LARGETEXTIt accepts text in multiple lines"additionalComment": "this is a sample test asset"

The field value will be set as requested.
DATEPICKERIt accepts the Date format that has been set in user profile"reviewedDate": "08-30-2019"

The field value will be set as requested.


Test Case Fields with UDFs in JSON format


{
 
"component":["com1", "com2"],
"priority":"High",
"testCaseState":"Open",
"testCaseType":"Manual",
"testcaseOwner":"lizamathew",
"estimatedTime":60,
"description":"Sample Description",
 
"userDefinedFields" : {
 
"reviewedDate": "08-30-2019",
"executionTime": 40,
"tagName": "Sample test asset.",
"additionalComment": "This is a sample test asset"
"country": ["United States"]
"langaugePreference": ["English",Portuguese"]
 
}
 
}

Test Suite Fields with UDFs in JSON format


{
 
"testSuiteState":"Open",
"testsuiteOwner":"lizamathew",
"description":"Testing 8.5.4 API Changes",
 
"userDefinedFields" : {
 
"reviewedDate": "08-30-2019",
"executionTime": 40,
"tagName": "Sample test asset.",
"additionalComment": "this is a sample test asset"
"country": ["United States"]
"langaugePreference": ["English",Portuguese"]
}
 
}

The following table depicts probable import result according to the scenario.


Is System Field/UDF Mandatory?Is Auto-Create Enabled?Does UDF Value exist?Import Result

No

No

No

Fail

No

No

Yes

Success

No

Yes

No

Success

No

Yes

Yes

Success

Yes

No

No

Fail

Yes

No

Yes

Success

Yes

Yes

No

Success


10. Open the Run drop-down menu at top right and select the Run plan option.


11. You can see the success message in the logs for the job.



12. Now open test execution page in QMetry and review your test run results.