Over a million developers have joined DZone.

Behavior driven development: Generating Groovy EasyB Story with Selenium IDE

· Java Zone

Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management, brought to you in partnership with Stormpath.

Are you an easyb user which would like to create story that run selenium's commands? You can let's Selenium IDE generate it for you instead of code it by your hand.

I try to google selenium and easyb, I couldn't found format of Selenium IDE to generate easyb story. So, I decided to create one myself for automated testing of grails project.

Below is the code generated for scenario of google search for "hello world" for your reference:

import com.thoughtworks.selenium.*
import java.util.regex.Pattern

before "start selenium", {
given "selenium is up and running", {
selenium = new DefaultSelenium("localhost",
4444, "*firefox", "http://www.google.com.my/")

scenario "Enter scenario description here", {
then "Enter any description here", {
selenium.getTitle().shouldBeEqualTo "Google"
selenium.type("q", "hello world")
selenium.getTitle().shouldBeEqualTo "hello world - Google Search"

after "stop selenium", {
then "selenium should be shutdown", {

You can find out more information from the URL below:


Building Identity Management, including authentication and authorization? Try Stormpath! Our REST API and robust Java SDK support can eliminate your security risk and can be implemented in minutes. Sign up, and never build auth again!


The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}