# qmetry_import_automation_test_results

Import/Publish automation test results from TestNG, JUnit, Cucumber, Robot, HPUFT, or QAF frameworks into QMetry Parameters: - file (string) *required*: Base64 encoded file content or file path. User must upload result file (.json, .xml, .zip up to 30 MB) - fileName (string) *required*: Original filename with extension (.json, .xml, or .zip) - entityType (enum) *required*: Format of result file: TESTNG, CUCUMBER, JUNIT, HPUFT, QAF, or ROBOT - automationHierarchy (enum): TestNG/JUnit hierarchy: 1=Test Case-Test Step, 2=Test Case only, 3=Test Suite-Test Case. Default: 1 - testsuiteName (string): Custom test suite name. Ignored if automationHierarchy=3 for JUnit or =2 for ROBOT - testsuiteId (string): Reuse existing Test Suite by ID or Entity Key. Ignored if automationHierarchy=3 for JUnit or =2 for ROBOT - tsFolderPath (string): Test suite folder path. Creates folder if doesn't exist. Ignored if reusing test suite - tcFolderPath (string): Test case folder path. Creates folder if doesn't exist. Ignored if reusing test case - platformID (string): Platform ID or Platform Name. Default: 'No Platform' - projectID (string): Project ID, Project Key, or Project name. Overrides project in header - releaseID (string): Release ID or Release name. Requires projectID if provided - cycleID (string): Cycle ID or Cycle name. Requires releaseID and projectID if provided - buildID (string): Build ID or Build name - testcase_fields (string): JSON string with test case system fields and UDFs. Ignored if reusing test case. Example: {"component":["com1"], "priority":"High"} - testsuite_fields (string): JSON string with test suite system fields and UDFs. Ignored if reusing test suite. Example: {"testSuiteState":"Open", "testsuiteOwner":"user"} - skipWarning (enum): 0=Fail if summary >255 chars, 1=Truncate summary to 255 chars. Default: 0 - is_matching_required (string): True=Create new TC if summary/steps don't match, False=Reuse linked TC. Default: True Use Cases: 1. 1. Import TestNG XML results after CI/CD pipeline execution 2. 2. Publish JUnit test results to QMetry for tracking and reporting 3. 3. Upload Cucumber JSON results with custom test suite organization 4. 4. Import Robot Framework results with specific release/cycle mapping 5. 5. Link automation results to existing test suites for version tracking 6. 6. Create new test suites with custom names and folder structures 7. 7. Map test results to specific platforms (browsers, OS, devices) 8. 8. Associate imported results with releases, cycles, and builds 9. 9. Bulk import multiple test results from ZIP archive 10. 10. Configure test case/suite fields and user-defined fields during import Examples: 1. Basic TestNG result import json { "file": "<base64_encoded_testng_xml_content>", "fileName": "testng-results.xml", "entityType": "TESTNG" } Expected Output: Auto-generated test suite created with UTC timestamp, test cases auto-linked, execution results updated, 'No Platform' linked 2. JUnit results with custom test suite name json { "file": "<base64_encoded_junit_xml_content>", "fileName": "junit-results.xml", "entityType": "JUNIT", "testsuiteName": "Regression Suite - Build 123", "automationHierarchy": "1" } Expected Output: Test suite 'Regression Suite - Build 123' created with Test Case-Test Step hierarchy 3. Cucumber results with platform and release mapping json { "file": "<base64_encoded_cucumber_json_content>", "fileName": "cucumber-results.json", "entityType": "CUCUMBER", "platformID": "Chrome 120", "releaseID": "Release 2.0", "cycleID": "Sprint 15", "testsuiteName": "API Automation Tests" } Expected Output: Test suite created, linked to Chrome platform, Release 2.0, and Sprint 15 cycle 4. Reuse existing test suite json { "file": "<base64_encoded_testng_xml_content>", "fileName": "testng-regression.xml", "entityType": "TESTNG", "testsuiteId": "PROJ-TS-42" } Expected Output: Test cases auto-linked to existing test suite PROJ-TS-42, execution results updated 5. Import with folder organization json { "file": "<base64_encoded_junit_xml_content>", "fileName": "junit-results.xml", "entityType": "JUNIT", "tsFolderPath": "/Automation/Regression", "tcFolderPath": "/Automation/API Tests", "testsuiteName": "API Regression Suite" } Expected Output: Test suite created in '/Automation/Regression' folder, test cases in '/Automation/API Tests' folder 6. Import with test case custom fields json { "file": "<base64_encoded_testng_xml_content>", "fileName": "testng-results.xml", "entityType": "TESTNG", "testcase_fields": "{\"priority\":\"High\",\"testCaseType\":\"Automated\",\"component\":[\"API\",\"Backend\"],\"testcaseOwner\":\"john.doe\",\"estimatedTime\":\"2h:30m:0s\"}" } Expected Output: Test cases created with High priority, Automated type, API and Backend components 7. Import ZIP file with multiple results json { "file": "<base64_encoded_zip_content>", "fileName": "test-results.zip", "entityType": "JUNIT", "testsuiteName": "Full Regression Suite", "skipWarning": "1" } Expected Output: Multiple test results imported from ZIP, summaries truncated if >255 chars 8. Import with custom hierarchy for JUnit json { "file": "<base64_encoded_junit_xml_content>", "fileName": "junit-results.xml", "entityType": "JUNIT", "automationHierarchy": "3", "projectID": "PROJ" } Expected Output: Multiple test suites created per <testsuite> tag, test cases per <testcase> tag 9. Import with build and platform mapping json { "file": "<base64_encoded_testng_xml_content>", "fileName": "testng-results.xml", "entityType": "TESTNG", "buildID": "Build-1.2.3", "platformID": "Safari 17", "releaseID": "Release 1.2", "cycleID": "QA Cycle" } Expected Output: Results linked to Build 1.2.3, Safari 17 platform, Release 1.2, QA Cycle 10. Import with test suite and test case fields json { "file": "<base64_encoded_cucumber_json_content>", "fileName": "cucumber-results.json", "entityType": "CUCUMBER", "testsuite_fields": "{\"testSuiteState\":\"In Progress\",\"testsuiteOwner\":\"jane.smith\",\"description\":\"Sprint 15 automation results\"}", "testcase_fields": "{\"priority\":\"Medium\",\"component\":[\"UI\",\"Frontend\"],\"userDefinedFields\":{\"reviewedDate\":\"11-20-2024\",\"environment\":\"Staging\"}}" } Expected Output: Test suite and test cases created with custom fields and UDFs Hints: 1. 1. CRITICAL: User MUST upload a valid result file before calling this tool 2. 2. USER FILE UPLOAD REQUIRED: Ask user to provide file in chat - system will convert to base64 3. 3. FILE REQUIREMENTS: 4. - Supported extensions: .json, .xml, .zip 5. - Maximum size: 30 MB 6. - ZIP files must contain files matching the specified entityType format 7. 4. REQUIRED PARAMETERS: 8. - file: Base64 encoded content or file path 9. - fileName: Original filename with extension 10. - entityType: TESTNG, CUCUMBER, JUNIT, HPUFT, QAF, or ROBOT 11. 5. ENTITY TYPES: 12. - TESTNG: TestNG XML format 13. - JUNIT: JUnit XML format 14. - CUCUMBER: Cucumber JSON format 15. - ROBOT: Robot Framework XML format 16. - HPUFT: HP UFT format 17. - QAF: QAF format 18. 6. AUTOMATION HIERARCHY (TestNG/JUnit only): 19. - TestNG: 20. * 1 (default): <class name> = Test Case, <test-method> = Test Step 21. * 2: <test-method> = Test Case only 22. * 3: <name> under <test> = Test Case, <test-method> = Test Step 23. - JUnit: 24. * 1 (default): <testsuite> = Test Case, <testcase> = Test Step 25. * 2: <testcase> = Test Case only 26. * 3: <testsuite> = Test Suite, <testcase> = Test Case (creates multiple test suites) 27. 7. TEST SUITE OPTIONS: 28. - testsuiteName: Custom name for new test suite 29. - testsuiteId: Reuse existing test suite by ID or Entity Key (e.g., 'PROJ-TS-42') 30. - tsFolderPath: Create test suite in specific folder (e.g., '/Automation/Regression') 31. - Note: testsuiteName/testsuiteId ignored if automationHierarchy=3 for JUnit or =2 for ROBOT 32. 8. TEST CASE OPTIONS: 33. - tcFolderPath: Create test cases in specific folder (e.g., '/Automation/API Tests') 34. - Folders created automatically if they don't exist 35. 9. LINKING OPTIONS: 36. - platformID: Platform ID or name (e.g., 'Chrome 120', 'Safari 17') 37. - projectID: Project ID, key, or name (overrides header project) 38. - releaseID: Release ID or name (requires projectID) 39. - cycleID: Cycle ID or name (requires releaseID and projectID) 40. - buildID: Build ID or name 41. 10. GET IDs FROM OTHER TOOLS: 42. - Platform IDs: Use 'Platform/List' API (FETCH_PLATFORMS tool) 43. - Project IDs: Use 'Project/List' API (FETCH_PROJECTS tool) 44. - Release IDs: Use 'Release/List' API (FETCH_RELEASES_CYCLES tool) 45. - Cycle IDs: Use 'Cycle/List' API (FETCH_RELEASES_CYCLES tool) 46. - Build IDs: Use 'Build/List' API (FETCH_BUILDS tool) 47. - Test Suite IDs: Use 'Testsuite/Fetch' API (FETCH_TEST_SUITES tool) 48. 11. CUSTOM FIELDS (testcase_fields): 49. - JSON string with system fields and UDFs 50. - System fields: component, priority, testCaseState, testCaseType, testcaseOwner, estimatedTime, description 51. - Example: {"component":["API"], "priority":"High", "testcaseOwner":"user"} 52. - Ignored if reusing existing test case 53. 12. CUSTOM FIELDS (testsuite_fields): 54. - JSON string with system fields and UDFs 55. - System fields: testSuiteState, testsuiteOwner, description 56. - Example: {"testSuiteState":"Open", "testsuiteOwner":"user"} 57. - Ignored if reusing existing test suite 58. 13. USER DEFINED FIELDS (UDFs): 59. - Include in testcase_fields or testsuite_fields under 'userDefinedFields' key 60. - Example: {"userDefinedFields": {"reviewedDate": "11-20-2024", "environment": "Staging"}} 61. - UDF types: STRING, LARGETEXT, LOOKUPLIST, MULTILOOKUPLIST, DATEPICKER, NUMBER 62. - See tool metadata for UDF validation rules and auto-create behavior 63. 14. SKIP WARNING OPTIONS: 64. - skipWarning='0' (default): Fail import if test case summary >255 characters 65. - skipWarning='1': Truncate summary to 255 characters and continue import 66. 15. MATCHING BEHAVIOR: 67. - is_matching_required='true' (default): Create new TC/version if summary/steps don't match 68. - is_matching_required='false': Reuse existing TC version if entity key or summary matches 69. 16. IMPORT BEHAVIOR EXAMPLES: 70. - Only file + entityType → Auto-generated test suite, 'No Platform', test cases auto-linked 71. - file + entityType + platformID → Auto-generated test suite with specified platform 72. - file + entityType + testsuiteId → Results updated in existing test suite 73. - file + entityType + platformID + testsuiteId → Results updated in existing test suite with platform 74. 17. FOLDER CREATION: 75. - If tsFolderPath or tcFolderPath specified and doesn't exist, it will be created automatically 76. - Use forward slashes for folder paths (e.g., '/Parent/Child') 77. 18. ESTIMATED TIME FORMAT: 78. - Format: '2h:30m:15s' or '4h' or '7m' or '0s' 79. - Range: 0 to 99999 minutes 80. 19. OWNER FIELDS: 81. - Use userAlias (username) not display name 82. - testcaseOwner: User must have Test Case module rights 83. - testsuiteOwner: User must have Test Suite module rights 84. - Owner not set if user not found or lacks permissions 85. 20. LOOKUPLIST/MULTILOOKUPLIST BEHAVIOR: 86. - If value doesn't exist and auto-create is ON: Value added to list 87. - If value doesn't exist and auto-create is OFF: Field blank or default value 88. - MULTILOOKUPLIST: New values added, old values persist 89. 21. MANDATORY FIELD VALIDATION: 90. - If mandatory system/UDF field missing: 91. * Auto-create OFF + value doesn't exist = Import FAIL 92. * Auto-create ON + value doesn't exist = Import SUCCESS (value created) 93. * Value exists = Import SUCCESS 94. 22. ERROR HANDLING: 95. - Check file size before upload (must be ≤30 MB) 96. - Validate file extension matches entityType 97. - Ensure required dependencies: cycleID requires releaseID and projectID 98. - If import fails, check QMetry UI for detailed error messages 99. 23. WORKFLOW: 100. Step 1: Ask user to upload result file in chat 101. Step 2: System converts file to base64 102. Step 3: Collect entityType and optional parameters 103. Step 4: Call this tool with file data and configuration 104. Step 5: QMetry processes file and creates/updates test artifacts 105. Step 6: Return import results with test suite and execution details 106. 24. USER INTERACTION REQUIRED: 107. - ALWAYS ask user to upload file before calling this tool 108. - Display supported formats: .json, .xml, .zip (up to 30 MB) 109. - Ask for entityType (framework used) 110. - Ask for optional parameters based on user's needs 111. 25. PERFORMANCE TIPS: 112. - For large imports, consider using ZIP files 113. - Reusing existing test suites is faster than creating new ones 114. - Use automationHierarchy wisely to control test case/suite structure

