Skip to content

test(e2e): add Kagent lifecycle scenarios - #665

Open
xytian315 wants to merge 7 commits into
xytian315/oss-kagentfrom
xytian315/kagent-e2e
Open

test(e2e): add Kagent lifecycle scenarios#665
xytian315 wants to merge 7 commits into
xytian315/oss-kagentfrom
xytian315/kagent-e2e

Conversation

@xytian315

@xytian315 xytian315 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds Kind-based E2E coverage for the Kagent runtime adapter.

  • Exercises Agent deployment, idempotent reapply, model configuration, and removal.
  • Exercises remote and source-backed MCPServer deployment, live tool discovery, and removal.
  • Verifies an Agent can consume a deployed MCPServer
  • Verifies out-of-band Kagent Agents are discovered and removed from AgentRegistry.
  • Generates runnable scenario documentation from successful test executions.

This PR is stacked on the Kagent runtime adapter branch and should target xytian315/oss-kagent. Retarget it to main after the adapter PR merges.

Change Type

/kind documentation

Changelog

NONE

Additional Notes

make test-e2e E2E_SUITE=kagent

Splits the Kagent suite into test/e2e/kagent with feature-per-file tests
and moves the shared registry setup into an importable StartRegistry
helper. Port-forwards default to an ephemeral local port so test
packages can run concurrently.
Copilot AI lite review requested due to automatic review settings August 31, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Kind-based end-to-end coverage for the Kagent runtime adapter by introducing a shared E2E registry bootstrap helper, new Kagent lifecycle scenario tests, and generated runnable scenario documentation under test/e2e/kagent/scenarios/.

Changes:

  • Introduces test/e2e/setup.go to centralize E2E prerequisites, arctl binary resolution, and registry URL resolution (including port-forward support).
  • Adds Kagent E2E test suite covering Agent lifecycle, MCPServer lifecycle (remote + source-backed), combined Agent+MCP scenario, and discovery of out-of-band Kagent Agents.
  • Writes/commits generated scenario documentation markdown reflecting successful E2E runs.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/e2e/setup.go New shared E2E bootstrap: prerequisites, arctl path setup, registry URL resolution/port-forwarding
test/e2e/e2e_test.go Refactors E2E TestMain to use the shared StartRegistry helper
test/e2e/private_git_sources_test.go Switches kubectl context usage to the exported KubeContext
test/e2e/kagent/mcp_test.go Adds MCP lifecycle E2E coverage (remote + source-backed), plus tool discovery assertions
test/e2e/kagent/main_test.go Adds Kagent suite TestMain to bootstrap registry access for Kagent E2E tests
test/e2e/kagent/helpers_test.go Provides Kagent E2E helpers: manifest builders, kubectl interactions, polling/assertions, cleanup
test/e2e/kagent/docs_test.go Adds doc recorder used to generate runnable scenario markdown from successful E2E runs
test/e2e/kagent/discovery_test.go Adds out-of-band Kagent Agent discovery/removal E2E scenario
test/e2e/kagent/agent_test.go Adds Agent deployment/reapply/removal E2E scenario with basic workload env assertions
test/e2e/kagent/agent_mcp_test.go Adds combined Agent+MCP lifecycle scenario and asserts MCP config injection
test/e2e/kagent/scenarios/mcp.md Generated runnable documentation for the MCP scenario
test/e2e/kagent/scenarios/discovery.md Generated runnable documentation for the discovery scenario
test/e2e/kagent/scenarios/agent.md Generated runnable documentation for the Agent scenario
test/e2e/kagent/scenarios/agent-mcp.md Generated runnable documentation for the Agent+MCP scenario
Files not reviewed (1)
  • test/e2e/kagent/docs_test.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/e2e/setup.go

@timflannagan timflannagan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

While we're here, can we audit 1. the current state of e2e testing, and 2. whether we're missing some Make target machinery here. Just want to get things right. We talked in slack earlier today, we can figure out the right test/e2e/ organization later

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants