run-unit-tests
Run all unit and integration tests and generate a comprehensive baseline report
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Run all unit and integration tests and generate a comprehensive baseline report
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Visual UI verification workflow using Chrome DevTools MCP. Use when validating component rendering, CSS/styling changes, layout regressions, interactive UI behavior, screenshots, and post-change visual checks. Use this skill when the user is having trouble with styling or UI work or is trying to change the visual appearance of the app.
Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.
TeensyROM .NET backend domain knowledge — architecture, MediatR CQRS, serial protocol, storage systems, RadEndpoints, and testing patterns. Use when working on backend code, adding endpoints, modifying serial commands, updating storage/caching logic, writing backend tests, or understanding backend architecture. Covers .NET 9 API, pipeline behaviors, state machines, and multi-device orchestration.
TeensyROM Angular 19 frontend domain knowledge — Clean Architecture, Nx monorepo, NgRx Signal Store, component patterns, testing standards, and coding conventions. Use when working on Angular components, stores, services, infrastructure, features, UI components, writing frontend tests, or understanding frontend architecture. Covers dependency injection, layer boundaries, ESLint enforcement, and modern Angular patterns.
Create custom GitHub Copilot agents (.agent.md files) with interactive configuration. Use when asked to "create an agent", "make an agent", "new agent", "scaffold an agent", "build a custom agent", or when building specialized AI personas for VS Code. Guides users through every frontmatter option with ask_questions tool, then generates a complete .agent.md file.
Executes a pre-planned subagent orchestration project by handing off tasks to specialized worker agents, monitoring reports, and adapting the plan. Use when asked to "execute a plan", "run subagents", "start execution", "hand off tasks", or when given a project name to execute against an existing docs/projects/<PROJECT-NAME>/ plan folder.
| name | run-unit-tests |
| description | Run all unit and integration tests and generate a comprehensive baseline report |
| user-invocable | true |
| disable-model-invocation | true |
Execute all unit tests and integration tests across the workspace and generate a comprehensive baseline report for tracking test health.
Execute unit tests across all projects (excluding E2E):
pnpm exec nx run-many --target=vite:test --exclude=teensyrom-ui-e2e 2>&1
Capture from output:
Execute infrastructure integration tests:
pnpm nx run infrastructure:test:integration 2>&1
Capture from output:
Check for any compilation or lint errors that might indicate test infrastructure issues (e.g. pnpm nx run-many --target=lint or the workspace's TypeScript check).
Generate a comprehensive markdown report with the following structure:
# Test Baseline Report
**Date**: [Current Date]
**Generated By**: Test Technician 🔧
**Scope**: All unit tests + integration tests in workspace (excluding E2E)
---
## Executive Summary
| Metric | Count |
|--------|-------|
| **Total Test Files** | [count] |
| **Passing Test Suites** | [count] |
| **Failing Test Suites** | [count] |
| **Total Tests Passing** | [count] |
| **Total Tests Failing** | [count] |
| **Tests Skipped** | [count and reason] |
| **Projects with Issues** | [count] |
### Projects Analyzed
| Project | Status | Tests Passed | Tests Failed | Notes |
|---------|--------|--------------|--------------|-------|
| [project-name] | ✅ Pass / ❌ FAIL | [count] | [count] | [notes] |
...
---
## Integration Test Summary
**Command**: `pnpm nx run infrastructure:test:integration`
| Test File | Status | Passed | Failed | Skipped | Notes |
|-----------|--------|--------|--------|---------|-------|
| [file.spec.ts] | ✅ Pass / ❌ FAIL / ⏭️ Skip | [n] | [n] | [n] | [notes] |
...
**Totals**: [summary counts]
---
## Failure Categories
Group failures into categories:
### Category N: [Category Name]
**Priority**: 🔴 High / 🟠 Medium-High / 🟡 Medium
**Affected Tests**: [count] tests across [count] files
[Description of the category]
---
## Detailed Failure Analysis
For each failing test or test suite:
### [Test Suite / Component Name]
**File**: `[file path]`
**Test**: `[test name]`
**Error**:
[Error message and relevant stack trace]
**Root Cause**: [Analysis of why the test fails]
**Recommended Fix**:
```typescript
[Code snippet showing the fix]
Files to Modify:
[file path]Document any warnings that appear but don't cause test failures:
Affected Files: [list] Warning: [message] Impact: [description - tests pass despite warning] Recommended Fix (Nice-to-have): [optional fix]
| Issue | Files | Effort | Fix Type |
|---|---|---|---|
| [issue] | [count] | [time] | [type] |
| Issue | Files | Effort | Fix Type |
|---|
| Issue | Files | Effort | Fix Type |
|---|
[file path] - [issue summary]
...[file path] - [issue summary]
...Phase 1 - [Name] ([time])
Phase 2 - [Name] ([time])
Total Estimated Time: [estimate]
After repairs, run the following to verify:
# Unit tests
pnpm exec nx run-many --target=vite:test --exclude=teensyrom-ui-e2e
# Integration tests
pnpm nx run infrastructure:test:integration
# Full validation
pnpm exec nx run-many --target=vite:test --exclude=teensyrom-ui-e2e; pnpm nx run infrastructure:test:integration
Expected result: All projects should pass with 0 failures.
Report generated by Test Technician 🔧
## Analysis Guidelines
When analyzing test failures, categorize them into these common patterns:
### Common Failure Patterns
1. **Missing DI Providers**
- Look for `NullInjectorError` messages
- Identify the missing injection token
- Document the required provider configuration
2. **Assertion Mismatches**
- Compare expected vs received values
- Check if object shape changed (new properties)
- Recommend `toMatchObject` vs `toEqual` as appropriate
3. **Configuration Issues**
- No test files found (project config)
- Test target misconfiguration
- Environment variable issues
4. **Angular Injection Context Errors**
- `NG0203` errors from `inject()` outside context
- Service instantiation issues
- Recommend `TestBed.inject()` or `runInInjectionContext()`
5. **Environment-Gated Tests**
- Tests skipped due to env var checks
- Live API tests requiring backend
- Document skip reasons and conditions
6. **Async/Timing Issues**
- fakeAsync zone errors
- Unresolved promises
- Missing `flush()` or `tick()` calls
### Priority Classification
- 🔴 **High**: Blocks CI, prevents merge
- 🟠 **Medium-High**: Tests fail but don't block
- 🟡 **Medium**: Configuration issues, skipped tests
- 🟢 **Low**: Warnings, nice-to-have improvements
## Reference Documentation
- [Test Repair Master Plan](../../../docs/projects/TEST-REPAIR/TEST-REPAIR-MASTER-PLAN.md) - Previous repair project reference
## Notes
- Run tests with `2>&1` to capture both stdout and stderr
- Parse Nx output carefully - cached results show differently than fresh runs
- Integration tests may have intentional skips for live API tests
- Check for polyfill warnings (ResizeObserver, MediaDevices) as quality indicators