feat: dump TestCase to json/yaml file

This commit is contained in:
debugtalk
2022-09-01 23:27:14 +08:00
parent ed36af118c
commit 443baad66f
2 changed files with 26 additions and 2 deletions

View File

@@ -35,11 +35,17 @@ func TestIOSWeixinLive(t *testing.T) {
},
}
fmt.Println(testCase)
if err := testCase.Dump2JSON("demo_weixin_live.json"); err != nil {
t.Fatal(err)
}
if err := testCase.Dump2YAML("demo_weixin_live.yaml"); err != nil {
t.Fatal(err)
}
runner := hrp.NewRunner(t)
sessionRunner, _ := runner.NewSessionRunner(testCase)
if err := sessionRunner.Start(nil); err != nil {
t.Fatal()
t.Fatal(err)
}
summary := sessionRunner.GetSummary()
fmt.Println(summary)