[rspec-devel] Stories vs. examples

Ian Dees undees at gmail.com
Thu Nov 8 02:25:23 EST 2007


Says me:

> > then either the same tester or
> > another developer translates the use cases into RSpec (with the help
> > of some automation).

Quoth Bryan:

> Care to share any details on the kind of automation you've got for
> this right now?

Sure.  We use a requirements management tool (not nearly as dreadful
as it sounds; in fact, it almost exactly matches what I used to do by
hand in Excel, but more reliably) to write our test cases and document
which requirements they address.

We then use the tool's built-in scripting language (an insane pidgin
that's been referred to as "designed by a committee that's never met")
to spit out a new Ruby file with a "describe" block per test case and
an "it" block for each _step_ of the test case.  The meatier parts of
the test case get injected as Ruby comments.  We fill in the behavior
of each test to get 'em from "pending" to "passed," and attach the
completed RSpec scripts to the test case.

So now we can direct the RSpec UI tests from the requirements
management tool: we run a script that takes one or more test cases,
does some hideous OLE magic to get the Ruby code into the file system,
runs RSpec, and logs the results back into the tool.

We can probably cut down on some of those steps if we move to the
Story Runner, which is why I'm particularly interested in where the
plain text runner stuff is going.

--Ian


More information about the rspec-devel mailing list