Back to Blog
Tutorial

Emily Watson8 min
Pg Up

Traditional QA scripts rely on brittle selectors and API mocking. When UI changes, your tests break. The Coasty Computer Use API solves this by letting an AI agent drive a real computer like a human. It sees what you see, clicks, types, and verifies results. Build a self-running QA bot that finds bugs your unit tests miss.

How a QA testing bot works with Coasty

A QA bot starts by provisioning a cloud machine with POST /v1/machines. The agent then creates a task run with POST /v1/runs. The task contains the application URL and a step-by-step plan. The run API charges $0.05 per agent step. The server executes the plan, pausing when it needs human approval. When the run finishes, you inspect the events stream to see every action and outcome.

bash
# Provision a cloud machine
COASTY_API_KEY=$COASTY_API_KEY curl -s -X POST https://coasty.ai/v1/machines \
  -H "X-API-Key: $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "qa-bot-machine",
    "os": "ubuntu-22.04",
    "disk_size_gb": 50
  }' | jq .

Create a QA task run

  • POST /v1/runs starts the agent on a provisioned machine_id.
  • Provide a task with the app URL and test steps.
  • Set cua_version to v4 for autonomous execution with pass/fail verifier.
  • The bot runs until success, failure, or max_steps is reached.
  • You pay $0.05 per agent step.
bash
# Start the QA bot on the machine
COASTY_API_KEY=$COASTY_API_KEY curl -s -X POST https://coasty.ai/v1/runs \
  -H "X-API-Key: $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "machine_id": "machine-abc123",
    "task": "Open https://example.com and verify the title contains "Example Domain"",
    "cua_version": "v4",
    "max_steps": 50,
    "deadline_seconds": 600,
    "on_awaiting_human": "pause"
  }' | jq .

POST /v1/runs charges $0.05 per agent step and returns a run_id you can monitor.

Where this beats brittle automation

API mocks can only test what you expose. Real QA bots with computer use drive the same browser you see. They handle dynamic text, hidden elements, and UI changes without selector updates. You get visual QA, not just contract checks. This means you catch layout bugs, broken images, and misaligned buttons that unit tests never see.

You now know how to build a self-running QA bot with the Coasty Computer Use API. Start by provisioning a machine and launching a run. Add more steps to your task to cover login flows, checkout, or admin workflows. Build a workflow DSL for complex test suites and integrate events into your CI pipeline. Get a key at https://coasty.ai/developers and ship more reliable software.

© 2026 Coasty

Backed byYCombinator