Skip to content

test(cli): cover adk conformance test command options - #6874

Open
rootkiller6788 wants to merge 1 commit into
google:mainfrom
rootkiller6788:test-cli-conformance-options
Open

test(cli): cover adk conformance test command options#6874
rootkiller6788 wants to merge 1 commit into
google:mainfrom
rootkiller6788:test-cli-conformance-options

Conversation

@rootkiller6788

Copy link
Copy Markdown

What

Adds focused unit tests for the adk conformance test CLI command (requested in #6730). The command dispatches to run_conformance_test; the existing tests in this module already cover the no-path default, single-directory, --mode replay, --generate_report, --report_dir, and --streaming-mode sse cases. This change closes the remaining gaps:

  • Multiple PATHS are all forwarded to the runner.
  • --mode live is propagated as "live".
  • --streaming-mode bidi is parsed to StreamingMode.BIDI.
  • An invalid --mode value is rejected by Click (exit code 2) before any dispatch.
  • An invalid --streaming-mode value is rejected by Click (exit code 2) before any dispatch.

The conformance runner is mocked (same pattern as the surrounding tests) so the suite stays fast and deterministic with no real LLM execution.

Why

These CLI behaviors had no automated coverage, leaving regressions in argument handling unguarded.

Testing

$ python -m pytest tests/unittests/cli/utils/test_cli_tools_click.py -k conformance -q
11 passed, 92 deselected

(5 new tests on top of the pre-existing conformance tests.) pyink --check and ruff check are clean on the changed file.

Add focused unit tests for the argument handling of `adk conformance test`
(issue google#6730): multiple PATHS are all forwarded, --mode live is propagated,
--streaming-mode bidi maps to the StreamingMode enum, and invalid --mode /
--streaming-mode values are rejected by Click before any dispatch.

The runner is mocked so the tests stay fast and deterministic, matching the
existing conformance CLI tests in this module.
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.

2 participants