هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.
- 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.
User Plan Operations
Scenario
This scenario is applicable to those who have created projects in CodeArts TestPlan and have created cases in their own projects. They can create different plans to manage their own cases.
The following procedure describes how to create a test plan and add cases to the plan.
Prerequisites
You have created a project and created your own cases.
Involved APIs
User plan operations include creating a plan under a project and adding test cases to a plan in batches. To add test cases to a plan, you must have created test cases in advance. The following APIs are involved:
- Creating a Plan in a Project: You can create your own test plan under the third-party test type in the project.
- Adding Test Cases in Batches to a Plan: After the plan is created, associate test cases with the plan.
Procedure
- Determine the user token that can be used to authenticate the calling of other APIs.
- View the user token. For details, see Obtaining a User Token.
- Obtain the value of X-Subject-Token in the response header.
- Create a test plan.
- API information
URL format: POST /v1/projects/{project_id}/plans
For details about API request parameters, see Creating a Plan in a Project.
- Example request
POST https://{endpoint}/v1/projects/{project_id}/plans
- Obtain the value of {endpoint} from Endpoints.
- {project_id} uniquely identifies a project.
Body:
{ "name" : "Name of a test plan", "assigned_id" : "efdb403066474ab08836b9eeaaa23bca", "service_id_list" : [ 0 ], "plan_cycle" : { "start_date" : "2020-03-04", "end_date" : "2020-03-31" } }
- Example response
{ "plan_id" : "efdb403066474ab08836b9eeaaa23bca", "error_code" : "CLOUDTEST.000XXXXXX", "error_msg" : "Failure cause: xxx" }
- API information
- Add a case to the test plan.
- API information
URL format: POST /v1/projects/{project_id}/plans/{plan_id}/testcases/batch-add
For details about API request parameters, see Adding Test Cases in Batches to a Plan.
- Example request
POST https://{endpoint}/v1/projects/{project_id}/plans/{plan_id}/testcases/batch-add
- Obtain the value of {endpoint} from Endpoints.
- {project_id} uniquely identifies a project.
Body:
{ "service_id" : 13, "testcase_id_list" : [ "efdb403066474ab08836b9eeaaa23bca", "251fca07b22f493692eb06b1754f07a8" ] }
- Example response
{ "error_code" : "CLOUDTEST.000XXXXXX", "error_msg" : "Failure cause: xxx", "error_detail" : { "failed" : [ { "error_code" : "CLOUDTEST.000XXXXXX", "error_msg" : "Failure cause: xxx", "testcase_id" : "efdb403066474ab08836b9eeaaa23bca" } , { "error_code" : "CLOUDTEST.000XXXXXX", "error_msg" : "Failure cause: xxx", "testcase_id" : "251fca07b22f493692eb06b1754f07a8" }] } }
- API information
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