MCPcopy
hub / github.com/httprunner/httprunner / ToTestCase

Method ToTestCase

hrp/testcase.go:127–138  ·  view source on GitHub ↗
(casePath string)

Source from the content-addressed store, hash-verified

125}
126
127func (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
141func (tc *TCase) toTestCase() (*TestCase, error) {

Callers 1

ToTestCaseMethod · 0.95

Calls 1

toTestCaseMethod · 0.95

Tested by

no test coverage detected