Skip to content

test(e2e): cover harness happy path - #47

Closed
Hweinstock wants to merge 2 commits into
refactorfrom
test/harness-e2e-happy-path
Closed

Hweinstock wants to merge 2 commits into
refactorfrom
test/harness-e2e-happy-path

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • add table-driven harness happy-path e2e coverage
  • cover managed, disabled, and semantic memory configurations
  • verify a custom system prompt through the remote invocation transcript
  • remove every harness and deploy the empty project

Verification

  • bun test — 3,559 passed, 0 failed
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • bun run secrets:check
  • bun run compile
  • harness e2e against a dev account — 14 passed, 0 failed in 592.45s, including final stack teardown

The successful e2e run used the schema-v2 CDK CI tarball because the base branch pins
@aws/agentcore-cdk@1.0.0-rc.2, which is not currently published to npm. A post-rebase
rerun stops during project creation at that package installation and creates no AWS
resources.

Testing instructions

bun install --frozen-lockfile
bun run compile
export AGENTCORE_CLI_PATH="$PWD/dist/bin/agentcore-linux-x64"
export AWS_REGION=us-east-1
bun run test:e2e -- e2eTest/project/harness.test.ts

Reproduction

Before this change, e2eTest/project/ covered runtime templates but did not exercise
the harness add, deploy, remote invoke, remove, and teardown lifecycle.

Spec

Add e2eTest/project/harness.test.ts with test cases defined by a harness name,
additional add flags, and additional invoke flags. Cover only two to three memory
settings and one custom-system-prompt harness. Add the harnesses to an empty project,
deploy them, invoke them remotely, remove them, and deploy the empty project.

 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'managed_memory' can be added to a project 468ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'disabled_memory' can be added to a project 470ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'semantic_memory' can be added to a project 462ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'custom_prompt' can be added to a project 467ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > deploys all harnesses 225911ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'managed_memory' can be invoked after deployed 4437ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'custom_prompt' can be invoked after deployed 4571ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'disabled_memory' can be invoked after deployed 6168ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > 'semantic_memory' can be invoked after deployed 6370ms
 ✓ e2eTest/project/harness.test.ts > add, deploy, and invoke harnesses > removes all harnesses and deploys the empty project 379863ms

 Test Files  1 passed | 1 skipped (2)
      Tests  10 passed | 38 skipped (48)
   Start at  19:10:30
   Duration  619.15s (transform 94ms, setup 522ms, import 342ms, tests 618.61s, environment 0ms)

Comment thread e2eTest/project/harness.test.ts Outdated
expectedText?: string;
};

const TIMEOUT_MS = {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

lets move the timeouts to a central timeouts.ts so that these are shared with other tests.

Comment thread e2eTest/project/harness.test.ts Outdated
test("deploys the empty project", { timeout: TIMEOUT_MS.PROJECT_DEPLOY }, async () => {
const deployment = parseResult(
DeployResponseSchema,
await cli.run(["project", "deploy", "--yes", "--json"], projectDir),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

lets do a remove all here.

@Hweinstock Hweinstock closed this Sep 22, 2026
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.

1 participant