Digital Twin Security

Blog / Guide

How do you write a good test scenario for a robot?

A good robot test scenario is an ordinary situation with one or two things going wrong, written so it can be run many times. How to write one.

The Digital Twin Security teamPublished Updated 2 min read

GUIDEWriting robottest scenariosDIGITAL TWIN SECURITY

Short answer: A good robot test scenario is an ordinary situation with one or two things going wrong, described precisely enough to be run many times and replayed. At Digital Twin Security a scenario can be written in plain words, and an AI turns it into a test in a simulated copy of the place.

Book a demo

What makes a good test scenario?

  • It could happen. A scenario from an ordinary working day teaches more than a freak event.
  • It has a clear goal for the robot, such as finishing a delivery inside its area.
  • It changes one or two things: the weather, a person, a fault, a command.
  • It can be repeated, with small shifts in timing from run to run.

How do you choose what to change?

Start from what the site makes likely. A port has wind and cranes. A city street has tall buildings that block the satellite signal. A warehouse has blocked aisles. Then put two of the likely things together, because that is where robots fail.

How precise does a scenario need to be?

Precise enough that two people would build the same test from it. "A pedestrian crosses" is not a test. "A pedestrian steps out from behind a parked van when the vehicle is twenty meters away, in light rain" is.

Do you have to write scenarios in code?

Not with us. A scenario can be described in plain words. An AI builds the place and the test from the description, after checking that the situation could really happen. Tests can also be chosen from a built in library.

Who writes test scenarios for robots?

Digital Twin Security writes them with you or for you, runs them, and reports what failed. The wider method is in how to red team an autonomous robot.

Frequently asked questions

How many scenarios does a robot need?

Enough to cover each kind of condition, fault and command it will meet at its site.

Should scenarios include rare events?

Ordinary conditions combined find more failures than rare events do.

Can a failed scenario be replayed?

Yes. Each run is set by a number, so the same number replays the same run.