Skip to content

test(e2e): Test the create wizard's model choices through dev, build, deploy and invoke, under a tui tag - #2973

Merged
mquang-amazon merged 1 commit into
box-integrationfrom
test/e2e-model-providers
Dec 1, 2026
Merged

mquang-amazon merged 1 commit into
box-integrationfrom
test/e2e-model-providers

Conversation

@mquang-amazon

Copy link
Copy Markdown
Contributor

Description

End-to-end tests for the model choices of the interactive create wizard (TUI), under a new tui tag. agentcore create takes no model flags, so the tests create each project through the wizard's own code, then run dev, build, deploy and invoke through the CLI.

Stacked on #2959. This branch is #2959's e2e changes (the split test files, templates-test-support.ts, the Vitest caps) without the TUI commits that #2959 carried for testing, plus the commits below. Merge #2959 first; this PR's own diff is then the three files below.

  • e2eTest/helpers/create-with-model-provider.ts: creates a project as the wizard does when the user picks a model provider. It builds the input with resolveRuntimeTemplateShortcut(template, { modelProvider, modelId, apiKey, apiBase }) and runs the project manager's create, the code that agentcore create runs after the wizard. Tests run it with bun in the folder to create in, because create writes into the current directory. A project it creates is identical to one the wizard creates for the same answers, apart from its name.
  • e2eTest/project/modelProviders.test.ts, tag tui:
    1. create with the model choices of the create wizard (53 tests, no deploy): each template the wizard asks a model provider of, with each provider (Bedrock, Anthropic, OpenAI, OpenAICompatible, Gemini, LiteLLM; no LiteLLM for TypeScript). Each checks the runtime's modelProvider in agentcore.json, the API key as a project credential and never in agentcore.json, and the model ID in the agent's code.
    2. dev, build, deploy, invoke the Box template with each model provider and a test key (5 tests): agent-python-strands-box on Anthropic, OpenAI, OpenAICompatible (the OpenAI API, gpt-4o-mini), Gemini, and LiteLLM (openai/gpt-4o-mini). CI has no keys for these providers, so each takes a test key and expects the provider's own refusal of it, under agentcore dev and on AgentCore Runtime: the agent's model call left the box through its egress route, with the key, and reached the provider. blocked by egress control, or no refusal, fails the test.
  • e2eTest/constants.ts: the tui tag.

What the deploy tests found

The deploy tests fail on the Runtime today, and that is what they are for:

Related Issue

Closes #

Documentation PR

No documentation change.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): End-to-end tests.

Testing

How have you tested the change?

  • I ran bun test: no change to unit tests or shipped code.
  • I ran the relevant end-to-end tests with bun run test:e2e: the 53 create tests pass locally. The deploy tests ran in CI with the same projects made through create flags (run https://github.com/aws/agentcore-cli/actions/runs/46516669467), with the results above; a run of this branch with fix(box): Keep the env:// secret of an [egress] route in the Runtime profile #2970 is to follow.
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run audit
  • I ran bun run secrets:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots: no change to src/assets/.
  • If I re-recorded fixtures or golden files, every change beyond account identifiers is explained by this PR: none re-recorded.
  • This PR does not change command.md (the release workflow regenerates it)

Checklist

@mquang-amazon
mquang-amazon requested a review from a team December 1, 2026 01:04
…s code, then dev, build, deploy and invoke, under a tui tag
@mquang-amazon
mquang-amazon force-pushed the test/e2e-model-providers branch from 4e4c9c8 to 3fdc80b Compare December 1, 2026 01:10
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.95%. Comparing base (57b3d8c) to head (3fdc80b).

Additional details and impacted files
@@               Coverage Diff                @@
##           box-integration    #2973   +/-   ##
================================================
  Coverage            96.95%   96.95%           
================================================
  Files                  780      780           
  Lines                70884    70884           
================================================
  Hits                 68723    68723           
  Misses                2161     2161           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mquang-amazon
mquang-amazon merged commit dffcccc into box-integration Dec 1, 2026
6 checks passed
@mquang-amazon
mquang-amazon deleted the test/e2e-model-providers branch December 1, 2026 03:57
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.

3 participants