Fatskills
Practice. Master. Repeat.
Study Guide: Technical Writing and Documentation 101: Testing Documentation (Usability Testing, Check‑the‑Code, Peer Review)
Source: https://www.fatskills.com/bvat/chapter/technical-writing-and-documentation-testing-documentation-usability-testing-checkthecode-peer-review

Technical Writing and Documentation 101: Testing Documentation (Usability Testing, Check‑the‑Code, Peer Review)

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~8 min read

Testing Documentation (Usability Testing, Check‑the‑Code, Peer Review)


Testing Documentation: A Practical Study Guide

For aspiring technical writers, developer-writers, and docs teams modernizing their workflows


What This Is

Testing documentation ensures your guides, API references, and tutorials actually work for users—whether they’re developers integrating a payment API (e.g., Stripe’s /charges endpoint docs) or admins setting up a cloud service (e.g., AWS EC2’s "Launch an Instance" guide). Poorly tested docs waste time, frustrate users, and erode trust in your product. For example, if a code sample in your API docs fails because it’s outdated, developers may abandon your tool entirely. Testing includes usability testing (do users succeed?), code validation (do examples run?), and peer review (is the content clear and accurate?).


Key Terms & Tools

  • Usability Testing: Observing real users as they interact with your docs to identify pain points (e.g., "Can a junior dev deploy this app using only our guide?"). Tools: UserTesting, Hotjar, or guerrilla testing (e.g., Slack communities).
  • Check-the-Code (CTC): Validating that code samples, CLI commands, and API calls in your docs execute correctly. Tools: Postman (APIs), VS Code (snippets), or automated scripts (e.g., GitHub Actions).
  • Peer Review: A structured review by other writers, developers, or SMEs (subject-matter experts) to catch errors, jargon, or gaps. Tools: GitHub/GitLab PRs, Google Docs comments, or tools like Reviewable.
  • Docs-as-Code: Managing docs like software—stored in Git, written in Markdown/AsciiDoc, built with static site generators (e.g., Sphinx, Docusaurus), and reviewed via pull requests.
  • OpenAPI (Swagger): A YAML/JSON specification for REST APIs. Tools: Swagger UI (interactive docs), ReDoc (prettier output), or Stoplight (design + docs).
  • Static Site Generators (SSGs): Tools that convert Markdown/AsciiDoc into HTML websites. Examples: Docusaurus (React-based), Hugo (fast), MkDocs (Python-friendly).
  • DITA (Darwin Information Typing Architecture): An XML-based standard for modular, reusable docs. Used in enterprise (e.g., IBM, Cisco). Tools: Oxygen XML Editor, DITA-OT.
  • Linters for Docs: Tools that enforce style and syntax rules. Examples: Vale (style), markdownlint (Markdown), Spectral (OpenAPI files).
  • Continuous Integration (CI) for Docs: Automating builds, tests, and deployments. Tools: GitHub Actions, GitLab CI, or Netlify (for previews).
  • A/B Testing for Docs: Comparing two versions of a page to see which performs better (e.g., "Does a video tutorial reduce support tickets more than a text guide?"). Tools: Google Optimize, LaunchDarkly.
  • Feedback Widgets: Embedded tools to collect user feedback (e.g., "Was this page helpful?"). Examples: Delighted, Canny, or custom solutions (e.g., GitHub Issues).
  • Accessibility Testing: Ensuring docs are usable by people with disabilities (e.g., screen readers, keyboard navigation). Tools: axe DevTools, WAVE, or Pa11y.


Step-by-Step / Process Flow


1. Plan Your Testing Approach

  • For usability testing:
  • Define goals (e.g., "Can a user deploy a container in <10 minutes?").
  • Recruit participants (e.g., 5–10 users from your target audience—junior devs, admins, etc.).
  • Choose a method: Remote (UserTesting) or in-person (guerrilla testing at a meetup).
  • For code validation:
  • List all code samples, CLI commands, and API calls in your docs.
  • Set up a test environment (e.g., a sandbox API, a fresh VM, or a Docker container).
  • For peer review:
  • Identify reviewers (writers, devs, PMs) and assign sections.
  • Use a checklist (e.g., "Is the error message clear? Are prerequisites listed?").

