MCPcopy
hub / github.com/httprunner/httprunner / CallRefCase

Method CallRefCase

hrp/step_request.go:681–691  ·  view source on GitHub ↗

CallRefCase calls a referenced testcase.

(tc ITestCase)

Source from the content-addressed store, hash-verified

679
680// CallRefCase calls a referenced testcase.
681func (s *StepRequest) CallRefCase(tc ITestCase) *StepTestCaseWithOptionalArgs {
682 var err error
683 s.step.TestCase, err = tc.ToTestCase()
684 if err != nil {
685 log.Error().Err(err).Msg("failed to load testcase")
686 os.Exit(code.GetErrorCode(err))
687 }
688 return &StepTestCaseWithOptionalArgs{
689 step: s.step,
690 }
691}
692
693// CallRefAPI calls a referenced api.
694func (s *StepRequest) CallRefAPI(api IAPI) *StepAPIWithOptionalArgs {

Callers 3

TestBoomerStandaloneRunFunction · 0.80
assertRunTestCasesFunction · 0.80
TestRunCaseWithThinkTimeFunction · 0.80

Calls 3

GetErrorCodeFunction · 0.92
ErrMethod · 0.80
ToTestCaseMethod · 0.65

Tested by 3

TestBoomerStandaloneRunFunction · 0.64
assertRunTestCasesFunction · 0.64
TestRunCaseWithThinkTimeFunction · 0.64