Files
ollama37/tests/src/types.ts
Shang Chieh Tseng d11140c016 Add GitHub Actions CI/CD pipeline and test framework
- Add .github/workflows/build-test.yml for automated testing
- Add tests/ directory with TypeScript test runner
- Add docs/CICD.md documentation
- Remove .gitlab-ci.yml (migrated to GitHub Actions)
- Update .gitignore for test artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 14:06:44 +08:00

67 lines
1.1 KiB
TypeScript

// Test case definition
export interface TestStep {
name: string
command: string
timeout?: number
}
export interface TestCase {
id: string
name: string
suite: string
priority: number
timeout: number
dependencies: string[]
steps: TestStep[]
criteria: string
}
// Execution results
export interface StepResult {
name: string
command: string
stdout: string
stderr: string
exitCode: number
duration: number
}
export interface TestResult {
testCase: TestCase
steps: StepResult[]
totalDuration: number
logs: string
}
// LLM judgment
export interface Judgment {
testId: string
pass: boolean
reason: string
}
// Final report
export interface TestReport {
testId: string
name: string
suite: string
pass: boolean
reason: string
duration: number
logs: string
}
// Runner options
export interface RunnerOptions {
suite?: string
id?: string
workers: number
dryRun: boolean
output: 'console' | 'json' | 'junit'
reportTestlink: boolean
ollamaUrl: string
ollamaModel: string
testlinkUrl: string
testlinkApiKey: string
}