Forum: RSpec generate user-readable tests from Rspec tests?

75922ac4f2093a8c0149b10592bb9093?d=identicon&s=25 wolf volpi (wolfv)
on 2011-09-12 02:48
I have been writing manual tests and dabbled in Cucumber.  I like that
end users can read the Cucumber tests.  Is there a way to generate
user-readable tests from Rspec tests or Watir tests?

Thank you.
7bb0d7e74198c735783b8a65cd14989c?d=identicon&s=25 Sidu Ponnappa (kaiwren)
on 2011-09-12 10:26
(Received via mailing list)
You can write your own Formatter[1] if the existing ones don't work for
you.
The default RSpec document format is already available[2] - just pass
`--format doc` as a param when running the specs.

Best,
Sidu.
http://c42.in
http://blog.sidu.in

[1] http://cheat.errtheblog.com/s/rspec/
[2] https://github.com/jeffkreeftmeijer/fuubar
75922ac4f2093a8c0149b10592bb9093?d=identicon&s=25 wolf volpi (wolfv)
on 2011-09-13 01:51
Sorry my question was not clear.

Sidu Ponnappa wrote in post #1021398:
> You can write your own Formatter[1] if the existing ones don't work for
> you.
> [1] http://cheat.errtheblog.com/s/rspec/
I am mostly testing Java web applications (I do not know Rails).  Will
Formatter[1] work without Rails?

> The default RSpec document format is already available[2] - just pass
> `--format doc` as a param when running the specs.
> [2] https://github.com/jeffkreeftmeijer/fuubar
I watched the video and it looks like it just outputs test results.  I
need to output a test-narrative similar to:
  Given some context
  When some event occurs
  Then I expect some outcome.
Then the end users will review the test-narrative before we start
development. Is there a tool that can generate a test-narrative from
Rspec tests or Watir tests?

Thanks Sidu.
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2011-09-13 08:16
(Received via mailing list)
On Sep 13, 2011, at 1:51 AM, wolf volpi wrote:

>> `--format doc` as a param when running the specs.
>> [2] https://github.com/jeffkreeftmeijer/fuubar
> I watched the video and it looks like it just outputs test results.  The
> output should be a test-narrative similar to:
>  Given some context
>  When some event occurs
>  Then I expect some outcome.
> Then the end users will review the test-narrative before we start
> development. Is there a tool that can generate a test-narrative from
> Rspec tests or Watir tests?

See
https://www.relishapp.com/rspec/rspec-core/docs/co....
Also, you can get a good start by typing `rspec help`.

HTH,
David
75922ac4f2093a8c0149b10592bb9093?d=identicon&s=25 wolf volpi (wolfv)
on 2011-09-13 12:03
Now I understand better.  Goggling "rspec formatter" shows that there
are formatters for progress, documentation, and html.  This will make
more sense after I learn Rspec.

Thank you David and Sidu.
This topic is locked and can not be replied to.