test-automator
/test-automator
Pomaga tworzyć i utrzymywać testy automatyczne, pisać testy i zwiększać pokrycie kodu testami.
- Autor
- zhaono1 ↗
- Repozytorium
- agent-playbook ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 25.08.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 8
- Skrypty
- 2
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 25.08.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/coverage_report.py, scripts/generate_test.py
Co robi i kiedy
Pomaga tworzyć i utrzymywać testy automatyczne, pisać testy i zwiększać pokrycie kodu testami.
Oryginalny opis (EN)
Test automation framework expert for creating and maintaining automated tests. Use when user asks to write tests, automate testing, or improve test coverage.
Jak działa
- When This Skill Activates
- Testing Pyramid
- Unit Testing
- Integration Testing
- E2E Testing
- Test Coverage
- Testing Best Practices
- Test Naming Conventions
- Common Testing Frameworks
- Scripts
Podgląd SKILL.md
---
name: test-automator
description: Test automation framework expert for creating and maintaining automated tests. Use when user asks to write tests, automate testing, or improve test coverage.
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
metadata:
hooks:
after_complete:
- trigger: session-logger
mode: auto
reason: "Log test creation"
---
# Test Automator
Expert in creating and maintaining automated tests for various frameworks and languages.
## When This Skill Activates
Activates when you:
- Ask to write tests
- Mention test automation
- Request test coverage improvement
- Need to set up testing framework
## Testing Pyramid
```
/\
/E2E\ - Few, expensive, slow
/------\
/ Integration \ - Moderate number
/--------------\
/ Unit Tests \ - Many, cheap, fast
/------------------\
```
## Unit Testing
### Principles
1. **Test behavior, not implementation**
2. **One assertion per test** (generally)
3. **Arrange-Act-Assert** pattern
4. **Descriptive test names**
### Example (Jest)
```typescript
describe('UserService', () => {
describe('createUser', () => {
it('should create a user with valid data', async () => {
// Arrange
const userData = {
name: 'John Doe',
email: 'john@example.com'
};
// Act
const user = await userService.create(userData);
// Assert
expect(user.id).toBeDefined();
expect(user.email).toBe(userData.email);
});
it('should throw error for invalid email', async () => {
// Arrange
const userData = { email: 'invalid' };
// Act & Assert
await expect(userService.create(userData))
.rejects.toThrow('Invalid email');
});
});
});
```
## Integration Testing
### Principles
1. **Test component interactions**
2. **Use test doubles for external services**
3. **Clean up test data**
4. **Run in isolation**
### Example (Supertest)
```typescript
describe('POST /api/users', () => {
it('should create a user', async () => {
const response = await request(app)
.post('/api/users')
.send({
name: 'John Doe',
email: 'john@example.com'
})
.expect(201)
.expect((res) => {
expect(res.body.id).toBeDefined();
expect(res.body.email).toBe('john@example.com');
});
});
});
```
## E2E Testing
### Principles
1. **Test critical user flows**
2. **Use realistic test data**
3. **Handle async operations properly**
4. **Clean up after tests**
### Example (Playwright)
```typescript
test('user can login', async ({ page }) => {
await page.goto('/login');
await page.fill('[name="email"]', 'user@example.com');
await page.fill('[name="password"]', 'password123');
await page.click('button[type="submit"]');
await expect(page).toHaveURL('/dashboard');
await expect(page.locator('h1')).toContainText('Welcome');
});
```
## Test Coverage
### Coverage Goals
| Type | Target |
|------|--------|
| Lines | > 80% |
| Branches | > 75% |
| Functions | > 80% |
| Statements | > 80% |
### Coverage Reports
```bash
# Jest
npm test -- --coverage
# Python (pytest-cov)
pytest --cov=src --cov-report=html
# Go
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
```
## Testing Best Practices
### DO's
- Write tests before fixing bugs (TDD)
- Test edge cases
- Keep tests independent
- Use descriptive test names
- Mock external dependencies
- Clean up test data
### DON'Ts
- Don't test implementation details
- Don't write brittle tests
- Don't skip tests without a reason
- Don't commit commented-out tests
- Don't test third-party libraries
## Test Naming Conventions
```typescript
// Good: Describes what is being tested
it('should reject invalid email addresses')
// Good: Describes the scenario and outcome
it('returns 401 when user provides invalid credentials')
// Bad: Vague
it('works correctly')
```
## Common Testing Frameworks
| Language | Framework | Command |
|----------|-----------|---------|
| TypeScript/JS | Jest, Vitest | `npm test` |
| Python | pytest | `pytest` |
| Go | testing | `go test` |
| Java | JUnit | `mvn test` |
| Rust | built-in | `cargo test` |
## Scripts
Generate test boilerplate:
```bash
python3 scripts/generate_test.py --name <feature> --output tests/test-plan.md
```
Check test coverage:
```bash
python3 scripts/coverage_report.py --name <service-name> --output coverage-report.md
```
## References
- `references/best-practices.md` - Testing best practices
- `references/examples/` - Framework-specific examples
- `references/mocking.md` - Mocking guidelines
Pliki w paczce (8)
- README.md 1 KB
- SKILL.md 5 KB
- references/best-practices.md 1 KB
- references/mocking.md 1 KB
- references/examples/README.md 1 KB
- references/examples/unit-test-example.md 1 KB
- scripts/coverage_report.py 2 KB
- scripts/generate_test.py 2 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · zhaono1/agent-playbook | 100 | MIT |
| rmyndharis/antigravity-skills | 100 | MIT |
| agentic-swe/agentic-swe | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 9b04370511d0 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 4 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100s2-unit-test
Podpowiada, jak pisać i utrzymywać testy jednostkowe w projekcie S2, aby zmiany w kodzie miały odpowiednie pokrycie testami. - 100write-tests
Pisze, aktualizuje i naprawia testy automatyczne dla istniejącego kodu: pokrycie, testy niestabilne i regresje, niezależnie od języka. - 100property-based-testing
Pomaga pisać, przeglądać i zmieniać testy oparte na własnościach, na przykład z fast-check, oraz zwiększać pokrycie testami. - 100writing-tests
Pomaga tworzyć, edytować i przeglądać testy automatyczne oraz ich fixtury w projekcie. - 100automate
Zamienia przypadki testowe ręczne w testy automatyczne w Playwright lub pytest i buduje ramy testów. - 100qa
Generuje testy jednostkowe i E2E, analizuje pokrycie kodu, konfiguruje Playwright i Jest oraz poprawia jakość istniejących testów.