Skip to content

Conversation

@ganeshku1
Copy link
Member

@ganeshku1 ganeshku1 commented Nov 7, 2025

The changes in the PR include README for the doc test CI.
The README includes:

  • A clear warning at the top about escaped code blocks (using \```bash) so users don't get confused when copying examples
  • Explanation of how the test discovery works (looks for HTML comment tags like setup-, health-check-, and aiperf-run- followed by bash code blocks)
  • Step-by-step instructions for adding new server tests with complete examples
  • Common patterns for OpenAI-compatible APIs and custom APIs
  • Troubleshooting tips and best practices for keeping tests fast and reliable
  • Overview of how to run the tests (all servers, dry-run)

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive README documenting end-to-end documentation tests: discovery from Markdown via comment tags; required tag blocks (setup, health-check, test commands); execution flow (build, setup, health-check, run, cleanup); validation rules; running modes (all, dry-run, per-server); examples, troubleshooting, best practices, and architecture/configuration guidance.

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Try out this PR

Quick install:

pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@docs/add-testing-guide

Recommended with virtual environment (using uv):

uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@docs/add-testing-guide

@ganeshku1 ganeshku1 changed the title Add README.md guide with examples for doc test CI test scripts. docs: Add README.md guide with examples for doc test CI test scripts. Nov 7, 2025
@github-actions github-actions bot added the docs label Nov 7, 2025
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ganeshku1 ganeshku1 force-pushed the docs/add-testing-guide branch from 6379ed5 to e34860f Compare November 7, 2025 17:16
@coderabbitai
Copy link

coderabbitai bot commented Nov 7, 2025

Walkthrough

A new README was added at tests/ci/test_docs_end_to_end/README.md documenting how documentation example end-to-end tests are discovered, the required tagged blocks per server (setup, health-check, aiperf-run), execution flow (build → setup → health check → test → cleanup), validation rules, running modes, and examples.

Changes

Cohort / File(s) Summary
Documentation for E2E testing
tests/ci/test_docs_end_to_end/README.md
Added comprehensive README describing test discovery from Markdown (HTML comment tags), required tag blocks per server (setup, health-check, aiperf-run), execution flow, validation rules (one setup, one health-check, ≥1 aiperf-run), running modes (all, dry-run, per-server), examples, OpenAI-compatible patterns, troubleshooting, best practices, and architecture/config constants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify examples and tag-format code fences are correctly escaped
  • Confirm validation rules and timeout/port recommendations are accurate
  • Check running-mode commands and example server walkthrough for reproducibility

Poem

🐇 A README hopped in, neat and spry,
Tags tucked in comments, tests reply,
Build, check, run — a steady beat,
Docs and servers finally meet,
I nibble bugs and watch tests fly! 🥕

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: Add README.md guide with examples for doc test CI test scripts' accurately summarizes the main change: adding documentation (a README) that provides guidance and examples for CI test scripts related to documentation testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
tests/ci/test_docs_end_to_end/README.md (3)

8-15: Potential Unicode character issue on line 14 — clarify the escape removal instruction.

Line 14 appears to contain a zero-width space or similar invisible character that may confuse readers trying to copy the example. Replace the inline code example with a clearer textual explanation.

Instead of: you should write bash ` (without the backslash)` Use: `remove the backslash so it becomes: three backticks (` ) followed by bash`

This makes the instruction explicit and avoids confusion from hidden Unicode characters.

Apply this diff to clarify the instruction:

-For example, this file shows examples like `\```bash` but you should write `​```bash` (without the backslash).
+For example, this file shows examples like `\```bash` but you should write ` ```bash ` (without the backslash).

195-201: Clarify the default server selection behavior.

Line 197 states the framework "tests the first discovered server by default," but the phrasing is ambiguous — it's unclear whether this is documented design behavior or a known limitation to be improved.

If this is a limitation, clarify that the --all-servers flag is required to test multiple servers. If it's intended design, the phrasing could be: "By design, the framework tests the first discovered server. Use --all-servers to test all discovered servers."

Verify with the framework maintainers whether testing only the first server by default is:

  1. Intended behavior (document as design choice)
  2. A known limitation (suggest future improvement)

Apply this diff to clarify the behavior:

-Currently, the framework tests the first discovered server by default. Use `--all-servers` to test all:
+By default, the framework tests the first discovered server. Use `--all-servers` to test all discovered servers:

1-314: Comprehensive documentation with excellent structure and coverage.

This README effectively documents the end-to-end testing framework with clear examples, actionable troubleshooting, and reference information. The progressive structure (overview → discovery → step-by-step → examples → running → validation → execution flow → patterns → troubleshooting → best practices → reference) is ideal for both newcomers and maintainers.

Strengths:

  • Prominent warning about escaped code blocks (lines 8-15) prevents common mistakes
  • Examples are self-contained and demonstrable (lines 49-58, 70-76, 88-101)
  • Validation rules are explicit, helping catch configuration errors early (lines 203-210)
  • Troubleshooting section addresses realistic failure modes (lines 255-283)
  • Best practices balance speed with correctness (lines 285-293)

Minor issues flagged separately above (Unicode character on line 14, ambiguous phrasing on line 197).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f10dc0 and e34860f.

📒 Files selected for processing (1)
  • tests/ci/test_docs_end_to_end/README.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: integration-tests (ubuntu-latest, 3.11)
  • GitHub Check: integration-tests (macos-latest, 3.13)
  • GitHub Check: integration-tests (ubuntu-latest, 3.12)
  • GitHub Check: integration-tests (ubuntu-latest, 3.13)
  • GitHub Check: integration-tests (macos-latest, 3.11)
  • GitHub Check: integration-tests (macos-latest, 3.10)
  • GitHub Check: integration-tests (ubuntu-latest, 3.10)
  • GitHub Check: integration-tests (macos-latest, 3.12)
  • GitHub Check: build (ubuntu-latest, 3.13)

Comment on lines 10 to 14
**The bash code examples in this documentation use backslashes (`\`) before the triple backticks** to prevent them from being parsed as actual test commands by the test framework.

**When copying examples from this file, you MUST remove the backslashes (`\`) before using them.**

For example, this file shows examples like `\```bash` but you should write `​```bash` (without the backslash).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just have the test script ignore this file? I think that would be a much cleaner way of doing it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that option, one drawback is user would not be able to copy paste the sample from the preview they, but they can do that from the raw file.
I will make that change and update this patch set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which ever one makes the most sense for the end user experience. is fine.

- Do NOT include `--ui-type` flag - the test framework adds `--ui-type simple` automatically
- Each command is executed inside the AIPerf Docker container
- Commands should complete in a reasonable time (default timeout: 300 seconds)
- Use small values for `--num-prompts` and `--max-tokens` to keep tests fast
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a note that the server is not taken down in between aiperf profile commands?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that is a good note, i missed that, will add that to the readme.

@lkomali
Copy link
Contributor

lkomali commented Nov 7, 2025

LGTM
Thanks for adding this @ganeshku1

Include warnings about escaped code blocks to prevent confusion for user copy pasting the sample code blocks.

Signed-off-by: Ganesh Kudleppanavar <[email protected]>
- Rename README.md to DOC_CI_TEST_README.md to clarify it documents the CI test framework
- Update parser.py to skip DOC_CI_TEST_README.md when parsing markdown files
- Remove warning about escaped backticks (no longer needed since file is skipped)
- Add notes that server is NOT restarted between multiple aiperf commands

Addresses PR feedback to have test script ignore this documentation file
instead of using escaped backticks in examples.

Signed-off-by: Ganesh Kudleppanavar <[email protected]>
@ganeshku1 ganeshku1 force-pushed the docs/add-testing-guide branch from b5a0725 to 21752a0 Compare November 24, 2025 16:43
@github-actions
Copy link

Try out this PR

Quick install:

pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@21752a0c80100f1ef414dfa296f45e7aad214ebc

Recommended with virtual environment (using uv):

uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@21752a0c80100f1ef414dfa296f45e7aad214ebc

Last updated for commit: 21752a0Browse code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants