94 lines
3.1 KiB
Markdown
94 lines
3.1 KiB
Markdown
---
|
|
description: ceshi
|
|
---
|
|
```mermaid
|
|
flowchart TD
|
|
start_node_default([Start])
|
|
syntax_check[syntax-check]
|
|
issues_check{If/Else:<br/>Conditional Branch}
|
|
fix_issues[fix-issues]
|
|
module_division[module-division]
|
|
frontend_check{AskUserQuestion:<br/>这是前端项目吗?}
|
|
unit_test_planning[unit-test-planning]
|
|
playwright_testing[[MCP: playwright_navigate]]
|
|
backend_unit_testing[backend-unit-testing]
|
|
test_verification{If/Else:<br/>Conditional Branch}
|
|
end_node_default([End])
|
|
|
|
start_node_default --> syntax_check
|
|
syntax_check --> issues_check
|
|
issues_check -->|发现问题| fix_issues
|
|
fix_issues --> syntax_check
|
|
issues_check -->|未发现问题| module_division
|
|
module_division --> frontend_check
|
|
frontend_check -->|是| unit_test_planning
|
|
unit_test_planning --> playwright_testing
|
|
playwright_testing --> test_verification
|
|
frontend_check -->|否| backend_unit_testing
|
|
backend_unit_testing --> test_verification
|
|
test_verification -->|测试通过| end_node_default
|
|
```
|
|
|
|
## Workflow Execution Guide
|
|
|
|
Follow the Mermaid flowchart above to execute the workflow. Each node type has specific execution methods as described below.
|
|
|
|
### Execution Methods by Node Type
|
|
|
|
- **Rectangle nodes**: Execute Sub-Agents using the Task tool
|
|
- **Diamond nodes (AskUserQuestion:...)**: Use the AskUserQuestion tool to prompt the user and branch based on their response
|
|
- **Diamond nodes (Branch/Switch:...)**: Automatically branch based on the results of previous processing (see details section)
|
|
- **Rectangle nodes (Prompt nodes)**: Execute the prompts described in the details section below
|
|
|
|
## MCP Tool Nodes
|
|
|
|
#### playwright_testing(playwright_navigate)
|
|
|
|
**Description**: 导航到URL进行前端测试
|
|
|
|
**MCP Server**: playwright
|
|
|
|
**Tool Name**: playwright_navigate
|
|
|
|
**Validation Status**: valid
|
|
|
|
**Configured Parameters**:
|
|
|
|
- `url` (string): http://localhost:3000
|
|
|
|
**Available Parameters**:
|
|
|
|
- `url` (string) (required): 要导航到的测试URL
|
|
|
|
This node invokes an MCP (Model Context Protocol) tool. When executing this workflow, use the configured parameters to call the tool via the MCP server.
|
|
|
|
### AskUserQuestion Node Details
|
|
|
|
Ask the user and proceed based on their choice.
|
|
|
|
#### frontend_check(这是前端项目吗?)
|
|
|
|
**Selection mode:** Single Select (branches based on the selected option)
|
|
|
|
**Options:**
|
|
- **是**: 需要浏览器测试的前端项目
|
|
- **否**: 只需要单元测试的后端项目
|
|
|
|
### If/Else Node Details
|
|
|
|
#### issues_check(Binary Branch (True/False))
|
|
|
|
**Branch conditions:**
|
|
- **未发现问题**: 未检测到编译或语法问题
|
|
- **发现问题**: 检测到编译或语法问题
|
|
|
|
**Execution method**: Evaluate the results of the previous processing and automatically select the appropriate branch based on the conditions above.
|
|
|
|
#### test_verification(Binary Branch (True/False))
|
|
|
|
**Branch conditions:**
|
|
- **测试通过**: 所有单元测试通过且逻辑符合预期
|
|
- **测试失败**: 部分单元测试失败或逻辑不符合预期
|
|
|
|
**Execution method**: Evaluate the results of the previous processing and automatically select the appropriate branch based on the conditions above.
|