MCPcopy
hub / github.com/httprunner/httprunner / CallRefAPI

Method CallRefAPI

hrp/step_request.go:694–704  ·  view source on GitHub ↗

CallRefAPI calls a referenced api.

(api IAPI)

Source from the content-addressed store, hash-verified

692
693// CallRefAPI calls a referenced api.
694func (s *StepRequest) CallRefAPI(api IAPI) *StepAPIWithOptionalArgs {
695 var err error
696 s.step.API, err = api.ToAPI()
697 if err != nil {
698 log.Error().Err(err).Msg("failed to load api")
699 os.Exit(code.GetErrorCode(err))
700 }
701 return &StepAPIWithOptionalArgs{
702 step: s.step,
703 }
704}
705
706// StartTransaction starts a transaction.
707func (s *StepRequest) StartTransaction(name string) *StepTransaction {

Callers 1

TestRunCaseWithRefAPIFunction · 0.80

Calls 3

GetErrorCodeFunction · 0.92
ErrMethod · 0.80
ToAPIMethod · 0.65

Tested by 1

TestRunCaseWithRefAPIFunction · 0.64