mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-21 04:22:30 +08:00
feat: run tsetcase by path
This commit is contained in:
20
models.go
20
models.go
@@ -67,12 +67,32 @@ type IStep interface {
|
||||
ToStruct() *TStep
|
||||
}
|
||||
|
||||
type ITestCase interface {
|
||||
ToStruct() (*TestCase, error)
|
||||
}
|
||||
|
||||
// used for testcase runner
|
||||
type TestCase struct {
|
||||
Config TConfig
|
||||
TestSteps []IStep
|
||||
}
|
||||
|
||||
func (tc *TestCase) ToStruct() (*TestCase, error) {
|
||||
return tc, nil
|
||||
}
|
||||
|
||||
type TestCasePath struct {
|
||||
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