FEST + Easyb: making UI testing easier - No Fluff Just Stuff

FEST + Easyb: making UI testing easier

Posted by: Andres Almiray on May 3, 2008

FEST stands for Fixtures for Easy Software Testing, it targets UI testing (Java Swing for the time being). Easyb makes Behavior Driven Development a snap. Use them together and you have a recipe for success. Let's revisit a previous example of FEST+Groovy, a very basic app that retrieves the definition of a word the user may type (very basic as it currently responds to a single word: pugnacious, but whose counting words ;-)) Testing the happy path is pretty straight forward

Quick and to the point and quite understandable if you ask me, but the thing is that only developers like to read code. UI testing is not exactly a task developers like to do and is usually delegated to people that handle specs and lengthy docs. This is where easyb comes in, I'll let the code speak for itself

As you can see the actual code is exactly the same, but there is a nice separation of preconditions, effects and assertions, and if you enable reporting you get the following output
1 scenario (including 0 pending) executed successfully

  Story: easyb fest

    scenario User writes a word available in the dictionary
      given WordFinder's UI is shown
      when user types the word 'pugnacious'
      when user clicks on the find button
      then the correct answer is displayed (Combative in nature; belligerent.)
      then the UI shutdowns itself

Now that is more like it don't you think? The very nature of easyb makes writing scenarios and stories quite simple, as a matter of fact anybody can do it. Once they are written a developer takes the executable spec and writes the code that makes the tests turn green, and everybody is content. I'm so loving easyb... :-D

Keep on Groovying!
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »