[ANN] Morelia Viridis - a Python BDD framework

22 views
Skip to first unread message

Phlip

unread,
Feb 4, 2010, 2:55:11 AM2/4/10
to cu...@googlegroups.com
Cukesters:

The page at http://c2.com/cgi/wiki?MoreliaViridis fully writes-up MV. This post
goes directly to the shtick.

The shtick is very simple. When you write a Feature file with Cuke-style
Scenarios, and they contain a line like this...

When the client pays us $10,000

...Morelia calls a Python method, in your TestCase, like this:

def step_the_client_pays_(self, wampum):
r'the client pays \$([0-9,]+)'

# python code here to assert the situation

So the shtick is Morelia uses doc-strings not as documentation (perish the
thought!), but as the regular expressions that match Feature source lines.

Building on that core functionality, Morelia supports all these goodies:

- bond directly to stock TestCase suites, with no extra magic or glue code
- share any conceivable test fixtures with those TestCases
- run whenever your test cases run
- call your setUp() and tearDown() methods correctly around each Scenario
- convert arbitrary regular expressions into arbitrary step_ method args
- pass variables between steps in a scenario as self.vars
- display diagnostics as test faults, WITH the Feature file source line!
- roll repeated variables with differing values up into |tables|
- convert into correctly decorated HTML reports
- evaluate multiple When blocks separately in a Scenario
- understand code # comments, and warn on bad syntax

Get it with pip install Morelia, and good hunting!

--
Phlip
http://zeekland.zeroplayer.com/Uncle_Wiggilys_Travels/1

Reply all
Reply to author
Forward
0 new messages