Maven Integration for Lebowski

12 views
Skip to first unread message

BrandonK

unread,
Dec 22, 2011, 5:39:40 PM12/22/11
to lebowskifw
Hello,
I was wondering if anyone has had any experience integrating Lebowski
into a CI framework. In particular, are there any best practices on
how to have Lebowski tests run during the test cycle of Maven? The
problem I see is that to run Lebowski, you need to issue 'lebowski-
spec <lebowksiTest.rb>', which prevents us from using any rspec plug-
in, no?. Unfortunately, there does not seem to be anything like a
Lebowski Maven plug-in, similar to how Java has surefire.

I have a bash script that currently spins up our Sproutcore
environment as well as the Lebowski server. It then will launch the
Lebowski tests by running the 'lebowski-spec' command, log the
results, and then shut down both Sproutcore and Lebowski servers. It
does look as though I can use the Maven 'exec' plug-in to launch the
bash script, but I'm not sure there is a way to have the exect plug-in
halt the rest of the build process based on the outcome of the
script.

Does anyone know whether there is a way to have the exec plugin halt
on, say, a non-zero return value from the command it executes?
Is there a better way to integrate Lebowski into Maven besides exec?

Also, does anyone have any experience in transforming the rspec test
output into something similar to Maven's Surefire plug-in's XML?

MikeC

unread,
Dec 22, 2011, 8:13:35 PM12/22/11
to lebowskifw
Hey Brandon,

lebowski-spec is a way to conveniently run specs with rspec that
automatically includes the following Lebowski modules:

Lebowski::Foundation
Lebowski::Foundation::Views
Lebowski::Foundation::Panes

As well, lebowski-spec automatically includes special rspec extensions
I created to help make your scripts more readable. Example:

some_view.should have_value "foo"

Although lebowski-spec is provided, you do not have to use it. You can
use rspec as is or any test automation framework for that matter. If
you do use plain old rspec to run your specs, you are then responsible
for adding the various Lebowski modules; however, using rspec by
itself means you have more flexibility in how you can integrate the
scripts into your CI environment.

I can't speak directly to Maven as it's been a while since I've used
it, but if you use rspec by itself then you can use the rspec plug-ins
to get you moving ahead.

-Mike
Reply all
Reply to author
Forward
0 new messages