(casePath string)
| 125 | } |
| 126 | |
| 127 | func (tc *TCase) ToTestCase(casePath string) (*TestCase, error) { |
| 128 | if tc.TestSteps == nil { |
| 129 | return nil, errors.Wrap(code.InvalidCaseFormat, |
| 130 | "invalid testcase format, missing teststeps!") |
| 131 | } |
| 132 | |
| 133 | if tc.Config == nil { |
| 134 | tc.Config = &TConfig{Name: "please input testcase name"} |
| 135 | } |
| 136 | tc.Config.Path = casePath |
| 137 | return tc.toTestCase() |
| 138 | } |
| 139 | |
| 140 | // toTestCase converts *TCase to *TestCase |
| 141 | func (tc *TCase) toTestCase() (*TestCase, error) { |