{
  "slug": "tests/quickstart",
  "title": "Tests Quickstart",
  "description": "Write and run your first Cuitty test suite in five minutes.",
  "url": "https://cuitty.com/docs/tests/quickstart",
  "markdown_url": "https://cuitty.com/docs/tests/quickstart.md",
  "json_url": "https://cuitty.com/docs/tests/quickstart.json",
  "frontmatter": {
    "title": "Tests Quickstart",
    "description": "Write and run your first Cuitty test suite in five minutes.",
    "order": 1,
    "section": "Tests",
    "updatedAt": "2026-05-31"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "tests-quickstart",
      "text": "Tests Quickstart"
    },
    {
      "depth": 2,
      "slug": "install-the-cli",
      "text": "Install the CLI"
    },
    {
      "depth": 2,
      "slug": "write-your-first-ctest-file",
      "text": "Write your first .ctest file"
    },
    {
      "depth": 2,
      "slug": "run-the-suite",
      "text": "Run the suite"
    },
    {
      "depth": 2,
      "slug": "view-results-in-test-studio",
      "text": "View results in Test Studio"
    },
    {
      "depth": 2,
      "slug": "add-tests-to-ci",
      "text": "Add tests to CI"
    },
    {
      "depth": 2,
      "slug": "whats-next",
      "text": "What’s next"
    }
  ],
  "body_markdown": "# Tests Quickstart\n\nCuitty Tests lets you write declarative HTTP smoke tests in `.ctest` files, run them from the CLI or CI, and review results in Test Studio. This guide takes you from install to a passing suite in under five minutes.\n\n## Install the CLI\n\n```bash\ncurl -fsSL https://cuitty.com/install.sh | sh\ncui --version\n```\n\nOr install with npm:\n\n```bash\nnpm install -g @cuitty/cli\n```\n\n## Write your first .ctest file\n\nCreate `smoke.ctest` in your project root. Cuitty tests use an HCL-based DSL:\n\n```hcl\nsuite \"api-smoke\" {\n  description = \"Verify core API endpoints return 200\"\n\n  test \"healthcheck\" {\n    request {\n      method = \"GET\"\n      url    = \"${env.BASE_URL}/health\"\n    }\n\n    assert {\n      status = 200\n    }\n  }\n\n  test \"list-projects\" {\n    request {\n      method = \"GET\"\n      url    = \"${env.BASE_URL}/api/projects\"\n      headers = {\n        Authorization = \"Bearer ${env.CUITTY_API_KEY}\"\n      }\n    }\n\n    assert {\n      status  = 200\n      json    = \"$.data | length > 0\"\n    }\n  }\n}\n```\n\n## Run the suite\n\nExecute the test file against your running environment:\n\n```bash\ncui tests run smoke.ctest --env BASE_URL=http://localhost:7700\n```\n\nThe CLI prints a pass/fail summary for each test. Use `--verbose` to see full request and response bodies.\n\n## View results in Test Studio\n\nIf you have the Cuitty portal running, results are automatically pushed to Test Studio. Open the portal and navigate to **Tests > Runs** to see the timeline, latency breakdown, and assertion details for every request.\n\n## Add tests to CI\n\nDrop a step into your GitHub Actions workflow:\n\n```yaml\n- name: Run Cuitty tests\n  uses: cuitty/test-action@v1\n  with:\n    files: \"**/*.ctest\"\n    env: |\n      BASE_URL=${{ vars.STAGING_URL }}\n      CUITTY_API_KEY=${{ secrets.CUITTY_API_KEY }}\n    fail-on: \"any\"\n```\n\nThe action uploads results to Test Studio and fails the workflow if any assertion breaks.\n\n## What's next\n\n- [Test DSL reference](/product/tests#dsl) — full syntax for suites, tests, variables, and assertions\n- [Test Studio](/product/tests#studio) — dashboard features, diffing, and trend analysis\n- [CI integration](/product/tests#ci) — GitHub Actions, GitLab CI, and generic webhook triggers\n- [Runner configuration](/product/tests#runner) — parallelism, retries, timeouts, and environment files",
  "links_out": [
    "/product/tests#dsl",
    "/product/tests#studio",
    "/product/tests#ci",
    "/product/tests#runner"
  ]
}