2. Execute Usability Testing

  • Script tasks (e.g., "Sign up for an API key and make your first /payment call").
  • Observe silently (record sessions if remote).
  • Ask follow-up questions (e.g., "What was confusing? What would you change?").
  • Document findings in a spreadsheet (e.g., "3/5 users missed the ‘Enable OAuth’ step").

3. Validate Code and Examples

  • For APIs:
  • Use Postman or curl to test every endpoint in the docs.
  • Check for:
    • Correct HTTP methods (GET vs POST).
    • Required headers (e.g., Authorization: Bearer <token>).
    • Example payloads (e.g., {"amount": 100, "currency": "USD"}).
  • Example:
    bash
    curl -X POST https://api.example.com/payments \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"amount": 100, "currency": "USD"}'
  • For CLI tools:
  • Run commands in a clean environment (e.g., docker run --rm -it ubuntu bash).
  • Check for:
    • Correct flags (e.g., --force vs --dry-run).
    • Error messages (e.g., "Permission denied" should link to a troubleshooting guide).
  • For SDKs:
  • Install the SDK in a fresh virtualenv/container.
  • Run code samples line-by-line (e.g., Python’s pip install -e .).
  • Example (Python):
    python
    import stripe
    stripe.api_key = "sk_test_123"
    payment = stripe.PaymentIntent.create(amount=1000, currency="usd")
    print(payment)

4. Conduct Peer Review

  • For writers:
  • Check for:
    • Clarity (e.g., "Is ‘idempotency key’ defined?").
    • Consistency (e.g., "Do we use ‘user’ or ‘customer’?").
    • Style (e.g., "Are code comments in sentence case?").
  • For developers:
  • Focus on:
    • Accuracy (e.g., "Does this endpoint return a 201 or 200?").
    • Edge cases (e.g., "What happens if the amount is negative?").
  • For SMEs:
  • Validate:
    • Prerequisites (e.g., "Do users need to enable 2FA first?").
    • Security implications (e.g., "Is the API key example a real key?" ⚠️ Never use real keys in docs!).
  • Tools:
  • GitHub PRs: Use CODEOWNERS to auto-assign reviewers.
  • Google Docs: Use suggesting mode for edits.
  • Reviewable: For structured reviews (e.g., "Approve with comments").

5. Automate Where Possible

  • Linters:
  • Run Vale to catch style issues (e.g., passive voice, jargon).
  • Run markdownlint to fix formatting (e.g., inconsistent headers).
  • CI/CD:
  • Set up GitHub Actions to:
    • Build docs on every PR (e.g., npm run build for Docusaurus).
    • Run Spectral to validate OpenAPI files.
    • Deploy a preview (e.g., Netlify) for reviewers.
  • Example GitHub Actions workflow:
    yaml
    name: Docs CI
    on: [push, pull_request]
    jobs:
    test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - run: npm install
    - run: npm run build
    - run: npx spectral lint openapi.yaml
  • Automated code testing:
  • Use GitHub Actions to run code samples in a container.
  • Example (Python):
    ```yaml
    • name: Test Python examples run: |
      python -m pip install -r requirements.txt
      python examples/create_payment.py ```

6. Iterate and Monitor

  • Fix issues from usability tests and reviews.
  • Update docs to reflect changes (e.g., new API versions, deprecated features).
  • Monitor feedback via:
  • Analytics (e.g., Google Analytics for page views, time on page).
  • Feedback widgets (e.g., "Was this helpful?" buttons).
  • Support tickets (e.g., "Are users asking about the same undocumented feature?").


Common Mistakes


Mistake 1: Skipping Usability Testing

  • What happens: You assume users will "figure it out," but they get stuck on step 3.
  • Correction: Test with real users early (even 1–2 people). Example: If 2/5 users fail to set up OAuth, rewrite the guide.

Mistake 2: Not Testing Code Samples

  • What happens: A Python example uses requests==2.25.0, but the latest version is 2.31.0, causing import errors.
  • Correction: Test samples in a clean environment (e.g., docker run python:3.9). Use CI to auto-test on every PR.

Mistake 3: Peer Review = Grammar Check

  • What happens: Reviewers focus on typos but miss that the API endpoint is deprecated.
  • Correction: Use a checklist (e.g., "Is this endpoint still supported? Are error messages documented?").

