From 56b0dbe637fce43f7d9bac1e2a356add9bc26bdd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 10:45:18 +0000 Subject: [PATCH 1/2] Initial plan From 45c5f65f454af6b6e09142861cd68684c1c6722d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 10:52:45 +0000 Subject: [PATCH 2/2] docs: document how to run all tests locally in CONTRIBUTING.md Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> Agent-Logs-Url: https://github.com/devcontainers/features/sessions/503f04fe-7fc2-4cb6-830c-6c008e0821a4 --- CONTRIBUTING.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f6c7e3ab0..adbe47503 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,6 +46,50 @@ started: 👩‍⚖️ When contributing code to this project, you may be asked to agree to our [Contributor License Agreement]. +## Testing + +The [devcontainer CLI] is used to run the tests in this repository. Install it with: + +```bash +npm install -g @devcontainers/cli +``` + +### Run all tests + +To run the tests for **every** Feature in this repository, run the following commands from the root of the repository: + +```bash +# Run auto-generated and scenario tests for every Feature +devcontainer features test . + +# Run the global test scenarios +devcontainer features test --global-scenarios-only . +``` + +### Test a specific Feature + +To test a specific Feature (e.g. `go`): + +```bash +devcontainer features test -f go . +``` + +### Test against a specific base image + +By default tests run against `mcr.microsoft.com/devcontainers/base:ubuntu`. Use the `--base-image` (or `-i`) flag to specify a different image: + +```bash +devcontainer features test -f go -i ubuntu:focal . +``` + +### Run only scenario tests + +Use `--skip-autogenerated` to run only the [scenario tests] defined in `test//scenarios.json`: + +```bash +devcontainer features test -f go --skip-autogenerated . +``` + [our dev container community Slack channel]: https://aka.ms/devcontainer_community [open an issue]: https://github.com/devcontainers/features/issues/new @@ -57,4 +101,6 @@ started: [contributor license agreement]: https://opensource.microsoft.com/cla/ [Test your changes using `devcontainer features test`]: https://github.com/devcontainers/cli/blob/main/docs/features/test.md [semver]: https://semver.org/ +[devcontainer CLI]: https://github.com/devcontainers/cli +[scenario tests]: https://github.com/devcontainers/cli/blob/main/docs/features/test.md#scenarios