Skip to content
Pine Computer Request access
Menu

24 / 26 Engineering and QA · Example

Test a web app

Your users write test steps in plain English, and each run follows them in a real browser and screenshots every step.

Illustration of an example: your testing platform runs three test plans on staging, each on a new computer. The checkout plan’s nine steps, written in plain English, run in a real browser; each step gets its screenshot and a pass. Step 9 expects “Order placed” but the page says “Order received”, so it fails, its screenshot shows why, and the run asks your user whether the change is expected.
Who it’s for
Testing tools whose users would rather write “add two items and check out” than maintain selectors.
Why it’s hard
Scripted tests break when a button moves or a label changes. A step only passed if the page afterwards says so, and someone has to read it.
You get back
  • A pass or fail for every step, with its screenshot
  • For each failure, what the page said instead
  • Changes your user accepted, noted in the report

Every run starts on a new computer, so no sign-in or half-full basket is left over from the last one.

How it runs, in your product’s code

Your user picks the plans, and each gets a fresh computer. After every step it’s told what changed on the page, and decides from that whether the step passed. When the page says something the plan didn’t expect, like “Order received” where step 9 wants “Order placed”, the run stops and asks your user: bug, or expected change? The report lists each step as passed or failed, with its screenshot.

Ruby · task-turn excerpt
# Existing backend Computer and session; see setup docs.# saved_message_id is your durable ID for this request.computer.require_agent_protocol!agent = session.agentgoal = <<~JOB  Run the checkout plan on staging. Follow each written step,  screenshot it, and report what passed and what didn’t.JOBturn = agent.run(goal, idempotency_key: saved_message_id)# Persist turn.turn_id before waiting or leaving this process.turn = agent.wait(turn_id: turn.turn_id, timeout: 30)case turn.statewhen "running", "canceling"  # Schedule another wait for this turn ID.when "needs_input"  # Present turn.question; authorize any desktop handoff.  # When the user replies, answer this turn and save the new ID:  # agent.answer(turn_id: turn.turn_id, answer: reply.text)when "answered"  # Continue with turn.next_turn_id; do not resubmit the goal.when "completed"  turn.result.artifacts.each do |file|    bytes = session.read_file(file.fetch("relative_path"))    # Save bytes in your own file store before stopping.  end  # Verify the outputs and external state against the request.when "failed", "canceled"  # Record the outcome; check side effects before any retry.end

Requires a configured Computer, session and durable request ID. The comments mark application logic you supply; this excerpt does not implement storage, polling or human handoff. Agent integration · Saving outputs

Build more.
Hand AI the work.