Skip to content

feat: add e2e tests for dev server lifecycle#734

Draft
Hweinstock wants to merge 1 commit intoaws:mainfrom
Hweinstock:feat/e2e-dev-lifecycle
Draft

feat: add e2e tests for dev server lifecycle#734
Hweinstock wants to merge 1 commit intoaws:mainfrom
Hweinstock:feat/e2e-dev-lifecycle

Conversation

@Hweinstock
Copy link
Copy Markdown
Contributor

Description

Add e2e tests for the dev command lifecycle: create a project, start the dev server, invoke it, and verify responses.

Three tests covering the core dev workflow:

  • Server startup: dev --logs starts uvicorn and accepts TCP connections
  • Invoke: dev "prompt" sends a prompt to the running server and gets a non-empty response
  • Stream invoke: dev "prompt" --stream streams a response from the running server

Key implementation detail: INIT_CWD must be stripped from the spawned process environment, otherwise agentcore resolves the working directory to the test runner root instead of the project directory. spawnAndCollect already handles this, but the raw spawn used for the background server process needed the same treatment.

Tests run in ~20s (no AWS deploy needed — dev server runs locally) and use Strands/Bedrock with a Python agent.

Related Issue

Closes #

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

All 3 tests pass locally against dev account (440744214761, us-east-1) in ~20s. Server process cleanup verified — afterAll kills the background server via SIGINT.

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.4.0.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-734-tarball/aws-agentcore-0.4.0.tgz

@Hweinstock Hweinstock force-pushed the feat/e2e-dev-lifecycle branch from da3e1fc to f39cac1 Compare March 30, 2026 22:13
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 30, 2026
@Hweinstock Hweinstock force-pushed the feat/e2e-dev-lifecycle branch from f39cac1 to 712b215 Compare March 30, 2026 22:36
@github-actions github-actions bot removed the size/m PR size: M label Mar 30, 2026
@github-actions github-actions bot added the size/m PR size: M label Mar 30, 2026
@Hweinstock Hweinstock force-pushed the feat/e2e-dev-lifecycle branch from 712b215 to faa1683 Compare March 30, 2026 22:54
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 30, 2026
@Hweinstock Hweinstock force-pushed the feat/e2e-dev-lifecycle branch from faa1683 to 51a7003 Compare March 30, 2026 23:03
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant