Getting Started
QMetry Bamboo Integration add-on is designed for QMetry Test Management v8.x. QMetry Bamboo Integration is a free add-on. The automation results can also be uploaded from a Bamboo remote agent server.
Download Link: QMetry Bamboo Integration 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 a 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 Bamboo Integration” from the “All” tab.
9. Configure the QMetry Bamboo Integration 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> |
Format | Yes | Supported Formats
|
Automation Hierarchy | No | 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) JUnit File Type 1: Wherein testsuite "name" matches the test case "classname".
JUnit File Type 2: Wherein testsuite "name" does not match the test case "classname".
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 |
Project | Yes | ID/Key/Name of the Project within which the test suite will be created as mentioned in the Test Suite parameter below. |
Release | *No | ID/Name of the Release in which the test execution will be created. If Release is not mentioned, then Default Release will be considered. |
Cycle | No | ID/Name of the Cycle in which the test execution will be created. If Cycle is not mentioned, then Default Cycle will be considered. |
Build | No | ID/Name of the Build that provides reference to the test run which is to be executed. |
Test Suite | No | 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 Name | No | 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. |
Test Suite Folder Path | No | New test suites will be created in a specified test suite folder while importing automated test results. If the folder does not exist, it gets created. This parameter will be ignored if the test suite is being reused. This parameter is not supported for server edition of QTM now and if specified, it will be ignored. |
Platform | No | 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. |
Skip Warning | No | Skip Warning while uploading test result file(s) to QTM. Supported values are: 0 - Test Case Import will be failed if the Test Case summary is more than 255 characters. (default) 1 - Test Cases can be imported by ignoring the warning about summary length. If the test case summary is longer, it will be truncated to 255 characters. |
Is Matching Required | No | Create a new test case version or reuse the already created version while uploading test result file(s) to QMetry. Supported values are: 1 - Create a new test case or test case version if the test summary and steps of any of the test case versions do not match with the test case in the result file. (default) 0 - Reuse already linked test case version in test suite or auto link the existing latest version of test case to test suite, if the test case entity key OR test case summary matches with the test case in the result file. The execution status of the linked test cases will be updated. This parameter is not supported for server edition of QTM now and if specified, it will be ignored. |
* Release is mandatory if Cycle is mentioned.
Robot Framework
Robot Framework result files can be of multiple hierarchy structures. The structure of these files depends upon the libraries that are used to generate the automation results.
Robot File Tag - Structure & Hierarchy | Tag that is created as QMetry Test Suite | Tag that is created as QMetry Test Case | Tag that is created as QMetry Test Case Step |
---|---|---|---|
suite>test case>steps | <suite> tag will be created as Test Suite. | <test> tag under the <suite> tag will be considered as Test Case.
| <kw> tag under the<test> tag will be considered as Test Case Step. |
suite>(sub/inner) suite>test case>steps | <(sub/inner) suite> tag under the <suite> tag will be considered as single Test Suite. Multiple test suites will be created each (sub/inner) suites. | <test> tag under the <(sub/inner) suite> tag will be considered as Test Case.
| <kw> tag under the <test> tag will be considered as Test Case Step.
|
suite>test case>steps>sub steps | <suite> tag will be considered as Test Suite | <test> tag under the <suite> tag will be considered as Test Case. | <kw> tag under the <test> tag will be considered as Test Case Step. <kw> tag under the <kw> tag (i.e. sub steps) will be ignored and will not be imported into QMetry. |
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 | Example | Test Case | Test Suite | Notes |
---|---|---|---|---|
"component" | "component" : ["Label1, "Label2"] | Yes | No | 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" | Yes | No | As mentioned for Look Up and Multi Look Up lists above. |
"testCaseState" | "testCaseState":"Open" | Yes | No | |
"testCaseType" | "testCaseType":"UI" | Yes | No | |
"testcaseOwner" | "testCaseType":"John" | Yes | No | 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." | Yes | Yes | This will be set as requested. |
"estimatedTime" | "estimatedTime":6 | Yes | No | This will be set as requested (in minutes). |
"testSuiteState" | "testSuiteState":"Open" | No | Yes | A 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 Type | Validation Rule | Example | Notes |
---|---|---|---|
STRING | It accepts text in a single line | "tagName": "Sample test asset." | The field value will be set as requested. |
NUMBER | It accepts any number with decimal | "executionTime": 4 | The field value will be set as requested. |
MULTILOOKUPLIST | It accepts comma separated multiple values | "langaugePreference": ["English",Portuguese"] | Multi Lookup will be set as requested if its list value exists.
|
LOOKUPLIST | It accepts a single value on the list | "country": ["United States"] | Lookup type will be set as requested if its list value exists.
|
LARGETEXT | It accepts text in multiple lines | "additionalComment": "this is a sample test asset" | The field value will be set as requested. |
DATEPICKER | It 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
|
Test Suite Fields with UDFs in JSON format
|
The following table depicts probable import results 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 the top right and select the Run plan option.
11. You can see the success message in the logs for the job.
12. Now open the test execution page in QMetry and review your test run results.