Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 9, 2025

Overview

This PR adds a new comprehensive guide that provides complete, copy-paste-ready examples for 6 common documentation testing scenarios. The guide addresses the highest priority documentation gap for new user adoption by helping users quickly find relevant examples, understand them, and adapt them to their needs.

What's New

Created /docs/get-started/real-world-examples/ as a category with 7 separate pages:

  1. Overview - Introduction and navigation to all scenarios
  2. Testing a CLI Installation Guide - Validates package installation commands, version checks, and basic functionality across different platforms
  3. Testing a REST API Tutorial - Demonstrates full CRUD workflows with request/response validation and variable chaining between API calls
  4. Validating Screenshots in a UI Walkthrough - Shows automated screenshot capture and visual comparison for UI documentation
  5. Testing a Multi-Step User Workflow - End-to-end form filling and registration flow validation
  6. Testing Code Examples with Multiple Languages - Multi-language code validation across Python, JavaScript, and Bash
  7. Testing Documentation Links - Link checking for internal and external documentation references

Structure

The guide is organized as an expandable sidebar category with individual pages for each use case, improving navigation and maintainability. Each scenario follows a consistent, user-focused template:

  • When to use this - Clear description of the documentation challenge
  • What this tests - Key validation points covered by the example
  • Prerequisites - What users need before starting
  • Complete example - Full, working test specification with inline comments
  • Expected output - What success looks like
  • Common variations - 2-3 ways to adapt the example
  • Next steps - Cross-links to relevant advanced topics

Documentation Standards

  • Follows Google Developer Style Guide (active voice, present tense, sentence case)
  • Uses Good Docs Project templates for structure
  • Extensive cross-linking to action references, configuration docs, and tutorials
  • All code examples are syntactically correct and tested
  • Mobile-responsive with copy buttons on code blocks

Navigation

The guide is positioned in the sidebar between "Create your first test" and "Explore sample tests" as an expandable category, providing a natural progression for new users:

  1. Create your first test (basic introduction)
  2. Real-world examples (comprehensive scenarios) ← NEW
    • Overview
    • CLI installation guide
    • REST API tutorial
    • UI screenshots
    • User workflow
    • Code examples
    • Documentation links
  3. Explore sample tests (GitHub samples)

Screenshots

Overview Page with Sidebar Navigation

The overview page provides an introduction to all available scenarios with links to each individual page. The sidebar shows "Real-world examples" as an expandable category, making it easy for users to navigate directly to specific examples.

Benefits

  • Improved navigation: Users can directly access specific use cases from the sidebar without scrolling through a long page
  • Better maintainability: Each example is in its own file, making updates and changes easier to manage
  • Faster page loads: Smaller individual pages load more quickly than one large 998-line file
  • Clearer organization: Sidebar clearly shows all available examples at a glance
  • Consistent with site structure: Follows the same pattern used by other sections like "Tests" and "Input formats"

Impact

This guide directly addresses user stories from the issue:

  • Technical writers can test CLI installation guides
  • Developers can validate REST API tutorials
  • Docs managers can automate screenshot validation
  • Support engineers can test troubleshooting procedures

By providing immediately usable examples in an easily navigable structure, this reduces time-to-first-success for new users and accelerates Doc Detective adoption.

Related

Closes #95

Original prompt

This section details on the original issue you should resolve

