()
| 37 | } |
| 38 | |
| 39 | func (tc *TestCase) ToTCase() *TCase { |
| 40 | tCase := &TCase{ |
| 41 | Config: tc.Config, |
| 42 | } |
| 43 | for _, step := range tc.TestSteps { |
| 44 | if step.Type() == stepTypeTestCase { |
| 45 | if testcase, ok := step.Struct().TestCase.(*TestCase); ok { |
| 46 | step.Struct().TestCase = testcase.ToTCase() |
| 47 | } |
| 48 | } |
| 49 | tCase.TestSteps = append(tCase.TestSteps, step.Struct()) |
| 50 | } |
| 51 | return tCase |
| 52 | } |
| 53 | |
| 54 | func (tc *TestCase) Dump2JSON(targetPath string) error { |
| 55 | tCase := tc.ToTCase() |