Skip to content

Commit

Permalink
Merge branch 'main' into log-rerecord
Browse files Browse the repository at this point in the history
  • Loading branch information
EraKin575 committed May 24, 2024
2 parents 1c8a750 + 6218858 commit 368610e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/service/replay/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ func (r *Replayer) RunTestSet(ctx context.Context, testSetID string, testRunID s
resp, loopErr := requestMockemulator.SimulateRequest(runTestSetCtx, appID, testCase, testSetID)
if loopErr != nil {
utils.LogError(r.logger, err, "failed to simulate request")
break
failure++
continue
}

consumedMocks, err := r.instrumentation.GetConsumedMocks(runTestSetCtx, appID)
Expand Down
6 changes: 4 additions & 2 deletions pkg/service/replay/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ type Telemetry interface {
MockTestRun(utilizedMocks int)
}

// RequestEmulator is used to simulate the API requests to the user API. The requests are read from
// the recorded test case of the user app.
// RequestMockHandler defines an interface for implementing hooks that extend and customize
// the behavior of request simulations and test workflows. This interface allows for
// detailed control over various stages of the testing process, including request simulation,
// test status processing, and post-test actions.
type RequestMockHandler interface {
SimulateRequest(ctx context.Context, appID uint64, tc *models.TestCase, testSetID string) (*models.HTTPResp, error)
ProcessTestRunStatus(ctx context.Context, status bool, testSetID string)
Expand Down

0 comments on commit 368610e

Please sign in to comment.