Mistake 4: Ignoring Edge Cases

  • What happens: Your docs show a happy path (e.g., "Create a user with name: Alice") but don’t cover name: "" (empty string).
  • Correction: Ask devs, "What are the failure modes?" and document them (e.g., "Returns 400 Bad Request if name is empty").

Mistake 5: Over-Relying on Automation

  • What happens: Your CI lints Markdown but doesn’t catch that a tutorial skips a critical step.
  • Correction: Combine automation (linters, CI) with human review (usability testing, peer feedback).


Tech Writing Interview / Portfolio Tips


1. Show Your Testing Process

  • Hiring managers look for: Evidence that you validate docs before publishing.
  • Portfolio tip: Include a case study like:

    "I tested the /payments API docs with 5 developers. 3/5 failed to set up webhooks, so I added a troubleshooting section and a Postman collection. Support tickets dropped by 40%."


  • Interview tip: Describe a time you found a critical error in docs (e.g., "The DELETE /users endpoint was documented as GET").

2. Differentiate Testing Types

  • Tricky distinction: Usability testing (do users succeed?) vs code validation (do examples run?) vs peer review (is the content clear?).
  • Example answer:

    "For the Stripe API docs, I ran usability tests to see if users could make their first payment, validated code samples in Postman, and had devs review the OpenAPI spec for accuracy."


3. Highlight Tool Proficiency

  • Swagger UI vs ReDoc:
  • Swagger UI: Interactive (try endpoints in the browser), but less customizable.
  • ReDoc: Prettier, better for static sites, but no "try it out" feature.
  • Docs-as-Code tools:
  • Docusaurus: Great for React-based sites (e.g., Meta’s docs).
  • MkDocs: Simpler, Python-friendly (e.g., FastAPI docs).
  • Sphinx: For Python projects (e.g., Django docs).

4. Explain How You Handle Feedback

  • Interview question: "A developer says the docs are outdated. How do you respond?"
  • Strong answer:

    "First, I’d verify the issue (e.g., test the endpoint in Postman). If it’s outdated, I’d update the docs and add a CI check to prevent regressions. For example, I’d set up a GitHub Action to auto-test API examples on every PR."




Quick Check Questions


1. A developer complains that the API docs are outdated. How would you ensure docs stay in sync with code?

Answer: Implement CI/CD for docs (e.g., GitHub Actions) to auto-test code samples and OpenAPI specs on every PR. Example: Run spectral lint openapi.yaml to catch breaking changes.
Why: Automation reduces manual errors and catches drift early.

2. During usability testing, 4/5 users fail to complete a tutorial. What’s your next step?

Answer: Analyze where users got stuck (e.g., "Step 3: ‘Configure OAuth’ was unclear"). Rewrite the section, add screenshots, and retest with 2–3 new users.
Why: Small fixes (e.g., adding a screenshot) can drastically improve success rates.

3. A peer reviewer suggests removing a code example because it’s "too basic." How do you decide?

Answer: Check analytics (e.g., "Is this the most-viewed example?") and user feedback (e.g., "Do beginners ask about this?"). If it’s widely used, keep it but add a note like "For advanced users, see [X]." Why: Docs should serve all users, not just experts.


Last-Minute Cram Sheet

  1. Usability testing = Watch real users; code validation = Test examples; peer review = Get feedback from writers/devs.
  2. OpenAPI 3.0 vs 2.0: 3.0 supports callbacks, links, and better examples. ⚠️ Always use 3.0+ for new projects.
  3. Docs-as-Code tools: Docusaurus (React), MkDocs (Python), Hugo (fast), Sphinx (Python).
  4. Linters: Vale (style), markdownlint (Markdown), Spectral (OpenAPI).
  5. CI for docs: GitHub Actions, GitLab CI, or Netlify (for previews).
  6. Code samples: Test in a clean environment (e.g., docker run python:3.9).
  7. Peer review checklist: Accuracy, clarity, edge cases, prerequisites.
  8. Swagger UI vs ReDoc: Swagger = interactive; ReDoc = prettier.
  9. ⚠️ Tutorial ≠ How-to: Tutorials teach concepts by building (e.g., "Build a blog with React"); how-tos solve specific problems (e.g., "Add dark mode to your React app").
  10. Accessibility: Use axe DevTools to check for contrast, alt text, and keyboard navigation.


ADVERTISEMENT