From qe-framework
Generates test files, mocking strategies, and coverage analysis; designs test architectures and produces test plans and defect reports across functional, performance, and security testing disciplines.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qe-framework:Qtest-masterThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive testing specialist ensuring software quality through functional, performance, and security testing.
Comprehensive testing specialist ensuring software quality through functional, performance, and security testing.
A minimal Jest unit test illustrating the key patterns this skill enforces:
// ✅ Good: meaningful description, specific assertion, isolated dependency
describe('calculateDiscount', () => {
it('applies 10% discount for premium users', () => {
const result = calculateDiscount({ price: 100, userTier: 'premium' });
expect(result).toBe(90); // specific outcome, not just truthy
});
it('throws on negative price', () => {
expect(() => calculateDiscount({ price: -1, userTier: 'standard' }))
.toThrow('Price must be non-negative');
});
});
Apply the same structure for pytest (def test_…, assert result == expected) and other frameworks.
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Unit Testing | references/unit-testing.md | Jest, Vitest, pytest patterns |
| Integration | references/integration-testing.md | API testing, Supertest |
| E2E | references/e2e-testing.md | E2E strategy, user flows |
| Performance | references/performance-testing.md | k6, load testing |
| Security | references/security-testing.md | Security test checklist |
| Reports | references/test-reports.md | Report templates, findings |
| QA Methodology | references/qa-methodology.md | Manual testing, quality advocacy, shift-left, continuous testing |
| Automation | references/automation-frameworks.md | Framework patterns, scaling, maintenance, team enablement |
| TDD Iron Laws | references/tdd-iron-laws.md | TDD methodology, test-first development, red-green-refactor |
| Testing Anti-Patterns | references/testing-anti-patterns.md | Test review, mock issues, test quality problems |
MUST DO
it('…') descriptions that read as plain-English specificationsexpect(result).toBe(90)), not just truthinessMUST NOT
// ✅ Clear, readable test with separated phases
describe('PaymentProcessor', () => {
it('calculates total with tax correctly', () => {
// Arrange
const processor = new PaymentProcessor({ taxRate: 0.1 });
const items = [{ price: 100 }, { price: 50 }];
// Act
const total = processor.calculate(items);
// Assert
expect(total).toBe(165); // 150 + 15% tax
});
});
// ✅ Proper async/await with error assertions
describe('UserService', () => {
it('rejects with 404 when user does not exist', async () => {
const service = new UserService();
await expect(service.fetchUser(999)).rejects.toThrow('User not found');
});
});
// ✅ Reusable test data and setup
const userFixture = { id: 1, name: 'Alice', role: 'admin' };
describe('AuthService', () => {
it('grants access for admin users', () => {
expect(canAccess(userFixture, 'DELETE_USERS')).toBe(true);
});
});
Every test file should include JSDoc header documenting test scope:
/**
* Unit tests for UserService authentication methods.
*
* Coverage:
* - login() with valid/invalid credentials
* - logout() session cleanup
* - refreshToken() expiration handling
*
* Security: Tests verify password hashing, no plaintext storage.
* Performance: All mocked — no real API calls.
*/
Run the following in CI:
# Jest config
jest --coverage --collectCoverageFrom="src/**/*.js" --coveragePathIgnorePatterns="node_modules"
# ESLint + jest plugin
eslint "**/*.test.js" --ext .js --plugin jest
# Coverage thresholds in jest.config.js
coverageThreshold: {
global: { branches: 80, functions: 80, lines: 80, statements: 80 }
}
[email protected])console.log() statements| Anti-Pattern | Wrong | Correct |
|---|---|---|
| Test Implementation, Not Behavior | expect(getUserCalls).toBe(1) (mocking internals) | expect(result).toBe(expectedUser) (assert outcome) |
| Flaky Tests | await wait(500); expect(...) (arbitrary sleep) | await screen.findByText('Loaded') (wait for state) |
| No Assertions | test('user exists', () => { getUser(1); }) | test('user exists', () => { expect(getUser(1)).toBeDefined(); }) |
| Testing Private Methods | expect(obj._privateMethod()).toBe(...) | Only test public interface; internal changes shouldn't break tests |
| Copy-Paste Tests | Identical describe blocks with 1 value changed | Use parametrized tests: describe.each(testCases)(...) |
When creating test plans, provide:
npx claudepluginhub inho-team/qe-framework --plugin qe-frameworkCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.