Intelligent Test with CodeArts Agent
CodeArts TestPlan can be integrated with CodeArts Agent through a CodeArts toolchain plug-in. The CodeArts toolchain plug-in can be invoked by flexible prompts or skills to help the agent efficiently complete test operations.
You can quickly create, modify, and manage test plans, test cases, and test suites using natural language commands in the CodeArts chat window without learning operations on the console. This helps you efficiently perform tests.
Core Benefits
- Natural language interaction: You can invoke the corresponding skills to complete testing tasks simply by describing their requirements in natural language in the chat window. With no need to learn complex console specifications, the user barrier is significantly reduced.
- Intelligent test activity: CodeArts Agent uses configurable prompts and skills in the plug-in based architecture to accurately understand users' intentions and efficiently complete test activities.
- No switching required: You can create test plans, manage test cases, and complete entire workflows within the agent chat window, without navigating to or manually invoking a standalone test plan page. This eliminates cross-platform operational overhead.
- Seamless test collaboration : In daily R&D scenarios, you can use CodeArts Agent for seamless collaboration, improving test efficiency.
Working Principles
CodeArts TestPlan makes its API capabilities available to CodeArts Agent through the CodeArts toolchain plug-in. After the agent interprets a user's natural language prompts, it calls the CodeArts TestPlan API via Koo Command Line Interface (KooCLI), to perform the corresponding operations, and returns results to the chat window.
CodeArts Toolchain Plug-in (TestPlan)
The CodeArts toolchain plug-in integrates CodeArts R&D services, such as CodeArts Req, CodeArts Repo, CodeArts Check, CodeArts TestPlan, CodeArts Pipeline, CodeArts Build, CodeArts Artifact, and CodeArts Deploy, into CodeArts Agent as skills and sub-agents. After the plug-in is installed, users can trigger service operations directly through natural language prompts in the agent chat window. There is no need to switch to the console. Skills provide interactive guidance for step-by-step operations, while sub-agents handle complex batch orchestration automatically. Together, they address every scenario, from one-off queries to bulk workflows.
CodeArts TestPlan provides a skill and a sub-agent in the CodeArts toolchain plug-in.
The skill (codearts-test-plan) is an expert in interactive test plan execution, including creating test versions, plans, and cases, managing test cases, creating test suites, and linking requirements to plans/cases. It understands the user's intent and guides operations step by step. When an operation is highly complex, involves batch processing, or requires multi-step orchestration, the skill hands the task off to a sub-agent (codearts-testplan-assistant) for execution. The sub-agent runs autonomously in an independent context, without consuming primary chat resources. It can automatically complete complex orchestration tasks such as creating test plans and managing test cases, and can return a structured result report upon completion. Together, the skill and sub-agent form a two-layer execution architecture, giving the agent the flexibility to handle varying tasks from single queries to batch orchestration.
Prerequisites
| No. | Item | Description |
|---|---|---|
| 1 | CodeArts Agent has been installed and you have logged in to it using your account. | CodeArts TestPlan's intelligent capabilities are implemented through CodeArts Agent. |
| 2 | CodeArts TestPlan has been enabled. | To use CodeArts TestPlan functions through CodeArts Agent, you must have purchased CodeArts TestPlan. |
| 3 | You have been configured with CodeArts TestPlan role-based permissions. | To use CodeArts TestPlan functions through CodeArts Agent, you must have relevant permissions assigned. |
| 4 | Tokens or credits in your CodeArts Agent account are consumed when this operation invokes tools or runs LLM inference. | |
Procedure
- Click to download the CodeArts toolchain plug-in.
- Click install.bat in the plug-in package to install the plug-in and KooCLI.
- Complete KooCLI initialization to store your permanent AK/SK and region information in the configuration file, so there is no need to repeatedly enter this information when performing operations.
- Open the CodeArts Agent chat panel and tell it what you want to do using natural language.
- The first time you use CodeArts Agent to perform test-related operations, the analysis process takes longer. As usage increases, the analysis speed gradually improves and response time shortens.
- The interface style varies across different CodeArts Agent clients; refer to the actual display in the tool you are using for the exact operations.
Application Scenarios
The table below lists the test scenarios that can be implemented by CodeArts Agent.
You are advised to provide the project name, project ID, version name, and test plan name when entering a command to improve the generation success rate.
| Scenario | Scenario Description | Natural Language Prompt Example |
|---|---|---|
| Test version | Create, delete, and view test versions, and search for test cases in a version. |
|
| Test plan | Create, delete, modify, and view test plans, associate test plans with requirements, and add existing test cases to test plans. |
|
| Manual test case | Create, delete, modify, view, and filter test cases. Associate test cases with requirements and defect tickets. |
|
| Manual test suite | Create, delete, modify, and view test suites. Set the expected results of test suites or cases. View the historical execution records. |
|
| API test automation suite | Create, delete, modify, view, and execute test suites. View the historical execution records. |
|
Usage Example
- Open the CodeArts Agent chat panel.
The interface style varies across different CodeArts Agent clients; refer to the actual display in the tool you are using for the exact operations.
- In the chat window, describe your requirements in natural language to use CodeArts Agent.
The first time you use CodeArts Agent to perform test-related operations, the analysis process takes longer. As usage increases, the analysis speed gradually improves and response time shortens.
Scenario 1: Create a Test Plan
The following is an example prompt you could use to create a test plan:
My project name is "Scrum-Test". Create a test plan named "Sample Plan" under "Sample Version".
Scenario 2: Create a Test Case
The following is an example prompt you could use to create a test case:
In the test plan "Sample Plan", create a manual test case named "Sample Test Case".
Scenario 3: Modify a Test Case
The following is an example prompt you could use to modify the prerequisites of a test case:
Add a prerequisite "You have logged in." to the manual test case "Sample Test Case".
Scenario 4: Associating a Test Case with a Requirement
The following is an example prompt you could use to associate a test case with a requirement:
Associate the manual test case "Sample Test Case" with requirement 9459814.
Scenario 5: Delete a Test Case
The following is an example prompt you could use to delete a test case:
Delete the test case 17963 whose project name is Scrum-Test and version name is Create Test Case.
Tips
- Be as specific as possible: Include key details in your prompts, such as the project name, project ID, test version name, and test plan, to help the agent carry out the task more accurately.
- Break a task into steps: For complex tasks, proceed and confirm the results step by step. For example, in a test case scenario, search for the target test version and test plan, configure basic information about the test case, confirm the basic information about the test case, and then execute the test case.
- Review execution: For critical operations (such as deleting a test case or executing a test suite), carefully review the results returned by the agent before confirming.
What is your overall rating for this page?
Thank 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