El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.
- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Working with CodeArts TestPlan
- Enabling CodeArts TestPlan
- Accessing CodeArts TestPlan Homepage
- Configuring a Test Plan
- Configuring a Test Version
-
Configuring a Test Case
- Generating a Test Case
- Creating a Test Case by Using Mind Map
- Creating a Manual Test Case
-
Creating an Automated API Test Case
- Using Automated API Test Cases
- Creating an Automated API Test Case Template
- Adding an API Test Script by Using a Custom URL Request
- Adding an API Script by Importing a Postman File
- Adding an API Script by cURL
- Adding an API Script by Keyword Library
- Adding Logic Control to an API Script
- Setting Test Case Parameters of an API Script
- Setting Environment Parameters of an API Script
- Importing an Automated API Test Case Dataset
-
Built-in Functions
- Binary Addition Function
- Binary Subtraction Function
- Binary Multiplication Operation
- Binary Division Operation
- Obtaining the Current Timestamp
- Obtaining a Specified Timestamp
- Converting a Date into a Timestamp
- Converting a Timestamp into a Date
- Timestamp Addition and Subtraction Operations
- Generating Base64 Encoding
- Generating SHA512 Encoding
- Generating SHA256 Encoding
- Generating an MD5 Hash Value
- Generating a Random Number in a Specified Range
- Generating a Random String of a Specified Length
- Generating a Random Decimal in a Specified Range
- Generating a UUID
- Obtaining an Array via Reverse Index
- Obtaining the Element Values of an Array via Reverse Index
- Converting Uppercase Letters into Lowercase Letters
- Converting Lowercase Letters into Uppercase Letters
- Concatenating Strings
- Cutting Strings
- Obtaining String Length
-
System Keywords
- Overview
- GetIAMToken
- MySQLQuery
- MySQLUpdate
- MySQLInsert
- MySQLDelete
- OpenGaussQuery
- OpenGaussUpdate
- OpenGaussInsert
- OpenGaussDelete
- PostgreSQLQuery
- PostgreSQLUpdate
- PostgreSQLInsert
- PostgreSQLDelete
- MongoDBQuery
- MongoDBInsert
- MongoDBUpdate
- MongoDBDelete
- RedisGet
- RedisSet
- OBSWrite
- OBSDelete
- OBSQuery
- KafkaProducer
- KafkaConsumer
- TCP
- UDP
- WSConnect
- WSRequest
- WSWriteOnly
- WSReadOnly
- WSDisConnect
- DubboClient
- Executing a Test Case
- Managing Test Cases
- Creating and Executing a Test Suite
- Viewing and Evaluating Test Quality
- Settings
- API Reference
- Best Practices
-
FAQs
- What Do I Do If No Test Case Exists in a Test Suite?
- What Can I Do If I Do Not Have the Operation Permission?
- Why Am I See a Message Indicating that an API Automation Test Suite Is Being Executed or Queuing?
- What Do I Do If a Test Suite Does Not Exist?
- Why Can't I Download the Document in a Manual Test Case?
- What Do I Do If No Test Case Exists In a Test Plan
- Why Can't I Add Work Items of the Task Type When a Test Plan Is Created or Updated?
- What Do I Do If Test Cases Cannot Be Associated with Work Items of the Task Type?
- What Do I Do If the Test Case Completion Rate in the Test Report Is Lower Than 100%?
- Why Is the Status of Test Cases in a Test Plan Inconsistent with That in a Test Case Library?
- How Are Variables Passed Between Steps in API Automation Cases?
- How Do I Set Checkpoints for Test Procedures in API Automation Cases?
- Videos
- General Reference
Copied.
Adding Test Cases in Batches to a Plan
Function
Adds test cases in batches to a plan.
URI
POST /v1/projects/{project_id}/plans/{plan_id}/testcases/batch-add
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Uniquely identifies a project. The value contains 32 characters. For details about how to obtain the value, see Obtaining a Project ID. |
plan_id |
Yes |
String |
Unique ID of a plan. The value contains 11 to 34 characters. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Call IAM to obtain the user token (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
service_id |
Yes |
Integer |
Service ID returned by the API for registering a test service |
testcase_id_list |
Yes |
Array of strings |
Number of cases contained in the plan. The array length is less than 50. Only one test type can be contained. |
Response Parameters
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
error_detail |
ErrorDetailInfo object |
Details about failed batch operations. This structure is unavailable when all operations fail. |
Parameter |
Type |
Description |
---|---|---|
failed |
Array of ErrorCaseInfoBean objects |
Details about the resources that fail to be operated in batches |
Example Requests
Add test cases in batches to a plan.
post https://{endpoint}/v1/projects/efdb403066474ab08836b9eeaaa23bca/plans/9b26f58ec29943f681804a6628779a23/testcases/batch-add { "service_id" : 13, "testcase_id_list" : [ "97b82412f1ca4628803b918c27ed09de", "97b82412f1ca4628803b918c27ed09de", "97b82412f1ca4628803b918c27ed09de" ] }
Example Responses
Status code: 500
Internal Server Error
{ "error_code" : "CLOUDTEST.00000001", "error_msg" : "Error information about the interface invoking failure", "error_detail" : { "failed" : [ { "error_code" : "CLOUDTEST.00000001", "error_msg" : "Returned error information", "testcase_id" : "efdb403066474ab08836b9eeaaa23bca" } ] } }
Status Codes
Status Code |
Description |
---|---|
204 |
No Content |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Internal Server Error |
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