mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
refactor: convert API
This commit is contained in:
13
models.go
13
models.go
@@ -68,7 +68,8 @@ type IStep interface {
|
||||
}
|
||||
|
||||
type ITestCase interface {
|
||||
ToStruct() (*TestCase, error)
|
||||
ToTestCase() (*TestCase, error)
|
||||
ToTCase() (*TCase, error)
|
||||
}
|
||||
|
||||
// used for testcase runner
|
||||
@@ -77,7 +78,7 @@ type TestCase struct {
|
||||
TestSteps []IStep
|
||||
}
|
||||
|
||||
func (tc *TestCase) ToStruct() (*TestCase, error) {
|
||||
func (tc *TestCase) ToTestCase() (*TestCase, error) {
|
||||
return tc, nil
|
||||
}
|
||||
|
||||
@@ -85,14 +86,6 @@ type TestCasePath struct {
|
||||
Path string
|
||||
}
|
||||
|
||||
func (path *TestCasePath) ToStruct() (*TestCase, error) {
|
||||
testcase, err := loadTestFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return testcase, nil
|
||||
}
|
||||
|
||||
type TestCaseSummary struct{}
|
||||
|
||||
type StepData struct {
|
||||
|
||||
Reference in New Issue
Block a user