This TestNG framework supports only Generic test cases. Test step details for other types will be excluded from the parsed results.
1. Import Test Result only
This approach allows you to quickly upload test results to AgileTest without needing to include extra metadata like test execution timestamps, environment details, or other specific execution parameters.
You can locate the endpoint at the POST/ds/test-executions/testng in the API document.
When you click on the 🔽 button, a dialog will appear. Here you can input your information for the test result file upload.
There are 2 main sections:
Parameters: fields that you define as key parameters required to make a successful API request. These parameters include:
Parameters
Type
Required
Description
projectKey
string
✅
Key of the project where the test results will be imported.
milestoneId
integer
Milestone id to link to Test execution.
testExecutionKey
string
Test execution key to import test report.
testPlanKeys
array[string]
Test plan key to import test report.
If you specify a Test Plan, the tests will automatically be added to it if they are not already included.
testEnvironments
array[string]
A string containing a list of test environments separated by ",".
fixVersions
array[string]
A string containing a list of fixVersions separated by “,”.
revision
string
Revision to link to Test execution.
Request body: where you can input an XML file, which is a TestNG report that is going to be imported.
In case you want to use the command line, file pipeline, and other tools instead of API docs, you can copy the curl and input the token to import test results.
This approach allows you to import TestNG XML test results while including additional execution details, such as timestamps, environment details, test execution keys, and other specific parameters related to the test executions.
You can locate the endpoint at the POST/ds/test-executions/testng/multipart in the API document.
For this request, it does not require any parameters. Instead, you need to submit two separate files:
A file containing the test results to import. This file resembles the test result files used in the Import Test Result only approach.
A file containing the test execution details. This file has some fields, and each of these fields serves a specific purpose in creating and organizing the test execution:
The fields object contains standard issue creation information, like what project it belongs to and what type of issue it is. It has 3 compulsory fields summary, project.id, and issuetype.id. Additionally, you can include other optional Jira fields, such as labels, priority, or any custom fields that your Jira instance uses.
The agileTestFields object contains Agile Test-specific information for linking the execution to milestones and test plans, both of which are optional.
Field
Group
Type
Required
Description
summary
fields
string
✅
Summary of Test execution issue that will be created.
project.id
string
✅
Project ID in which the Test execution will be created.
issuetype.id
string
✅
The identifier specifying the type of issue to be created.
…
…
…
milestoneId
agileTestFields
integer
The identifier of the milestone that this test execution should be associated with.
testPlanKeys
array of string
An array of issue keys of Test plan that this test execution is related to.
testEnvironments
array of string
A string containing a list of test environments separated by ",".
fixVersions
array of string
A string containing a list of fixVersions separated by “,”.
Make sure all details provided are accurate and relevant; otherwise, the request will fail. For example, if the issuetype.id you specify a value that does not exist in the project with ID 17110, the system will return an error with the corresponding error code 400.
In case you want to use the command line, file pipeline, and other tools instead of API docs, you can copy the curl and input the token to import test results.