testing-guide
CommunityMaster testing for robust, regression-free code.
Software Engineering#testing#tdd#quality assurance#software development#pytest#regression#progression#coverage
Authorakaszubski
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Inadequate testing leads to bugs, regressions, and a lack of confidence in code changes. This Skill provides a complete testing methodology, covering Test-Driven Development (TDD), progression tracking, and regression prevention, ensuring your codebase remains high-quality and stable.
Core Features & Use Cases
- TDD Workflow: Guides through the Red-Green-Refactor cycle for new features and refactoring, emphasizing writing tests before code.
- Progression Testing: Methodology for tracking key metrics (e.g., accuracy, loss, speed) over time, automatically detecting performance regressions and celebrating improvements.
- Regression Testing: Best practices for creating dedicated tests to ensure fixed bugs never reappear.
- Use Case: When developing a new training method, you use TDD to write failing unit tests first, then implement the minimum code to pass them. Later, you set up a progression test to monitor the model's accuracy, ensuring future code changes don't degrade performance.
Quick Start
TDD: Write a failing test first
def test_train_lora_succeeds():
result = train_lora(...)
assert result.success is True
Run tests with coverage
pytest --cov=src/realign --cov-report=term-missing tests/
Progression testing: Track metrics over time
If current_accuracy < baseline_value * (1 - TOLERANCE):
pytest.fail("REGRESSION detected!")
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: testing-guide Download link: https://github.com/akaszubski/realign/archive/main.zip#testing-guide Please download this .zip file, extract it, and install it in the .claude/skills/ directory.