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

Method ToTestCase

hrp/testcase.go:80–88  ·  view source on GitHub ↗

ToTestCase loads testcase path and convert to *TestCase

()

Source from the content-addressed store, hash-verified

78
79// ToTestCase loads testcase path and convert to *TestCase
80func (path *TestCasePath) ToTestCase() (*TestCase, error) {
81 tc := &TCase{}
82 casePath := path.GetPath()
83 err := builtin.LoadFile(casePath, tc)
84 if err != nil {
85 return nil, err
86 }
87 return tc.ToTestCase(casePath)
88}
89
90// TCase represents testcase data structure.
91// Each testcase includes one public config and several sequential teststeps.

Callers

nothing calls this directly

Calls 3

GetPathMethod · 0.95
ToTestCaseMethod · 0.95
LoadFileFunction · 0.92

Tested by

no test coverage detected