mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-23 17:29:58 +08:00
feat: log transaction when running tests
This commit is contained in:
10
runner.go
10
runner.go
@@ -118,6 +118,16 @@ func (r *hrpRunner) runCase(testcase *TestCase) error {
|
||||
}
|
||||
|
||||
func (r *hrpRunner) runStep(step IStep, config *TConfig) (stepResult *stepData, err error) {
|
||||
// step type priority order: transaction > testcase > request
|
||||
if stepTransaction, ok := step.(*stepTransaction); ok {
|
||||
// transaction
|
||||
log.Info().
|
||||
Str("name", stepTransaction.step.Transaction.Name).
|
||||
Str("type", stepTransaction.step.Transaction.Type).
|
||||
Msg("transaction")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
log.Info().Str("step", step.Name()).Msg("run step start")
|
||||
|
||||
// copy step to avoid data racing
|
||||
|
||||
Reference in New Issue
Block a user