Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

rlisagor's freshen. A Python clone of Ruby’s innovative Cucumber testing framework. Tests are defined as a set of plain-text scenarios, which are then executed by being matched against test functions decorated with regular expressions. Has anyone used this or Cucumber? I’m intrigued but unconvinced—are the plain text scenarios really a useful way of defining tests?

Tagged , , , , , ,

11 comments

  1. Yup I'm doing it daily (using cucumber), and it does work. Although our tet now take about 2 hour to run which is a pane.

    Kind of hard to describe what it islike in a concise way

    marc - 5th January 2010 20:39 - #

  2. Yes I've used cucumber, and looked at freshen but not used in anger, I'm very glad it's implemented as a nose plugin.

    It's all about the different levels of testing. One interesting approach which I've seen cucumber put to is improving the quality of systems testing via cucumber nagios, an intro to which is here.

    http://www.kartar.net/2009/12/yes-mum-ill-behave-b eginning-behaviour-driven-infrastructure/

    Paul Nasrat - 5th January 2010 22:02 - #

  3. Are there examples of realistic tests using it? FIT is not that different (though it has a more explicit runner that parses the test data, I think). I see possible benefits to data-driven testing, but I'm skeptical of both this and FIT for that. Maybe because a spreadsheet or a text file doesn't seem rich enough to express interesting enough cases while still remaining readable.

    Ian Bicking - 5th January 2010 22:09 - #

  4. I've used this in the Ruby world, it's fantastic. I'm glad to now also have it in the Python world.

    Ycros - 5th January 2010 23:14 - #

  5. Yes, FIT is similar in some respects, with the table driven approach.

    These kinds of tests can really only be used as documentation to describe business rules, so operate at a very high level. They cannot replace regression testing, and low level unit testing, where specification semantics are not necessary. Some people talk about them being a "set of examples", or "live documentation" for an app.

    Personally, I don’t see specifications as a replacement for traditional unit testing, and I wonder that they may be subject to the same issues with brittleness as UI testing is.

    maetl - 6th January 2010 10:45 - #

  6. I've been using cucumber when working on Rails projects.

    I remain skeptic though. Maintaining a whole DSL for testing becomes a pain fairly quickly (especially when debugging tests).

    I think that making code-driven tests more readable is better than making readable text files executable.

    Leo Soto - 8th January 2010 03:59 - #

  7. @Ian

    There are a lot of real-world tests written on the ruby world using Cucumber. And at least the ones I've looked at are very readable.

    But that's because it's not just a plain file but a plain file plus a bunch of regexes and associated actions that you have to code and mantain and debug.

    Leo Soto - 8th January 2010 04:04 - #

  8. yeah.. nice one.Cucumber is one of the best and the healthiest fruit/food that I'd ever had. training employees | training programs

    david - 26th August 2011 15:30 - #

  9. I think I may have the same question "are the plain text scenarios really a useful way of defining tests?" Thanks, custom made cabinets custom cabinets ohio

    david - 26th August 2011 15:40 - #

  10. PQWPQMgI

    PbPvzMq - 8th October 2011 10:13 - #

  11. Medium duty shelving is one kind of storage racking with shelf. It’s named according to load capacity. According to this principle, loading capacity of medium duty longspan shelving is 150kg-800kg/level.

    Features of medium duty
    <a href="http://www.racking-shelving.com">shelving</a >
    1. Widely used for small items and heavy cargo. Loading capacity is 150kg-1000kg.
    2. Widely used for manpower handling, storage and selected. Suitable for various of storage and display.
    Structure of medium duty racking:

    racking - 9th November 2011 06:49 - #

Comments are closed.
A django site