Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill testing-advanced명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | testing-advanced |
| description | | Use when this capability is needed. |
E2E, property-based, mutation, and CI/CD testing patterns.
npx playwright test # Run all
npx playwright test --ui # UI mode
npx playwright test --debug # Debug mode
npx playwright codegen # Generate tests
// pages/LoginPage.ts
export class LoginPage {
constructor(private page: Page) {}
async login(email: string, password: string) {
await this.page.fill('[data-testid="email"]', email);
await this.page.fill('[data-testid="password"]', password);
await this.page.click('[data-testid="submit"]');
}
async expectLoggedIn() {
await expect(this.page).toHaveURL('/dashboard');
}
}
// tests/auth.spec.ts
test('should login successfully', async ({ page }) => {
const loginPage = new LoginPage(page);
await page.goto('/login');
await loginPage.login('user@test.com', 'password');
await loginPage.expectLoggedIn();
});
test('should match screenshot', async ({ page }) => {
await page.goto('/dashboard');
await expect(page).toHaveScreenshot('dashboard.png', {
maxDiffPixels: 100,
});
});
// cypress.config.ts
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
supportFile: 'cypress/support/e2e.ts',
specPattern: 'cypress/e2e/**/*.cy.ts',
},
retries: { runMode: 2, openMode: 0 },
});
import fc from 'fast-check';
describe('string operations', () => {
it('reverse(reverse(s)) === s', () => {
fc.assert(
fc.property(fc.string(), (s) => {
return reverse(reverse(s)) === s;
})
);
});
it('sort is idempotent', () => {
fc.assert(
fc.property(fc.array(fc.integer()), (arr) => {
const sorted = sort(arr);
return JSON.stringify(sort(sorted)) === JSON.stringify(sorted);
})
);
});
});
// stryker.conf.json
{
"mutate": ["src/**/*.ts", "!src/**/*.spec.ts"],
"testRunner": "jest",
"reporters": ["html", "clear-text"],
"thresholds": { "high": 80, "low": 60, "break": 50 }
}
npx stryker run
// Consumer test
const provider = new Pact({
consumer: 'FrontendApp',
provider: 'UserService',
});
describe('User API', () => {
beforeAll(() => provider.setup());
afterAll(() => provider.finalize());
it('should get user', async () => {
await provider.addInteraction({
state: 'user exists',
uponReceiving: 'get user request',
withRequest: { method: 'GET', path: '/users/1' },
willRespondWith: {
status: 200,
body: { id: 1, name: 'John' },
},
});
const user = await getUser(1);
expect(user.name).toBe('John');
});
});
# .github/workflows/test.yml
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: npm ci
- run: npm run test:cov
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage/lcov.info
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- run: npx playwright
// Retry configuration
test.describe.configure({ retries: 2 });
// Wait for stability
await expect(element).toBeVisible({ timeout: 10000 });
// Avoid timing issues
await page.waitForLoadState('networkidle');
| Gate | Requirement |
|---|---|
| G3 | E2E critical paths verified |
| G4 | Contract tests pass |
| G5 | Production smoke tests |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.