Versions in this module Expand all Collapse all v0 v0.2.0 Sep 1, 2026 Changes in this version type StreamCapture + func (sc *StreamCapture) Endpoint(t testing.TB, timeout time.Duration) string + func (sc *StreamCapture) WaitForData(t testing.TB, substr string, timeout time.Duration) SSEEvent type Suite + func (s *Suite) ListenSSEWithRequest(t testing.TB, req *http.Request) *StreamCapture v0.1.0 Sep 1, 2026 Changes in this version + const HeaderTenantID + func AssertContracts(t *testing.T, actions []action.AnyAction) + func BenchAction[Req, Res any](b *testing.B, act *action.BuiltAction[Req, Res], req Req) + func BenchHTTP(b *testing.B, s *Suite, method, path string, payload any) + func MustError[Req, Res any](t testing.TB, fn action.Fn[Req, Res], req Req, want error) + func MustExecute[Req, Res any](t testing.TB, fn action.Fn[Req, Res], req Req) Res + func RunSmokeTests(t *testing.T, actions []action.AnyAction) + func Script[Req, Res any](results ...Result[Res]) action.Fn[Req, Res] + func Simulate[Req, Res any](t testing.TB, act *action.BuiltAction[Req, Res], req Req, concurrency int, ...) + func WithChaos(actions []action.AnyAction, cfg chaos.Config) []action.AnyAction + type LoadConfig struct + Concurrency int + Duration time.Duration + Method string + Path string + Payload any + type LoadResult struct + ErrorRate float64 + Errors int64 + P50 time.Duration + P95 time.Duration + P99 time.Duration + RPS float64 + TotalRequests int64 + type Recorder struct + CacheHits int + CacheMisses int + Coalesced int + Deduplicated int + Retries []RetryEvent[Req] + func (r *Recorder[Req, Res]) OnCacheHit(context.Context, Req, Res) + func (r *Recorder[Req, Res]) OnCacheMiss(context.Context, Req) + func (r *Recorder[Req, Res]) OnCoalesced(context.Context, Req) + func (r *Recorder[Req, Res]) OnDeduplicated(context.Context, Req) + func (r *Recorder[Req, Res]) OnRetry(_ context.Context, req Req, attempt int, err error) + type Request struct + func (r *Request) Do() *Response + func (r *Request) DoContext(ctx context.Context) (*Response, error) + func (r *Request) DoE() (*Response, error) + func (r *Request) WithBearerToken(token string) *Request + func (r *Request) WithContext(ctx context.Context) *Request + func (r *Request) WithCookie(name, value string) *Request + func (r *Request) WithForm(data map[string]string) *Request + func (r *Request) WithHeader(k, v string) *Request + func (r *Request) WithJSON(v any) *Request + func (r *Request) WithMultipartFile(fieldName, filename string, content []byte) *Request + func (r *Request) WithQueries(params map[string]string) *Request + func (r *Request) WithQuery(key, value string) *Request + func (r *Request) WithTenant(tenantID string) *Request + type Response struct + func (c *Response) Body() []byte + func (c *Response) BodyString() string + func (c *Response) ContainsString(substr string) *Response + func (c *Response) ExpectArrayLen(path string, n int) *Response + func (c *Response) ExpectBadRequest() *Response + func (c *Response) ExpectCreated() *Response + func (c *Response) ExpectErrorKind(kind xerr.Kind, message string) *Response + func (c *Response) ExpectForbidden() *Response + func (c *Response) ExpectHeader(key, value string) *Response + func (c *Response) ExpectNotFound() *Response + func (c *Response) ExpectOK() *Response + func (c *Response) ExpectStatus(code int) *Response + func (c *Response) ExpectSuccess() *Response + func (c *Response) ExpectUnauthorized() *Response + func (c *Response) HasField(path string, expected any) *Response + func (c *Response) Header(k string) string + func (c *Response) Into(v any) *Response + func (c *Response) Status() int + type Result struct + Err error + Value Res + func Failure[Res any](err error) Result[Res] + func Success[Res any](value Res) Result[Res] + type RetryEvent struct + Attempt int + Err error + Request Req + type SSEEvent struct + Data string + Event string + type StreamCapture struct + func (sc *StreamCapture) Close() + func (sc *StreamCapture) WaitFor(t testing.TB, eventName string, timeout time.Duration) SSEEvent + type Suite struct + Server *httptest.Server + T testing.TB + func New(t testing.TB, providers ...any) *Suite + func NewE2E(t testing.TB, baseURL string) *Suite + func NewWithHandler(t testing.TB, h http.Handler) *Suite + func (s *Suite) DELETE(path string, body ...any) *Request + func (s *Suite) GET(path string, body ...any) *Request + func (s *Suite) ListenSSE(path string) *StreamCapture + func (s *Suite) LoadTest(t *testing.T, cfg LoadConfig) LoadResult + func (s *Suite) PATCH(path string, body ...any) *Request + func (s *Suite) POST(path string, body ...any) *Request + func (s *Suite) PUT(path string, body ...any) *Request + func (s *Suite) Request(method, path string) *Request + func (s *Suite) ResetHeaders() *Suite + func (s *Suite) StartBackgroundLoad(cfg LoadConfig) func() + func (s *Suite) WithCookie(name, value string) *Suite + func (s *Suite) WithGlobalBearerToken(token string) *Suite + func (s *Suite) WithGlobalHeader(key, value string) *Suite