Agent View of the PolicyLayer registry record for `qmetry_import_automation_test_results`. HTML page: https://policylayer.com/tools/smartbear-mcp/qmetry-import-automation-test-results

## Facts

- Tool: `qmetry_import_automation_test_results`
- Server: SmartBear MCP (`SmartBear/smartbear-mcp`) — https://policylayer.com/tools/smartbear-mcp.md
- Homepage: https://github.com/SmartBear/smartbear-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12 (3 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string | yes | Base64 encoded file content or file path. User must upload result file (.json, .xml, .zip up to 30 MB) |
| `buildID` | string | no | Build ID or Build name |
| `cycleID` | string | no | Cycle ID or Cycle name. Requires releaseID and projectID if provided |
| `fileName` | string | yes | Original filename with extension (.json, .xml, or .zip) |
| `projectID` | string | no | Project ID, Project Key, or Project name. Overrides project in header |
| `releaseID` | string | no | Release ID or Release name. Requires projectID if provided |
| `entityType` | string | yes | Format of result file: TESTNG, CUCUMBER, JUNIT, HPUFT, QAF, or ROBOT |
| `platformID` | string | no | Platform ID or Platform Name. Default: 'No Platform' |
| `skipWarning` | string | no | 0=Fail if summary >255 chars, 1=Truncate summary to 255 chars. Default: 0 |
| `testsuiteId` | string | no | Reuse existing Test Suite by ID or Entity Key. Ignored if automationHierarchy=3 for JUnit or =2 for ROBOT |
| `tcFolderPath` | string | no | Test case folder path. Creates folder if doesn't exist. Ignored if reusing test case |
| `tsFolderPath` | string | no | Test suite folder path. Creates folder if doesn't exist. Ignored if reusing test suite |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "qmetry_import_automation_test_results",
    "arguments": {
      "file": "<file>",
      "fileName": "<fileName>",
      "entityType": "<entityType>"
    }
  }
}
```

## Why qmetry_import_automation_test_results is rated Medium

This tool creates or modifies test result records within QMetry by importing automation test results from various frameworks. While it processes files and integrates data, it does not execute arbitrary code, delete data irreversibly, or move money.

From the tool's own definition: "Tool description states 'Import/Publish automation test results' with parameters accepting file uploads and processing test result files (.json, .xml, .zip)."

Risk signals: Accepts file system path (file) · High parameter count (17 properties)

## Use case

AI agents use qmetry_import_automation_test_results to create or update resources in SmartBear MCP, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your SmartBear MCP environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches SmartBear MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "qmetry_import_automation_test_results": {
      "limits": [
        {
          "counter": "qmetry_import_automation_test_results_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on SmartBear MCP (239)

- `collaborator_delete_collaborator_remote_system_configuration` — Destructive — https://policylayer.com/tools/smartbear-mcp/collaborator-delete-collaborator-remote-system-configuration.md
- `contract-testing_admin_delete_role` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-delete-role.md
- `contract-testing_admin_delete_team` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-delete-team.md
- `contract-testing_admin_delete_user` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-delete-user.md
- `contract-testing_admin_remove_role_from_user` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-remove-role-from-user.md
- `contract-testing_admin_remove_user_from_team` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-remove-user-from-team.md
- `contract-testing_admin_reset_roles` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-reset-roles.md
- `contract-testing_delete_all_integrations` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-all-integrations.md
- `contract-testing_delete_branch` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-branch.md
- `contract-testing_delete_environment` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-environment.md
- `contract-testing_delete_integration` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-integration.md
- `contract-testing_delete_pacticipant` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-pacticipant.md
- `contract-testing_delete_secret` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-secret.md
- `contract-testing_delete_webhook` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-webhook.md
- `contract-testing_regenerate_api_token` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-regenerate-api-token.md
- `contract-testing_remove_label_from_pacticipant` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-remove-label-from-pacticipant.md
- `reflect_cancel_suite_execution` — Destructive — https://policylayer.com/tools/smartbear-mcp/reflect-cancel-suite-execution.md
- `reflect_delete_previous_step` — Destructive — https://policylayer.com/tools/smartbear-mcp/reflect-delete-previous-step.md
- `swagger_delete_portal_product` — Destructive — https://policylayer.com/tools/smartbear-mcp/swagger-delete-portal-product.md
- `swagger_delete_table_of_contents` — Destructive — https://policylayer.com/tools/smartbear-mcp/swagger-delete-table-of-contents.md
- `collaborator_reviewservice_action` — Execute — https://policylayer.com/tools/smartbear-mcp/collaborator-reviewservice-action.md
- `collaborator_test_collaborator_remote_system_configuration_connection` — Execute — https://policylayer.com/tools/smartbear-mcp/collaborator-test-collaborator-remote-system-configuration-connection.md
- `contract-testing_execute_webhook` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-execute-webhook.md
- `contract-testing_generate_pact_tests` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-generate-pact-tests.md
- `contract-testing_review_pact_tests` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-review-pact-tests.md
- `contract-testing_test_execute_webhooks` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-test-execute-webhooks.md
- `reflect_add_prompt_step` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-add-prompt-step.md
- `reflect_connect_to_session` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-connect-to-session.md
- `reflect_execute_suite` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-execute-suite.md
- `reflect_run_test` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-run-test.md
- …and 209 more: https://policylayer.com/tools/smartbear-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=smartbear-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/smartbear-mcp
