Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AITestCase ¶
type AITestCase struct {
Name string
Prompt string
ExpectedKeywords []string // Keywords that must appear in response
ForbiddenWords []string // Words that must NOT appear
MinLength int // Minimum response length
MaxLatency time.Duration // Maximum acceptable latency
RiskScore float64
}
AITestCase represents a test case for AI behavior
type AITestSuite ¶
type AITestSuite struct {
// contains filtered or unexported fields
}
AITestSuite runs sanity checks on AI responses
func NewAITestSuite ¶
func NewAITestSuite(orchestrator *ai.UnifiedOrchestrator, t *testing.T) *AITestSuite
NewAITestSuite creates a new AI test suite
func (*AITestSuite) RunSanityChecks ¶
func (s *AITestSuite) RunSanityChecks()
RunSanityChecks runs a comprehensive suite of sanity checks
func (*AITestSuite) RunTest ¶
func (s *AITestSuite) RunTest(testCase AITestCase) bool
RunTest executes a single AI test case
func (*AITestSuite) TestConsistency ¶
func (s *AITestSuite) TestConsistency()
TestConsistency checks if AI gives consistent answers
type ChaosEngine ¶
type ChaosEngine struct {
// contains filtered or unexported fields
}
ChaosEngine runs chaos tests
func NewChaosEngine ¶
func NewChaosEngine(t *testing.T) *ChaosEngine
NewChaosEngine creates a new chaos testing engine
func (*ChaosEngine) AddTest ¶
func (c *ChaosEngine) AddTest(test ChaosTest)
AddTest adds a chaos test
type ChaosScenario ¶
type ChaosScenario interface {
Execute(ctx context.Context) error
Rollback(ctx context.Context) error
}
ChaosScenario defines the chaos to inject
type ChaosTest ¶
type ChaosTest struct {
Name string
Description string
Duration time.Duration
Scenario ChaosScenario
}
ChaosTest represents a chaos testing scenario
type DatabaseSlowdownScenario ¶
type DatabaseSlowdownScenario struct {
SlowdownFactor int // Multiply query time by this
}
DatabaseSlowdownScenario simulates slow database
type LoadTest ¶
type LoadTest struct {
Name string
TargetURL string
Concurrency int
Duration time.Duration
RequestsPerSec int
}
LoadTest represents a load test configuration
type LoadTestResult ¶
type LoadTestResult struct {
TotalRequests int
SuccessfulReqs int
FailedReqs int
AvgLatency time.Duration
MinLatency time.Duration
MaxLatency time.Duration
RequestsPerSec float64
}
LoadTestResult contains load test results
func RunLoadTest ¶
func RunLoadTest(t *testing.T, test LoadTest) LoadTestResult
RunLoadTest executes a load test
type NetworkLatencyScenario ¶
NetworkLatencyScenario adds network latency
type ServiceFailureScenario ¶
ServiceFailureScenario simulates service failures