easyb 0.9.6 released

Posted by: Andrew Glover on 2009-09-16 15:29:00.0

The easyb team is excited to announce that version 0.9.6 is out! This version adds a number of hip features including:
0.9.6 is released!

  • Re-running failed behaviors
    • this is one of my favorite features of TestNGeasyb will create a file listing failed behaviors via the -outfail option, which can be passed via the command line or via Ant
    • Just pass in the -f flag via the command line or Ant (see next bullet) to run those failures only
  • Running behaviors listed in a file
    • Pass in the -f flag as mentioned above via the command line or Ant along with a path pointing to a file and only those behaviors listed will be run
  • Running behaviors in parallel (via the -parallel option)
  • A new ensure sytle method dubbed ensureUntil, which supports the notion of a timeout
    • For example, the behavior below from easyb’s source leverages this new feature and demonstrates that the ensureUntil call will run the code inside the passed in closure for 4 seconds (you can see that the executed closure’s (delayedClosure defined early) value changes after 2):

      scenario "Another passing verification", {
        then "Condition passes", {
          var = 20
          delayedClosure = {i ->
            Thread.sleep(2000)
            return (i += i)
          }
      
          var = delayedClosure(20)
          ensureUntil(4) {
            var.shouldBe 40
          }
        }
      }
  • Ant task updates to support new command line features mentioned above (such as -f and -outfile, man)
  • Shared behaviors
    • you can create a base behavior (at this point it must live within the context of a single story (i.e. a file)) and then refer to that behavior inline using the keywords shared_behavior and it_behaves_as like so:

      shared_behavior "shared behaviors", {
        given "a string", {
          var = ""
        }
      
        when "the string is hello world", {
          var = "hello world"
        }
      }
      
      scenario "first scenario", {
        it_behaves_as "shared behaviors"
      
        then "the string should start with hello", {
          var.shouldStartWith "hello"
        }
      }
      
      scenario "second scenario", {
        it_behaves_as "shared behaviors"
      
        then "the string should end with world", {
          var.shouldEndWith "world"
        }
      }
  • This version leverages Groovy 1.6.4 too

Once again, thanks to the easyb community for numerous suggestions, comments, and patches! So what are you waiting for? Download easyb 0.9.6 now and have a blast verifying your Java applications, baby!

You can now follow The Disco Blog on Twitter, baby!


be the first to rate this blog


About Andrew Glover

Andrew is the founder of the easyb BDD framework and the co-author of Addison Wesley's "Continuous Integration", Manning's "Groovy in Action" and "Java Testing Patterns". He is an author for multiple online publications including IBM's developerWorks and Oreilly's ONJava and ONLamp portals. He actively blogs about software at thediscoblog.com.