Skip to content
↗ Astrona.io Cloud Native learning, open to everyone.

Astrona test

astrona test

Run the full lab lifecycle for CI: bootstrap, testing, submit, teardown

Synopsis

Run the full lab lifecycle for CI: bootstrap, apply the reference solution (testing), grade it, and always tear down — proving the lab's own solution passes its checks.

Ctrl-C or SIGTERM (a cancelled CI job) stops the run after the current step, then still collects diagnostics (per --diagnostics) and tears the environment down. Steps astrona is waiting on are not cut short by SIGTERM; send SIGKILL to quit without tearing down.

--repeat N runs the whole lifecycle N times on fresh environments and reports any check that doesn't pass every time (flaky), so race-prone checks are caught before students hit them.

Exit code: 0 passed, 2 graded but didn't pass, 1 something else went wrong (setup, tools, config) — see the CI guide.

astrona test [lab] [flags]

Options

      --diagnostics string       When to collect a diagnostics bundle before teardown: on-failure, always, or never (default "on-failure")
      --diagnostics-dir string   Write the diagnostics bundle here (default ~/.astrona/diagnostics/<lab>-<timestamp>) — point it inside your CI workspace to upload it as an artifact
  -h, --help                     help for test
      --junit-xml string         Write a JUnit XML test report to this path, for CI systems to parse
      --parallel int             Create up to N linked clusters (runtime.kind.clusters) at once, 1-5 (default 1: one at a time). dependsOn is still respected, and after a failure nothing new starts (default 1)
      --repeat int               Run the whole lifecycle this many times (fresh environment each) and report flaky checks (default 1)

Options inherited from parent commands

      --accept-terms      Accept this CLI's usage terms and data-loss risk notice; required on each operational CI command (read: astrona terms)
  -c, --config string     Path or URL to the lab config directory (with --git: a subdirectory within the cloned repo) (default ".")
  -f, --file string       Configuration file name override (default "config.yaml")
      --git string        Git repository URL to clone/pull (https://, git@host:, or ssh://) — --config then selects a subdirectory within it
      --git-ref string    Git branch, tag, or commit to check out (used with --git; default: the repo's default branch)
      --headless          Disable the terminal UI and CLI prompts; run/reset skip login reminders and new account sessions
      --install-version   If the lab needs another astrona release (astronaVersion) that isn't installed, install it without asking — for CI
      --trust             Approve running a remote (--git / URL) lab without asking — for CI; review the lab first
      --update-check      Check for new CLI releases (disabled in CI, without a terminal, or by ASTRONA_NO_UPDATE_CHECK) (default true)
      --verbose           Stream the full output of every underlying command instead of the compact step view

SEE ALSO

  • astrona - Astrona is the Astrona lab community CLI
Auto generated by spf13/cobra on 20-Oct-2026