fix: call referenced api/testcase with relative path

This commit is contained in:
debugtalk
2022-03-27 13:05:20 +08:00
parent cdabde4dc8
commit 41f60d254f
23 changed files with 170 additions and 436 deletions

View File

@@ -1,25 +0,0 @@
package tests
import (
"testing"
"github.com/httprunner/httprunner/hrp"
)
// generated by examples/data/har/demo.har using HttpRunner v3.1.6
var (
demoHttpRunnerJSONPath hrp.TestCasePath = "../../examples/hrp/demo_httprunner.json"
demoHttpRunnerYAMLPath hrp.TestCasePath = "../../examples/hrp/demo_httprunner.yaml"
)
func TestCompatTestCase(t *testing.T) {
err := hrp.NewRunner(t).Run(&demoHttpRunnerJSONPath)
if err != nil {
t.Fatalf("run testcase error: %v", err)
}
err = hrp.NewRunner(t).Run(&demoHttpRunnerYAMLPath)
if err != nil {
t.Fatalf("run testcase error: %v", err)
}
}