{
  "id": 22111361,
  "title": "How to run your test suite in a clean microVM with sandscale sandbox run",
  "url": "https://urgent.news/2026/11/27/how-to-run-your-test-suite-in-a-clean-microvm-with-sandscale-sandbox",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-27T04:19:44.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sandscale/how-to-run-your-test-suite-in-a-clean-microvm-with-sandscale-sandbox-run-13ll"
  },
  "original_language": "en",
  "account": "To ensure your test suite runs in a clean environment, utilize the sandscale sandbox run command. This command sends a folder to a new sandbox, executes a command within it, streams the output, and exits with the command's exit code. The sandscale sandbox reference outlines installation and usage instructions for macOS and Linux systems.\n\nTo initiate the process, simply execute sandscale sandbox run --sync . -- make test. The --sync . flag copies the current folder to the sandbox's /workspace directory and runs the provided command. The command's exit code dictates the overall exit status, allowing seamless integration with scripts and CI/CD pipelines.\n\nWhen configuring the sandbox, users can specify a template and options using the --template and --options flags. Templates are contingent upon the organization's configuration, while options include TTL, network settings, memory allocation, CPU count, and labels. The --ttl flag determines the sandbox's lifespan, while the --network flag dictates outbound network access, which may require inclusion in the organization's egress allowlist.\n\nThe sandscale sandbox run command excludes files designated in the .gitignore file, as well as .git, node_modules, and symbolic links. Secret and environment files, including .env* files, keys, credentials, cloud and registry tokens, and Terraform state files, are also excluded. Users can verify what gets sent and what does not by employing the --dry-run flag.\n\nTo preserve the sandbox for further inspection upon failure, the --keep flag can be utilized. This allows users to access the sandbox's contents using the sandcale sandbox connect and sandcale sandbox logs commands. Should the user wish to reuse the same sandbox, the --sandbox flag can be leveraged, enabling further commands, such as pytest -q, to be executed within the established sandbox.",
  "summary": "Sometimes you want to know whether your tests pass on a clean machine, not on the laptop that has accumulated three years of global packages. Or you are about to run a test suite an agent changed and would rather it did not run next to your SSH keys. The Sandscale CLI has one command for this: sandscale sandbox run . It sends a folder to a fresh sandbox, runs a command there, streams the output…",
  "key_points": [
    "Use sandscale sandbox run command to run test suite in clean microVM.",
    "--sync . flag copies current folder to sandbox's /workspace directory.",
    "--keep flag preserves sandbox for further inspection upon failure."
  ],
  "editors_take": "Automating test execution within isolated microVMs streamlines continuous integration workflows by providing developers with predictable, clean environments that automatically exclude sensitive credentials and unnecessary configuration files.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}