mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-07 05:42:46 +08:00
feat: dump TestCase to json/yaml file
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user