feat: run tsetcase by path

This commit is contained in:
debugtalk
2021-10-10 00:22:26 +08:00
parent bfc1742e3b
commit 7579172e25
6 changed files with 84 additions and 12 deletions

View File

@@ -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 {