Skip to content
Back to skills

Testing

ASecurity

Provides testing best practices for writing reliable, maintainable test suites.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 6, 2026
ai-agentsjavascripttypescriptpythonjavareacttestingapidatabaseci/cdperformance

Works with

  • api

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add nxtg-ai/forge-plugin --skill testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nxtg-ai-testing/badge)](https://www.skillsdirectory.com/skills/nxtg-ai-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Testing
description: Provides testing best practices for writing reliable, maintainable test suites.
---

# Testing Excellence Skill

Comprehensive testing strategies and implementation.

## Testing Philosophy

### Test Types and Coverage
- **Unit Tests (70%)**: Test individual functions/methods
- **Integration Tests (20%)**: Test component interactions
- **E2E Tests (10%)**: Test complete user workflows

### Test Characteristics
- **Fast**: Milliseconds, not seconds
- **Reliable**: No flaky tests
- **Isolated**: Tests don't affect each other
- **Descriptive**: Clear test names
- **Maintainable**: Easy to update

## Testing Strategies

### Test-Driven Development (TDD)
1. Write failing test
2. Write minimal code to pass
3. Refactor for clarity
4. Repeat

### Behavior-Driven Development (BDD)
- Given-When-Then format
- Focus on user behavior
- Living documentation
- Stakeholder collaboration

### Property-Based Testing
- Generate random inputs
- Test invariants
- Find edge cases automatically
- Increase confidence

## Implementation Patterns

### Unit Testing
```javascript
describe('Calculator', () => {
  describe('add', () => {
    it('should return sum of two numbers', () => {
      expect(add(2, 3)).toBe(5);
    });

    it('should handle negative numbers', () => {
      expect(add(-1, 1)).toBe(0);
    });
  });
});
```

### Integration Testing
- Test API endpoints
- Test database operations
- Test service interactions
- Use test databases
- Clean up after tests

### E2E Testing
- Test critical user paths
- Use page objects pattern
- Run in CI/CD pipeline
- Screenshot on failure
- Parallel execution

## Testing Tools

### JavaScript/TypeScript
- Jest for unit/integration
- Cypress for E2E
- Testing Library for React
- Supertest for APIs

### Python
- pytest for unit/integration
- Selenium for E2E
- unittest.mock for mocking
- hypothesis for property-based

### Performance Testing
- Load testing with k6
- Stress testing strategies
- Memory leak detection
- Profiling tools

## Best Practices

1. **Test Pyramid**: More unit tests, fewer E2E
2. **Test Data**: Use factories, not fixtures
3. **Mocking**: Mock external dependencies
4. **Coverage**: Aim for 80%+ on critical paths
5. **CI/CD**: Run tests on every commit

Tests are your safety net.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…