Uploading a Unit Test Coverage Report
Function
This API is used to upload the unit test coverage report of a specific build action by referencing its ID.
Calling Method
For details, see Calling APIs.
URI
POST /v1/report/junit/coverage/upload
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
job_id |
Yes |
String |
Definition Build task ID. It includes digits and letters. To obtain this ID, open the page for editing the build task in your browser, and copy the 32-character string at the end of the URL. Constraints N/A. Range The 32-character string sits at the end of the URL and includes digits and letters. Default Value N/A. |
|
build_no |
Yes |
Integer |
Definition The build number tracks each run of the build task. This parameter starts at 1, indicating the first build. It increments by 1 for every subsequent run. Constraints The value is a positive integer. Range Use only numbers that are 1 or greater. Default Value 1 |
|
node_id |
Yes |
String |
Definition Build action ID. Use the value of node_id in the response body of the API that retrieves the full stages of a task. Constraints The value can contain a maximum of 32 characters. Digits, letters, and hyphens (-) are supported. Range N/A. Default Value N/A. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
files |
No |
Array of files |
Definition The uploaded unit test coverage report file. Constraints N/A. Range N/A. Default Value N/A. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Definition API response status. Range ● success: The API call is successful. ● fail: The API call failed. |
|
error |
Object |
Definition Error message. Range N/A. |
|
result |
String |
Definition Data returned after the API is successfully called. Range N/A. |
Example Requests
POST https://{endpoint}/v1/report/junit/coverage/upload
Example Responses
Status code: 200
OK
{
"status" : "success"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot