refactor: NewConfig

This commit is contained in:
debugtalk
2021-12-08 13:07:39 +08:00
parent 9689201d29
commit a55f523fd7
10 changed files with 67 additions and 44 deletions

View File

@@ -78,6 +78,12 @@ type TCase struct {
TestSteps []*TStep `json:"teststeps" yaml:"teststeps"`
}
// IConfig represents interface for testcase config.
type IConfig interface {
Name() string
ToStruct() *TConfig
}
// IStep represents interface for all types for teststeps.
type IStep interface {
Name() string
@@ -94,7 +100,7 @@ type ITestCase interface {
// TestCase is a container for one testcase.
// used for testcase runner
type TestCase struct {
Config *TConfig
Config IConfig
TestSteps []IStep
}