<issue_title>Create comprehensive real-world examples guide for common documentation testing scenarios</issue_title>
<issue_description>
Create a new documentation page that provides complete, copy-paste-ready examples for common documentation testing scenarios. This guide should help new users quickly find a relevant example, understand it, and adapt it to their needs.
Context
New users learn best from complete working examples they can adapt. Currently, Doc Detective has a basic "Create Your First Test" guide, but users need more diverse, real-world scenarios that map to their actual documentation testing needs. This is the highest priority documentation gap for new user adoption.
Target Audience
Technical writers new to documentation testing
Developers documenting their products
QA professionals exploring docs-as-tests approach
Anyone looking to validate documentation accuracy
User Stories
"As a technical writer, I want to test my CLI installation guide so that I know the commands actually work"
"As a developer, I want to test my REST API tutorial so that the examples stay current with the API"
"As a docs manager, I want to validate screenshots in my UI walkthrough so they don't go stale"
"As a support engineer, I want to test our troubleshooting procedures so they help customers effectively"
Content Structure
Create a new page at /docs/get-started/real-world-examples.md with the following sections:
Introduction (100-150 words)
Explain the purpose: complete, working examples for common scenarios
Set expectations: each example is copy-paste ready
Provide navigation: link to specific use cases below
Use Case Template (repeat for each scenario)
For each use case, include:
Scenario Title (e.g., "Testing a CLI Installation Guide")
When to use this (1-2 sentences describing the scenario)
What this example does (2-3 bullet points)
Prerequisites (what users need before starting)
Complete working example (full test specification with inline comments)
Expected output (what success looks like)
Common variations (2-3 ways to adapt the example)
Next steps (links to relevant advanced topics)
Required Use Cases

  1. Testing a CLI Installation Guide
    Context: Command-line tools are fundamental to developer documentation. Installation guides must have accurate commands that work across different operating systems. Testing these ensures users can actually install your tool.
    Example should include:
    Using runShell action to execute installation commands
    Checking command exit codes
    Validating installed version
    Testing basic functionality post-install
    Handling platform-specific variations
    {
    "tests": [
    {
    "steps": [
    {
    "description": "Install the CLI tool using npm",
    "runShell": {
    "command": "npm install -g your-cli-tool",
    "stdio": ""
    }
    },
    {
    "description": "Verify installation by checking version",
    "runShell": {
    "command": "your-cli-tool --version",
    "stdio": "v1.2.3"
    }
    },
    {
    "description": "Test basic functionality",
    "runShell": {
    "command": "your-cli-tool hello",
    "stdio": "Hello, World!"
    }
    }
    ]
    }
    ]
    }
  2. Testing a REST API Tutorial
    Context: API documentation often includes curl commands or code examples that demonstrate endpoint usage. These examples must stay synchronized with the actual API behavior, including request/response formats and status codes.
    Example should include:
    Multiple API calls in sequence (create, read, update patterns)
    Request body validation
    Response body validation
    Status code checking
    Using variables to chain API calls (e.g., using ID from create in subsequent calls)
    {
    "tests": [
    {
    "steps": [
    {
    "description": "Create a new user",
    "httpRequest": {
    "url": "https://api.example.com/users",
    "method": "POST",
    "request": {
    "body": {
    "name": "Test User",
    "email": "[email protected]"
    }
    },
    "response": {
    "body": {
    "id": "string",
    "name": "Test User",
    "email": "[email protected]"
    }
    },
    "statusCodes": [201]
    },
    "variables": {
    "USER_ID": "$$response.body.id"
    }
    },
    {
    "description": "Retrieve the created user",
    "httpRequest": {
    "url": "https://api.example.com/users/$USER_ID",
    "method": "GET",
    "response": {
    "body": {
    "id": "$USER_ID",
    "name": "Test User"
    }
    },
    "statusCodes": [200]
    }
    }
    ]
    }
    ]
    }
  3. Validating Screenshots in a UI Walkthrough
    Context: UI d...

Fixes #95


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLAassistant commented Oct 9, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hawkeyexl
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Oct 9, 2025

PR Change Summary

Created a comprehensive guide for real-world documentation testing scenarios to enhance user understanding and adoption.

  • Added a new documentation file for real-world examples in testing.
  • Included multiple use cases covering CLI installation, REST API tutorials, UI walkthroughs, and more.
  • Updated navigation to include the new guide in the sidebar.
  • Validated the build to ensure functionality of the new documentation.

Added Files

  • docs/get-started/real-world-examples.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

1 similar comment
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Oct 9, 2025

PR Change Summary

Created a comprehensive guide for real-world documentation testing scenarios to enhance user understanding and adoption.

  • Added a new documentation file for real-world examples in testing.
  • Included multiple use cases covering CLI installation, REST API tutorials, UI walkthroughs, and more.
  • Updated navigation to include the new guide in the sidebar.
  • Validated the build to ensure functionality of the new documentation.

Added Files

  • docs/get-started/real-world-examples.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

Copilot AI changed the title [WIP] Create comprehensive real-world examples guide for documentation testing Add comprehensive real-world examples guide for common documentation testing scenarios Oct 9, 2025
Copilot AI requested a review from hawkeyexl October 9, 2025 15:41
Copilot finished work on behalf of hawkeyexl October 9, 2025 15:41
@hawkeyexl
Copy link
Contributor

@copilot Break the large file into individual pages per month example.

Copy link
Contributor Author

Copilot AI commented Oct 26, 2025

@copilot Break the large file into individual pages per month example.

Split the large file into individual pages per use case in commit 94036ca.

The real-world examples guide is now organized as a category with 7 separate pages:

  • Overview (introduction and navigation)
  • CLI installation guide
  • REST API tutorial
  • UI screenshots
  • User workflow
  • Code examples
  • Documentation links

This structure improves navigation and maintainability, with each example in its own file.

Overview page with sidebar navigation

Copilot finished work on behalf of hawkeyexl October 26, 2025 20:11
@hawkeyexl hawkeyexl marked this pull request as ready for review October 26, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create comprehensive real-world examples guide for common documentation testing scenarios

3 participants