e2e

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package e2e provides utilities for end-to-end testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GA4RequestGenerator

type GA4RequestGenerator struct {
	// contains filtered or unexported fields
}

GA4RequestGenerator sends GA4 collect requests for testing purposes

func NewGA4RequestGenerator

func NewGA4RequestGenerator(host string, port int) *GA4RequestGenerator

NewGA4RequestGenerator creates a new GA4 request generator instance

func (*GA4RequestGenerator) Hit

func (g *GA4RequestGenerator) Hit(clientID, eventType, sessionStamp string) error

Hit sends a GA4 hit with the specified parameters

func (*GA4RequestGenerator) Replay

func (g *GA4RequestGenerator) Replay(sequence []HitSequenceItem) error

Replay sends a sequence of hits with optional delays

type HitSequenceItem

type HitSequenceItem struct {
	ClientID     string
	EventType    string
	SessionStamp string
	Description  string
	SleepBefore  time.Duration
}

HitSequenceItem represents a single hit in a sequence from the shell script

type LogCapture

type LogCapture struct {
	// contains filtered or unexported fields
}

LogCapture captures logrus entries for testing

func NewLogCapture

func NewLogCapture() *LogCapture

NewLogCapture creates a new log capture hook

func (*LogCapture) Fire

func (hook *LogCapture) Fire(entry *logrus.Entry) error

Fire captures the log entry

func (*LogCapture) GetEntries

func (hook *LogCapture) GetEntries() []*logrus.Entry

GetEntries returns all captured entries

func (*LogCapture) HasMessage

func (hook *LogCapture) HasMessage(message string) bool

HasMessage checks if any captured entry contains the given message

func (*LogCapture) Levels

func (hook *LogCapture) Levels() []logrus.Level

Levels returns all log levels to capture

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL