Run E2E tests from test/new-e2e/tests/ using dda inv new-e2e-tests.run.
Instructions
Parse $ARGUMENTS to determine what to run. The user may provide:
- A test directory path (e.g.,
windows/install-test, agent-platform/upgrade, containers)
- A test function name (e.g.,
TestInstall, TestUpgrade)
- Flags to pass through (see below)
- A combination of the above
Resolve the test target:
- The invoke task automatically prepends
test/new-e2e/ to targets, so targets must be relative to that directory (e.g., ./tests/agent-subcommands/flare, NOT ./test/new-e2e/tests/...)
- If the user gives a directory like
agent-subcommands/flare, use ./tests/agent-subcommands/flare as --targets
- If the user gives a partial name, search for matching directories under
test/new-e2e/tests/ using Glob, then strip the test/new-e2e/ prefix for the target
- If the user gives a test function name (starts with
Test), find which package contains it using Grep under test/new-e2e/tests/, then set --targets to the package path (relative to test/new-e2e/) and --run to the test name
- If ambiguous, list the matching options and ask the user to pick one
Build the command:
dda inv new-e2e-tests.run --targets=./tests/<path> [flags]
IMPORTANT: --targets paths are relative to test/new-e2e/. Do NOT include test/new-e2e/ in the target path.
Supported flags (pass through from $ARGUMENTS):
--run <regex> — Only run tests matching this regex
--skip <regex> — Skip tests matching this regex
--keep-stack — Keep infrastructure up after test (for debugging)
--configparams <key=value> — Override Pulumi ConfigMap parameters
--agent-image <image:tag> — Use a specific agent image
--cluster-agent-image <image:tag> — Use a specific cluster agent image
--stack-name-suffix <suffix> — Add suffix to stack name (useful for stuck stacks)
--verbose / --no-verbose — Toggle verbose output (default: verbose)
--max-retries <n> — Retry failed tests up to n times
--flavor <flavor> — Package flavor (e.g., "datadog-agent")
--cache — Enable test cache (disabled by default)
Before running, confirm the full command with the user.
Run the command with a 60-minute timeout (infrastructure provisioning can take a while). Use run_in_background for the Bash tool since e2e tests are long-running.
After completion, summarize the results: which tests passed, which failed, and any useful error output.
Prerequisites
The following must be configured before running e2e tests:
pulumi CLI installed
~/.test_infra_config.yaml exists with proper configuration
If any prerequisite is missing, inform the user what needs to be set up.
Available Test Suites
Tests are organized under test/new-e2e/tests/, running ls test/new-e2e/tests should give the list of test packages
Issues when running tests
If the test was previously executed and that the infra is in a weird state, that Pulumi is not aware of, trying to rerun the test with the same stack can lead to strange error, like resource being replaced, while they should not exist at all yet.
To avoid that issue it is possible to execute the test with a stack with a different name, using --stack-name-suffix , please use short stack name suffix.
Stop the execution early when you detect that issue in the logs
Examples
# Run all tests in a directory
dda inv new-e2e-tests.run --targets=./tests/windows/install-test
# Run a specific test
dda inv new-e2e-tests.run --targets=./tests/agent-platform/tests/upgrade --run TestUpgrade
# Keep stack for debugging
dda inv new-e2e-tests.run --targets=./tests/containers --run TestContainerLinux --keep-stack
# Run with specific agent image
dda inv new-e2e-tests.run --targets=./tests/agent-platform/tests --agent-image "my-registry/agent:latest"
# Run with stack name suffix
dda inv new-e2e-tests.run --targets=./tests/windows/install-test --stack-name-suffix 2
## Usage
- `/run-e2e windows/install-test` — Run all Windows install tests
- `/run-e2e windows/install-test --run TestInstall` — Run only TestInstall
- `/run-e2e TestUpgrade` — Auto-find and run TestUpgrade
- `/run-e2e agent-platform --keep-stack` — Run with stack kept alive
## Output
Show the user the full command before running, then report test results when done.
---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/datadog) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->
1---2name: run-e2e3description: Run E2E tests locally using the new-e2e framework with Pulumi-based infrastructure Use when this capability is needed.4---56Run E2E tests from `test/new-e2e/tests/` using `dda inv new-e2e-tests.run`.78## Instructions9101. **Parse `$ARGUMENTS`** to determine what to run. The user may provide:11 - A test directory path (e.g., `windows/install-test`, `agent-platform/upgrade`, `containers`)12 - A test function name (e.g., `TestInstall`, `TestUpgrade`)13 - Flags to pass through (see below)14 - A combination of the above15162. **Resolve the test target**:17 - The invoke task automatically prepends `test/new-e2e/` to targets, so targets must be relative to that directory (e.g., `./tests/agent-subcommands/flare`, NOT `./test/new-e2e/tests/...`)18 - If the user gives a directory like `agent-subcommands/flare`, use `./tests/agent-subcommands/flare` as `--targets`19 - If the user gives a partial name, search for matching directories under `test/new-e2e/tests/` using Glob, then strip the `test/new-e2e/` prefix for the target20 - If the user gives a test function name (starts with `Test`), find which package contains it using Grep under `test/new-e2e/tests/`, then set `--targets` to the package path (relative to `test/new-e2e/`) and `--run` to the test name21 - If ambiguous, list the matching options and ask the user to pick one22233. **Build the command**:24 ```25 dda inv new-e2e-tests.run --targets=./tests/<path> [flags]26 ```27 IMPORTANT: `--targets` paths are relative to `test/new-e2e/`. Do NOT include `test/new-e2e/` in the target path.28294. **Supported flags** (pass through from `$ARGUMENTS`):30 - `--run <regex>` — Only run tests matching this regex31 - `--skip <regex>` — Skip tests matching this regex32 - `--keep-stack` — Keep infrastructure up after test (for debugging)33 - `--configparams <key=value>` — Override Pulumi ConfigMap parameters34 - `--agent-image <image:tag>` — Use a specific agent image35 - `--cluster-agent-image <image:tag>` — Use a specific cluster agent image36 - `--stack-name-suffix <suffix>` — Add suffix to stack name (useful for stuck stacks)37 - `--verbose` / `--no-verbose` — Toggle verbose output (default: verbose)38 - `--max-retries <n>` — Retry failed tests up to n times39 - `--flavor <flavor>` — Package flavor (e.g., "datadog-agent")40 - `--cache` — Enable test cache (disabled by default)41425. **Before running**, confirm the full command with the user.43446. **Run the command** with a 60-minute timeout (infrastructure provisioning can take a while). Use `run_in_background` for the Bash tool since e2e tests are long-running.45467. **After completion**, summarize the results: which tests passed, which failed, and any useful error output.4748## Prerequisites4950The following must be configured before running e2e tests:51- `pulumi` CLI installed52- `~/.test_infra_config.yaml` exists with proper configuration5354If any prerequisite is missing, inform the user what needs to be set up.5556## Available Test Suites5758Tests are organized under `test/new-e2e/tests/`, running `ls test/new-e2e/tests` should give the list of test packages596061# Issues when running tests62If the test was previously executed and that the infra is in a weird state, that Pulumi is not aware of, trying to rerun the test with the same stack can lead to strange error, like resource being replaced, while they should not exist at all yet.63To avoid that issue it is possible to execute the test with a stack with a different name, using --stack-name-suffix <suffix>, please use short stack name suffix.64Stop the execution early when you detect that issue in the logs6566## Examples6768```bash69# Run all tests in a directory70dda inv new-e2e-tests.run --targets=./tests/windows/install-test7172# Run a specific test73dda inv new-e2e-tests.run --targets=./tests/agent-platform/tests/upgrade --run TestUpgrade7475# Keep stack for debugging76dda inv new-e2e-tests.run --targets=./tests/containers --run TestContainerLinux --keep-stack7778# Run with specific agent image79dda inv new-e2e-tests.run --targets=./tests/agent-platform/tests --agent-image "my-registry/agent:latest"8081# Run with stack name suffix82dda inv new-e2e-tests.run --targets=./tests/windows/install-test --stack-name-suffix 283848586## Usage8788- `/run-e2e windows/install-test` — Run all Windows install tests89- `/run-e2e windows/install-test --run TestInstall` — Run only TestInstall90- `/run-e2e TestUpgrade` — Auto-find and run TestUpgrade91- `/run-e2e agent-platform --keep-stack` — Run with stack kept alive9293## Output9495Show the user the full command before running, then report test results when done.9697---98> Converted and distributed by [TomeVault](https://tomevault.io/claim/datadog) — claim your Tome and manage your conversions.99<!-- tomevault:4.0:skill_md:2026-04-11 -->