mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
change: relocate
This commit is contained in:
+5
-10
@@ -10,16 +10,6 @@ import (
|
|||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (tc *TestCase) ToTCase() (*TCase, error) {
|
|
||||||
tCase := TCase{
|
|
||||||
Config: tc.Config.ToStruct(),
|
|
||||||
}
|
|
||||||
for _, step := range tc.TestSteps {
|
|
||||||
tCase.TestSteps = append(tCase.TestSteps, step.ToStruct())
|
|
||||||
}
|
|
||||||
return &tCase, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (tc *TCase) Dump2JSON(path string) error {
|
func (tc *TCase) Dump2JSON(path string) error {
|
||||||
path, err := filepath.Abs(path)
|
path, err := filepath.Abs(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -133,6 +123,11 @@ func (tc *TCase) ToTestCase() (*TestCase, error) {
|
|||||||
|
|
||||||
var ErrUnsupportedFileExt = fmt.Errorf("unsupported testcase file extension")
|
var ErrUnsupportedFileExt = fmt.Errorf("unsupported testcase file extension")
|
||||||
|
|
||||||
|
// TestCasePath implements ITestCase interface.
|
||||||
|
type TestCasePath struct {
|
||||||
|
Path string
|
||||||
|
}
|
||||||
|
|
||||||
func (path *TestCasePath) ToTestCase() (*TestCase, error) {
|
func (path *TestCasePath) ToTestCase() (*TestCase, error) {
|
||||||
var tc *TCase
|
var tc *TCase
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
@@ -108,9 +108,14 @@ func (tc *TestCase) ToTestCase() (*TestCase, error) {
|
|||||||
return tc, nil
|
return tc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestCasePath implements ITestCase interface.
|
func (tc *TestCase) ToTCase() (*TCase, error) {
|
||||||
type TestCasePath struct {
|
tCase := TCase{
|
||||||
Path string
|
Config: tc.Config.ToStruct(),
|
||||||
|
}
|
||||||
|
for _, step := range tc.TestSteps {
|
||||||
|
tCase.TestSteps = append(tCase.TestSteps, step.ToStruct())
|
||||||
|
}
|
||||||
|
return &tCase, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type testCaseSummary struct{}
|
type testCaseSummary struct{}
|
||||||
|
|||||||
Reference in New Issue
Block a user