๐ QA Cheatsheets
Goal: fast, dense reference cards you can glance at (or put on screen while recording). No fluff โ the things you look up mid-task. Inspired by educative.io/cheatsheets, tuned for QA.
๐ HTTP status codes
| Code | Meaning | QA note |
|---|---|---|
| 200 OK / 201 Created / 204 No Content | Success family | 201 for POST-create; 204 for delete/no-body |
| 301/302 Moved / Found | Redirects | Check the target and that itโs HTTPS |
| 400 Bad Request | Client sent something invalid | Expected for missing/invalid fields |
| 401 Unauthorized | Not authenticated | Missing/expired/bad token |
| 403 Forbidden | Authenticated, not allowed | The IDOR/authz test target |
| 404 Not Found | No such resource | Someone elseโs id should be 403/404 โ not 200 |
| 409 Conflict | State clash | Double-submit, version conflict |
| 422 Unprocessable | Validation failed | Well-formed but semantically wrong |
| 429 Too Many Requests | Rate limited | Test login/OTP brute-force protection |
| 500/502/503 Server errors | Server broke | 500 where 400 belongs = unvalidated input reached the server |
๐ Demo live: httpbingo.org/status/404 returns any code on demand ยท http.cat for a memorable visual.
๐งช Test design techniques
| Technique | Use when | Example |
|---|---|---|
| Equivalence Partitioning | Grouped inputs | age 18โ60 โ one valid + one each invalid side |
| Boundary Value Analysis | Ranges/limits | test 17,18,19 and 59,60,61 |
| Decision Table | Combined rules | free shipping if (โฅ$50 AND member) OR coupon |
| State Transition | State machines | account lockout after 3 fails |
| Pairwise | Config explosion | 3ร3ร2 combos โ ~9 pairs |
| Error Guessing | Experience | emoji, <script>, double-click, 0-byte file |
๐ Severity vs Priority
| ย | High priority | Low priority |
|---|---|---|
| High severity | Payment charges twice | Crash in a yearly-use legacy report |
| Low severity | CEOโs name misspelled on homepage | Tooltip typo in settings |
Severity = impact (QA owns). Priority = fix order (product owns, you advise).
๐ญ Playwright quick reference
npm init playwright@latest # scaffold
npx playwright test # run all
npx playwright test --headed # watch it run
npx playwright test --ui # interactive UI mode
npx playwright codegen <url> # record a test
npx playwright show-trace trace.zip# debug a failure
await page.goto('/login');
await page.getByLabel('Email').fill('me@x.com');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByText(/welcome/i)).toBeVisible();
await expect(page).toHaveURL(/dashboard/);
Locator priority: getByRole > getByLabel/Text > getByTestId > CSS > (avoid) positional XPath.
๐ Docs live: playwright.dev
๐ Postman assertions (Tests tab)
pm.test("status 200", () => pm.response.to.have.status(200));
pm.test("has id", () => pm.expect(pm.response.json().id).to.be.a("number"));
pm.test("fast", () => pm.expect(pm.response.responseTime).to.be.below(800));
pm.test("schema", () => pm.response.to.have.jsonSchema(schema));
newman run collection.json -e staging.json # run in CI
๐ Practice live: reqres.in ยท restful-booker ยท Postman Echo
๐๏ธ SQL for QA (the 5 that cover 90%)
SELECT * FROM orders WHERE id = 8812; -- did it persist?
SELECT COUNT(*) FROM orders WHERE user_id=42 AND status='shipped';
SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*)>1; -- dupes
SELECT o.id FROM orders o LEFT JOIN invoices i ON i.order_id=o.id
WHERE o.status='paid' AND i.id IS NULL; -- cross-table gaps
SELECT * FROM audit_log WHERE entity_id=8812 ORDER BY created_at DESC LIMIT 20;
Read-only on staging. Never write. ๐ Practice live: SQLBolt ยท DB Fiddle
โก k6 performance
export const options = {
stages: [ {duration:'2m',target:200}, {duration:'5m',target:200}, {duration:'2m',target:0} ],
thresholds: { http_req_duration:['p(95)<500'], http_req_failed:['rate<0.01'] },
};
k6 run script.js
| Test | Shape | |โ|โ| | Load | ramp โ hold โ down | | Stress | ramp past breaking point | | Spike | sudden jump โ drop | | Soak | moderate, held for hours | ๐ Practice live: test.k6.io ยท docs: grafana.com/docs/k6
๐ OWASP Top 10 (QA lens)
| Risk | Quick manual test |
|โ|โ|
| Broken Access Control | Change resource id / role in the request (IDOR) |
| Injection | ' OR '1'='1' --, <script>alert(1)</script> |
| Crypto Failures | HTTPS everywhere? tokens/PII in URLs/logs? |
| Security Misconfig | Stack traces shown? default creds? |
| Auth Failures | Lockout? session invalidated on logout? |
๐ Practice live: OWASP Juice Shop ยท learn: PortSwigger Academy
๐ง AI ร QA quick start
claude mcp add playwright -- npx @playwright/mcp@latest # AI drives a real browser
- Prompt for test ideas: โAct as a senior QA โ what conditions am I missing? Focus on boundaries, states, concurrency.โ
- Eval tools: promptfoo ยท DeepEval
- Rule: AI drafts, you decide. Always verify.
๐ ๏ธ Handy dev/QA utilities (bookmark these)
| Need | Site |
|---|---|
| Fake REST API | jsonplaceholder.typicode.com |
| Inspect your request | httpbingo.org |
| Test regex | regex101.com |
| Decode a JWT | jwt.io |
| Validate/format JSON | jsonlint.com |
| Explain a cron expression | crontab.guru |
| Catch test emails | Mailinator ยท Mailtrap |
| Cross-browser/device cloud | BrowserStack |
โ Back to the roadmap ยท Next โ Teaching Kit & Demo Sites