Documentation ¶
Index ¶
- Constants
- type DiffsPrinter
- type Regression
- func (r *Regression) DeNoise(ctx context.Context, cid, id, app, body string, h http.Header, ...) error
- func (r *Regression) GetTestRun(ctx context.Context, summary bool, cid string, user, app, id *string, ...) ([]*models.TestRun, error)
- func (r *Regression) Normalize(ctx context.Context, cid, id string) error
- func (r *Regression) PutTest(ctx context.Context, run models.TestRun, testExport bool, ...) error
- func (r *Regression) Test(ctx context.Context, cid, app, runID, id, testCasePath, mockPath string, ...) (bool, error)
- func (r *Regression) TestGrpc(ctx context.Context, resp models.GrpcResp, ...) (bool, error)
- type Service
- type TestReportFS
- type TestRunDB
Constants ¶
View Source
const MAX_LINE_LENGTH = 50
Chars PER expected/actual string. Can be changed no problem
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffsPrinter ¶ added in v0.9.1
type DiffsPrinter struct {
// contains filtered or unexported fields
}
func NewDiffsPrinter ¶ added in v0.9.1
func NewDiffsPrinter(testCase string) DiffsPrinter
func (*DiffsPrinter) PushBodyDiff ¶ added in v0.9.1
func (d *DiffsPrinter) PushBodyDiff(exp, act string, noise []string)
func (*DiffsPrinter) PushHeaderDiff ¶ added in v0.9.1
func (d *DiffsPrinter) PushHeaderDiff(exp, act string, noise map[string]string)
func (*DiffsPrinter) PushStatusDiff ¶ added in v0.9.1
func (d *DiffsPrinter) PushStatusDiff(exp, act string)
func (*DiffsPrinter) Render ¶ added in v0.9.1
func (d *DiffsPrinter) Render()
Will display and colorize diffs side-by-side
type Regression ¶
type Regression struct {
// contains filtered or unexported fields
}
func New ¶
func New(tdb models.TestCaseDB, rdb TestRunDB, testReportFS TestReportFS, adb telemetry.Service, log *zap.Logger, TestExport bool, mFS models.MockFS) *Regression
func (*Regression) GetTestRun ¶ added in v0.7.9
func (*Regression) Normalize ¶ added in v0.7.9
func (r *Regression) Normalize(ctx context.Context, cid, id string) error
type Service ¶
type Service interface { DeNoise(ctx context.Context, cid, id, app, body string, h http.Header, path, tcsType string) error Test(ctx context.Context, cid, app, runID, id, testCasePath, mockPath string, resp models.HttpResp) (bool, error) // For Grpc TestGrpc(ctx context.Context, resp models.GrpcResp, cid, app, runID, id, testCasePath, mockPath string) (bool, error) Normalize(ctx context.Context, cid, id string) error GetTestRun(ctx context.Context, summary bool, cid string, user, app, id *string, from, to *time.Time, offset *int, limit *int) ([]*models.TestRun, error) PutTest(ctx context.Context, run models.TestRun, testExport bool, runId, testCasePath, mockPath, testReportPath string, totalTcs int) error }
type TestReportFS ¶ added in v0.7.9
type TestReportFS interface { Write(ctx context.Context, path string, doc models.TestReport) error Read(ctx context.Context, path, name string) (models.TestReport, error) SetResult(runId string, test models.TestResult) GetResults(runId string) ([]models.TestResult, error) Lock() Unlock() }
type TestRunDB ¶ added in v0.7.9
type TestRunDB interface { Read(ctx context.Context, cid string, user, app, id *string, from, to *time.Time, offset int, limit int) ([]*models.TestRun, error) Upsert(ctx context.Context, run models.TestRun) error ReadOne(ctx context.Context, id string) (*models.TestRun, error) ReadTest(ctx context.Context, id string) (models.Test, error) ReadTests(ctx context.Context, runID string) ([]models.Test, error) PutTest(ctx context.Context, t models.Test) error Increment(ctx context.Context, success, failure bool, id string) error }
Click to show internal directories.
Click to hide internal directories.