Documentation
¶
Overview ¶
Package testing provides automated test execution for Drover tasks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes tests based on configuration
func NewRunner ¶
func NewRunner(config *TestConfig, baseDir string) *Runner
NewRunner creates a new test runner
func (*Runner) Run ¶
func (r *Runner) Run(worktreePath string, taskID string) *TestResult
Run executes tests for a task in the given worktree directory
func (*Runner) SetVerbose ¶
SetVerbose enables or disables verbose logging
type TestConfig ¶
type TestConfig struct {
Mode TestMode `json:"mode"` // How to handle test failures
Scope TestScope `json:"scope"` // Which tests to run
Timeout time.Duration `json:"timeout"` // Maximum time to wait for tests
Command string `json:"command,omitempty"` // Custom test command (optional)
}
TestConfig configures automated test execution
func DefaultTestConfig ¶
func DefaultTestConfig() *TestConfig
DefaultTestConfig returns the default test configuration
type TestMode ¶
type TestMode string
TestMode defines how test failures are handled
const ( // TestModeStrict means test failures block task completion TestModeStrict TestMode = "strict" // TestModeLenient means test failures are logged but don't block completion TestModeLenient TestMode = "lenient" // TestModeDisabled means tests are not run TestModeDisabled TestMode = "disabled" )
type TestResult ¶
type TestResult struct {
Success bool `json:"success"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
Total int `json:"total"`
Duration time.Duration `json:"duration"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
RunTests bool `json:"run_tests"` // Whether tests were actually run
}
TestResult represents the outcome of running tests
Click to show internal directories.
Click to hide internal directories.