►
Description
Subplot (https://subplot.tech/) is a set of tools for specifying, documenting, and implementing automated acceptance tests for systems and software. Subplot tools help produce a human-readable document of acceptance criteria and a program that automatically tests a system against those criteria.
This talk by Lars Wirzenius was recorded at Rust Finland meetup 9.5.2022 hosted by Futurice
Lars Wirzenius: https://liw.fi/
Rust Finland: https://www.meetup.com/Finland-Rust-Meetup/
Futurice: https://futurice.com/devbreakfast
A
A
A
So
let's
say
that
you
are
a
software
consulting
company
who
has
gotten
a
really
large
customer,
say
airbus,
who
desperately
need
a
an
implementation
of
the
unique
seek
command
seek,
is
a
simple
command
in
unix,
where
you
run
seek
and
a
number,
and
it
writes
out
every
number
of
one
to
that
number.
You
give
it,
and
this
program
is
worth
airbus
one
billion
dollars,
but
it
has
to
work.
It
has
to
be
exactly
correct
if
it's
not
correct,
planes
will
fall
down.
A
A
And
if
you
run
seek
with
the
number
zero
argument,
it
should
produce
no
output,
but
it's
not
an
error,
and
so
on.
Comparing
these
two
there
is
a
scenario
that
verifies
that
seek
works.
The
way
it's
supposed
to
take
was
supposed
to
work,
and
the
scenario
consists
of
steps.
A
A
And
there's
a
lot
of
these
scenarios,
I'm
gonna
go
through
all
of
them
in
detail.
No,
I'm
not
also
some
more
error
cases.
A
Instead,
we
have
a
way
to
map
a
scenario
step
to
a
function
which
might
be
written
in
rust
or
a
different
language.
In
this
case
they
are
erased
and
on
line
one,
we
not
just
say
what
this
step
should
look
like,
but
we
capture
a
part
of
the
step,
the
count
which
is
some
digits,
also
known
as
an
unsigned
integer
integer.
A
A
A
A
The
function
gets
the
something
called
a
context
as
a
an
argument,
which
is
the
context
of
running
that
scenario
and
an
argument
called
count,
which
is
an
unside
integer.
That
is
the
captured
value
from
the
step,
and
then
it
does
things
like.
It
compares
the
number
of
lines
in
the
actual
output
with
what
is
what
was
expected
and
if
that's
wrong,
then
it
throws
an
error.
A
A
A
A
A
And
some
things
can't
be
tested
easily
or
can't
be
tested
automatically.
Subplot
is
about
automatic
testing,
but
there
are
things
that
are
really
hard
to
test.
The
thing
I'm
working
on
that
I
get
paid
to
work
for
is
an
encryption
tool.
Sequoia
pgp,
one
of
the
requirements
we
have
is
that
it
needs
to
be
legal.
A
How
do
you
test
if
something
is
legal
automatically
for
every
committee,
and
there
are
there
are
even
today,
there
are
cases
when
the
tool
I'm
working
on
for
my
in
my
day,
job
is
not
actually
legal
anymore.
A
A
We
knew
about
cucumber
and
we
knew
about
gerkin,
but
this
didn't
fit
the
things
that
we
thought
we
needed.
So
we
discussed
this
and
the
following
weekend.
I
wrote
something:
that's
called
yarn:
it
was
a
few
hundred
lines
of
python.
It's
entirely
crap,
don't
look
it
up,
I
will
be
ashamed
and
but
it
proved
to
be
useful
and
I
used
yarn
for
most
of
the
2010s
until
2019
when
we
decided
that
okay,
we
have
proven
that
this
concept
works.
Now
we
need
to
do
it
well
and
that
was
born.
Fable.
A
A
It
has
many
colors
many
different
shapes
of
blobs,
so
subplot
reads
a
markdown
file,
which
is
the
actual
document,
and
then
it
reads
the
yaml
file
that
I
showed
earlier,
which
is
we
called
it
bindings
and
then
one
or
more
trust
or
python
or
bash
files
that
contain
the
stapling
step
implementations
and
it
then
outputs
either
a
pdf
in
nicely
typeset
form.
That's
the
one
that's
going
around
here
or
html,
or
some
test
code
that
can
be
run
later.
A
We
do
this
in
our
free
time
with
a
two
week
iteration.
So
every
other
saturday,
we
have
a
two
to
four
hour
meeting,
because
meetings
are
great
well,
our
meetings
are
actually
great
and
we
wish
other
people
would
join
and
it
progresses
slowly
because
we
are
taking
it
taking
it
closer
that
we
have
fun
while
doing
this,
if
it
stops
being
fun,
there's
no
point
in
wasting
much
free
time
on
it.
A
A
A
A
Oh,
it
says
that
the
last
step
that
it
tried
to
run
is
given
a
manifest
of
the
directory
live
in
initial
yamo
that
failed.
Let's
look
at
the
log
file
again.
A
I'm
not
going
to
try
to
fix
this.
I
know
it
worked.
The
last
time
I
tried
this
on
a
different
computer
in
a
different
place,
so
everything's
fine,
but
this
is
what
using
subplot
is
like
you
generate
the
test.
You've
realized
that
you
need
to
build
your
tests.
You
build
your
program,
you
generate
your
tests.
You
run
the
tests,
you
figure
out
what's
wrong.
This
is
exactly
like
all
other
software
development,
except
a
little
bit
more
detached
because
you
don't
edit
the
actual
program
really
fall
from
which
the
program
gets
generated.
A
That's
the
thing.
That's
actually
meant
to
be
understandable
to
other
people
so
that
they
know
how
things
are
verified
and
why
those
verifications
are
necessary
and
so
far
it
has
worked.
Fine.
We
don't
have
a
huge
number
of
users,
but
I
do
do
use
this
that
were
in
in
my
work
as
well
and
just
this
week
and
the
co-worker
found
a
problem
using
subplot
because
something
changed
in
the
rosclap
library
so
that
certain
arguments
that
used
to
work
but
got
ignored,
no
longer
get
ignored.
So
no,
that's
an
error.
A
A
A
So
having
that
archive
is
better
than
generating
on
the
fly.
Because
who
knows
what
python
13
will
look
like.
A
A
One
of
the
things
that
would
be
really
beneficial
for
us
is
us,
meaning.
Those
developing
support
at
the
moment
is
more
people
who
like
to
use
this
and
have
different
kinds
of
requirements
than
what
daniel
and
I
have
also,
if
any
of
you
knows
how
to
use
latex
to
produce
beautiful,
typed
output,
please
contribute
the
output
that
we
currently
produce
is
a
little
basic
could
be
improved
massively.