mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-17 20:19:29 +00:00
Add the Kiro-style agentic SDLC tooling used to drive this project: the .opencode/skills/kiro-* skill set (discovery, spec init/requirements/design/ tasks, validation, implementation, review, steering), the .kiro/settings templates, and AGENTS.md describing the workflow. Update the spec docs (assessment/design/requirements/tasks) to current state. Scope tests/test_opencode_skills.py to the project's own openultrasast-* skills so the third-party kiro-* tooling (which uses a different frontmatter convention) no longer breaks the frontmatter check. Co-Authored-By: Claude Opus 4.8 <[email protected]>
48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
# Testing Standards
|
|
|
|
[Purpose: guide what to test, where tests live, and how to structure them]
|
|
|
|
## Philosophy
|
|
- Test behavior, not implementation
|
|
- Prefer fast, reliable tests; minimize brittle mocks
|
|
- Cover critical paths deeply; breadth over 100% pursuit
|
|
|
|
## Organization
|
|
Options:
|
|
- Co-located: `component.tsx` + `component.test.tsx`
|
|
- Separate: `/src/...` and `/tests/...`
|
|
Pick one as default; allow exceptions with rationale.
|
|
|
|
Naming:
|
|
- Files: `*.test.*` or `*.spec.*`
|
|
- Suites: what is under test; Cases: expected behavior
|
|
|
|
## Test Types
|
|
- Unit: single unit, mocked dependencies, very fast
|
|
- Integration: multiple units together, mock externals only
|
|
- E2E: full flows, minimal mocks, only for critical journeys
|
|
|
|
## Structure (AAA)
|
|
```typescript
|
|
it('does X when Y', () => {
|
|
// Arrange
|
|
const input = setup();
|
|
// Act
|
|
const result = act(input);
|
|
// Assert
|
|
expect(result).toEqual(expected);
|
|
});
|
|
```
|
|
|
|
## Mocking & Data
|
|
- Mock externals (API/DB); never mock the system under test
|
|
- Use factories/fixtures; reset state between tests
|
|
- Keep test data minimal and intention-revealing
|
|
|
|
## Coverage
|
|
- Target: [% overall]; higher for critical domains
|
|
- Enforce thresholds in CI; exceptions require review rationale
|
|
|
|
---
|
|
_Focus on patterns and decisions. Tool-specific config lives elsewhere._
|