mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
fix example JSON/YAML file path
This commit is contained in:
@@ -6,8 +6,9 @@ import (
|
||||
"github.com/httprunner/hrp"
|
||||
)
|
||||
|
||||
const demoHttpRunnerJSONPath = "../examples/demo_httprunner.json"
|
||||
const demoHttpRunnerYAMLPath = "../examples/demo_httprunner.yaml"
|
||||
// generated by examples/har/demo.har using HttpRunner v3.1.6
|
||||
const demoHttpRunnerJSONPath = "demo_httprunner.json"
|
||||
const demoHttpRunnerYAMLPath = "demo_httprunner.yaml"
|
||||
|
||||
func TestCompatTestCase(t *testing.T) {
|
||||
testcaseFromJSON := &hrp.TestCasePath{Path: demoHttpRunnerJSONPath}
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"github.com/httprunner/hrp/internal/builtin"
|
||||
)
|
||||
|
||||
const rendezvousTestJSONPath = "rendezvous_test.json"
|
||||
|
||||
var rendezvousTestcase = &hrp.TestCase{
|
||||
Config: hrp.NewConfig("run request with functions").
|
||||
SetBaseURL("https://postman-echo.com").
|
||||
@@ -59,7 +61,7 @@ func TestRendezvousDump2JSON(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("ToTCase error: %v", err)
|
||||
}
|
||||
err = builtin.Dump2JSON(tCase, "rendezvous_test.json")
|
||||
err = builtin.Dump2JSON(tCase, rendezvousTestJSONPath)
|
||||
if err != nil {
|
||||
t.Fatalf("dump to json error: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user