
Testing Quality
- 19 installs
- 4 repo stars
- Updated January 5, 2026
- pluginagentmarketplace/custom-plugin-data-engineer
Helps with testing & qa tasks.
About
testing-quality is a Claude Code skill for testing & qa. It helps solo builders move faster with AI-assisted development.
- testing-quality
- Testing & QA
- AI-coding skill
Testing Quality by the numbers
- 19 all-time installs (skills.sh)
- Ranked #1,445 of 2,153 Testing & QA skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-data-engineer --skill testing-qualityAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 19 |
|---|---|
| repo stars | ★ 4 |
| Last updated | January 5, 2026 |
| Repository | pluginagentmarketplace/custom-plugin-data-engineer ↗ |
What it does
Helps with testing & qa tasks.
Files
Testing & Data Quality
Production testing strategies with pytest, data validation, and quality frameworks.
Quick Start
import pytest
from unittest.mock import Mock, patch
import pandas as pd
# Fixtures for test data
@pytest.fixture
def sample_dataframe():
return pd.DataFrame({
"id": [1, 2, 3],
"name": ["Alice", "Bob", "Charlie"],
"amount": [100.0, 200.0, 300.0]
})
@pytest.fixture
def mock_database():
with patch("app.db.connection") as mock:
mock.query.return_value = [{"id": 1, "value": 100}]
yield mock
# Unit test with AAA pattern
class TestDataTransformer:
def test_calculates_total_correctly(self, sample_dataframe):
# Arrange
transformer = DataTransformer()
# Act
result = transformer.calculate_total(sample_dataframe)
# Assert
assert result == 600.0
def test_handles_empty_dataframe(self):
# Arrange
empty_df = pd.DataFrame()
transformer = DataTransformer()
# Act & Assert
with pytest.raises(ValueError, match="Empty dataframe"):
transformer.calculate_total(empty_df)
@pytest.mark.parametrize("input_val,expected", [
(100, 110),
(0, 0),
(-50, -55),
])
def test_apply_tax(self, input_val, expected):
result = apply_tax(input_val, rate=0.10)
assert result == expectedCore Concepts
1. Data Validation with Pydantic
from pydantic import BaseModel, Field, field_validator
from datetime import datetime
from typing import Optional
class DataRecord(BaseModel):
id: str = Field(..., min_length=1)
amount: float = Field(..., ge=0)
timestamp: datetime
category: Optional[str] = None
@field_validator("id")
@classmethod
def validate_id_format(cls, v):
if not v.startswith("REC-"):
raise ValueError("ID must start with 'REC-'")
return v
@field_validator("amount")
@classmethod
def round_amount(cls, v):
return round(v, 2)
# Validation
def process_records(raw_data: list[dict]) -> list[DataRecord]:
valid_records = []
for item in raw_data:
try:
record = DataRecord(**item)
valid_records.append(record)
except ValidationError as e:
logger.warning(f"Invalid record: {e}")
return valid_records2. Great Expectations
import great_expectations as gx
from great_expectations.checkpoint import Checkpoint
# Initialize context
context = gx.get_context()
# Create expectations
validator = context.sources.pandas_default.read_csv("data/orders.csv")
# Column expectations
validator.expect_column_to_exist("order_id")
validator.expect_column_values_to_not_be_null("order_id")
validator.expect_column_values_to_be_unique("order_id")
# Value expectations
validator.expect_column_values_to_be_between("amount", min_value=0, max_value=10000)
validator.expect_column_values_to_be_in_set("status", ["pending", "completed", "cancelled"])
# Pattern matching
validator.expect_column_values_to_match_regex("email", r"^[\w\.-]+@[\w\.-]+\.\w+$")
# Run validation
results = validator.validate()
if not results.success:
failed_expectations = [r for r in results.results if not r.success]
raise DataQualityError(f"Validation failed: {failed_expectations}")3. Integration Testing
import pytest
from testcontainers.postgres import PostgresContainer
from sqlalchemy import create_engine
@pytest.fixture(scope="module")
def postgres_container():
"""Spin up real Postgres for integration tests."""
with PostgresContainer("postgres:16-alpine") as postgres:
yield postgres
@pytest.fixture
def db_engine(postgres_container):
"""Create engine with test database."""
engine = create_engine(postgres_container.get_connection_url())
# Setup schema
with engine.connect() as conn:
conn.execute(text("CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT)"))
conn.commit()
yield engine
# Cleanup
engine.dispose()
class TestDatabaseOperations:
def test_insert_and_query(self, db_engine):
# Arrange
repo = UserRepository(db_engine)
# Act
repo.insert(User(name="Test User"))
users = repo.get_all()
# Assert
assert len(users) == 1
assert users[0].name == "Test User"
def test_transaction_rollback(self, db_engine):
repo = UserRepository(db_engine)
with pytest.raises(IntegrityError):
repo.insert(User(name=None)) # Violates constraint
# Verify rollback
assert repo.count() == 04. Mocking External Services
from unittest.mock import Mock, patch, MagicMock
import responses
class TestAPIClient:
@responses.activate
def test_fetch_data_success(self):
# Mock HTTP response
responses.add(
responses.GET,
"https://api.example.com/data",
json={"items": [{"id": 1}]},
status=200
)
client = APIClient()
result = client.fetch_data()
assert len(result["items"]) == 1
@responses.activate
def test_handles_api_error(self):
responses.add(
responses.GET,
"https://api.example.com/data",
json={"error": "Server error"},
status=500
)
client = APIClient()
with pytest.raises(APIError):
client.fetch_data()
@patch("app.services.external_api")
def test_with_mock_service(self, mock_api):
mock_api.get_user.return_value = {"id": 1, "name": "Test"}
result = process_user_data(user_id=1)
mock_api.get_user.assert_called_once_with(1)
assert result["name"] == "Test"Tools & Technologies
| Tool | Purpose | Version (2025) |
|---|---|---|
| pytest | Testing framework | 8.0+ |
| Great Expectations | Data validation | 0.18+ |
| Pydantic | Data validation | 2.5+ |
| pytest-cov | Code coverage | 4.1+ |
| testcontainers | Integration testing | 3.7+ |
| responses | HTTP mocking | 0.25+ |
| hypothesis | Property-based testing | 6.98+ |
Troubleshooting Guide
| Issue | Symptoms | Root Cause | Fix |
|---|---|---|---|
| Flaky Tests | Random failures | Shared state, timing | Isolate tests, use fixtures |
| Slow Tests | Long test runs | No mocking, real I/O | Mock external services |
| Low Coverage | Uncovered code | Missing edge cases | Add parametrized tests |
| Test Data Issues | Inconsistent results | Hardcoded data | Use factories/fixtures |
Best Practices
# ✅ DO: Use fixtures for setup
@pytest.fixture
def client():
return TestClient(app)
# ✅ DO: Test edge cases
@pytest.mark.parametrize("input_data", [None, [], {}, ""])
def test_handles_empty_input(input_data):
assert process(input_data) == default_result
# ✅ DO: Name tests descriptively
def test_user_creation_fails_with_invalid_email():
...
# ✅ DO: Use marks for slow tests
@pytest.mark.slow
def test_full_pipeline():
...
# ❌ DON'T: Test implementation details
# ❌ DON'T: Share state between tests
# ❌ DON'T: Skip error path testingResources
---
Skill Certification Checklist:
- [ ] Can write unit tests with pytest
- [ ] Can use fixtures and parametrization
- [ ] Can implement data validation
- [ ] Can write integration tests
- [ ] Can mock external dependencies
# testing-quality Configuration
# Category: testing
# Generated: 2025-12-30
skill:
name: testing-quality
version: "1.0.0"
category: testing
settings:
# Default settings for testing-quality
enabled: true
log_level: info
# Category-specific defaults
validation:
strict_mode: false
auto_fix: false
output:
format: markdown
include_examples: true
# Environment-specific overrides
environments:
development:
log_level: debug
validation:
strict_mode: false
production:
log_level: warn
validation:
strict_mode: true
# Integration settings
integrations:
# Enable/disable integrations
git: true
linter: true
formatter: true
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "testing-quality Configuration Schema",
"type": "object",
"properties": {
"skill": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"category": {
"type": "string",
"enum": [
"api",
"testing",
"devops",
"security",
"database",
"frontend",
"algorithms",
"machine-learning",
"cloud",
"containers",
"general"
]
}
},
"required": [
"name",
"version"
]
},
"settings": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": true
},
"log_level": {
"type": "string",
"enum": [
"debug",
"info",
"warn",
"error"
]
}
}
}
},
"required": [
"skill"
]
}Testing Quality Guide
Overview
This guide provides comprehensive documentation for the testing-quality skill in the custom-plugin-data-engineer plugin.
Category: Testing
Quick Start
Prerequisites
- Familiarity with testing concepts
- Development environment set up
- Plugin installed and configured
Basic Usage
# Invoke the skill
claude "testing-quality - [your task description]"
# Example
claude "testing-quality - analyze the current implementation"Core Concepts
Key Principles
1. Consistency - Follow established patterns 2. Clarity - Write readable, maintainable code 3. Quality - Validate before deployment
Best Practices
- Always validate input data
- Handle edge cases explicitly
- Document your decisions
- Write tests for critical paths
Common Tasks
Task 1: Basic Implementation
# Example implementation pattern
def implement_testing_quality(input_data):
"""
Implement testing-quality functionality.
Args:
input_data: Input to process
Returns:
Processed result
"""
# Validate input
if not input_data:
raise ValueError("Input required")
# Process
result = process(input_data)
# Return
return resultTask 2: Advanced Usage
For advanced scenarios, consider:
- Configuration customization via
assets/config.yaml - Validation using
scripts/validate.py - Integration with other skills
Troubleshooting
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| Skill not found | Not installed | Run plugin sync |
| Validation fails | Invalid config | Check config.yaml |
| Unexpected output | Missing context | Provide more details |
Related Resources
- SKILL.md - Skill specification
- config.yaml - Configuration options
- validate.py - Validation script
---
Last updated: 2025-12-30
Testing Quality Patterns
Design Patterns
Pattern 1: Input Validation
Always validate input before processing:
def validate_input(data):
if data is None:
raise ValueError("Data cannot be None")
if not isinstance(data, dict):
raise TypeError("Data must be a dictionary")
return TruePattern 2: Error Handling
Use consistent error handling:
try:
result = risky_operation()
except SpecificError as e:
logger.error(f"Operation failed: {e}")
handle_error(e)
except Exception as e:
logger.exception("Unexpected error")
raisePattern 3: Configuration Loading
Load and validate configuration:
import yaml
def load_config(config_path):
with open(config_path) as f:
config = yaml.safe_load(f)
validate_config(config)
return configAnti-Patterns to Avoid
❌ Don't: Swallow Exceptions
# BAD
try:
do_something()
except:
pass✅ Do: Handle Explicitly
# GOOD
try:
do_something()
except SpecificError as e:
logger.warning(f"Expected error: {e}")
return default_valueCategory-Specific Patterns: Testing
Recommended Approach
1. Start with the simplest implementation 2. Add complexity only when needed 3. Test each addition 4. Document decisions
Common Integration Points
- Configuration:
assets/config.yaml - Validation:
scripts/validate.py - Documentation:
references/GUIDE.md
---
Pattern library for testing-quality skill
#!/usr/bin/env python3
"""
Validation script for testing-quality skill.
Category: testing
"""
import os
import sys
import yaml
import json
from pathlib import Path
def validate_config(config_path: str) -> dict:
"""
Validate skill configuration file.
Args:
config_path: Path to config.yaml
Returns:
dict: Validation result with 'valid' and 'errors' keys
"""
errors = []
if not os.path.exists(config_path):
return {"valid": False, "errors": ["Config file not found"]}
try:
with open(config_path, 'r') as f:
config = yaml.safe_load(f)
except yaml.YAMLError as e:
return {"valid": False, "errors": [f"YAML parse error: {e}"]}
# Validate required fields
if 'skill' not in config:
errors.append("Missing 'skill' section")
else:
if 'name' not in config['skill']:
errors.append("Missing skill.name")
if 'version' not in config['skill']:
errors.append("Missing skill.version")
# Validate settings
if 'settings' in config:
settings = config['settings']
if 'log_level' in settings:
valid_levels = ['debug', 'info', 'warn', 'error']
if settings['log_level'] not in valid_levels:
errors.append(f"Invalid log_level: {settings['log_level']}")
return {
"valid": len(errors) == 0,
"errors": errors,
"config": config if not errors else None
}
def validate_skill_structure(skill_path: str) -> dict:
"""
Validate skill directory structure.
Args:
skill_path: Path to skill directory
Returns:
dict: Structure validation result
"""
required_dirs = ['assets', 'scripts', 'references']
required_files = ['SKILL.md']
errors = []
# Check required files
for file in required_files:
if not os.path.exists(os.path.join(skill_path, file)):
errors.append(f"Missing required file: {file}")
# Check required directories
for dir in required_dirs:
dir_path = os.path.join(skill_path, dir)
if not os.path.isdir(dir_path):
errors.append(f"Missing required directory: {dir}/")
else:
# Check for real content (not just .gitkeep)
files = [f for f in os.listdir(dir_path) if f != '.gitkeep']
if not files:
errors.append(f"Directory {dir}/ has no real content")
return {
"valid": len(errors) == 0,
"errors": errors,
"skill_name": os.path.basename(skill_path)
}
def main():
"""Main validation entry point."""
skill_path = Path(__file__).parent.parent
print(f"Validating testing-quality skill...")
print(f"Path: {skill_path}")
# Validate structure
structure_result = validate_skill_structure(str(skill_path))
print(f"\nStructure validation: {'PASS' if structure_result['valid'] else 'FAIL'}")
if structure_result['errors']:
for error in structure_result['errors']:
print(f" - {error}")
# Validate config
config_path = skill_path / 'assets' / 'config.yaml'
if config_path.exists():
config_result = validate_config(str(config_path))
print(f"\nConfig validation: {'PASS' if config_result['valid'] else 'FAIL'}")
if config_result['errors']:
for error in config_result['errors']:
print(f" - {error}")
else:
print("\nConfig validation: SKIPPED (no config.yaml)")
# Summary
all_valid = structure_result['valid']
print(f"\n==================================================")
print(f"Overall: {'VALID' if all_valid else 'INVALID'}")
return 0 if all_valid else 1
if __name__ == "__main__":
sys.exit(main())