feat(api): 添加备注功能以增强用例描述
- 在 Api 和 ApiCase 中新增 Note 方法,允许为用例设置可选备注 - 更新 TestRecord 结构体,包含备注字段以便记录用例信息 - 修改 Swagger 生成逻辑,支持备注字段的输出 - 更新文档,详细说明 Note 方法的使用及其在调试控制台的显示效果
This commit is contained in:
+12
-11
@@ -46,18 +46,19 @@ type MethodCoverage struct {
|
||||
|
||||
// TestRecord 单条测试记录
|
||||
type TestRecord struct {
|
||||
Path string
|
||||
Desc string
|
||||
CaseName string
|
||||
Passed bool
|
||||
Duration time.Duration
|
||||
Method string
|
||||
Query map[string]interface{}
|
||||
JsonBody interface{}
|
||||
FormBody map[string]interface{}
|
||||
HasFile bool
|
||||
FileField string
|
||||
Path string
|
||||
Desc string
|
||||
CaseName string
|
||||
Passed bool
|
||||
Duration time.Duration
|
||||
Method string
|
||||
Query map[string]interface{}
|
||||
JsonBody interface{}
|
||||
FormBody map[string]interface{}
|
||||
HasFile bool
|
||||
FileField string
|
||||
ResponseBody map[string]interface{}
|
||||
Note string
|
||||
}
|
||||
|
||||
// TestCollector 线程安全的测试记录收集器
|
||||
|
||||
Reference in New Issue
Block a user