Java Virtal

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

14151617 181920

[ Archives News
for 'Java Technology' ]

home > news > java technology > example-driven testing with easyb

Example-driven testing with easyb

Easyb is a powerful and elegent Behaviour-Driven Development (BDD) tool based on Groovy. It excels at being light-weight, highly readable, and easy to use. Lately, I have been using it with great success in combination with Selenium 2/WebDriver Page Objects for the automation of acceptance and regression web tests (ATDD). I'll discuss that in a future blog. But in this article, I want to give a sneak preview about a particularly nice feature due out in the next release. The soon-to-be-released next version of easyb introduces some very cool features, one of the most useful of which is probably support for example-driven testing. This feature exists in other BDD frameworks such as Cucumber and JBehave, but has so far been notably lacking in easyb. The new version of easyb introduces the (synonymous) where and examples keywords, which let you define sets of test data that will be used in your scenario. This test data is associated with variables, that you can use in your scenarios, as shown here:   examples "The number #{number}' should be converted to #{romanNumerals}", { number = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] romanNumerals = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"] } You can use either examples or where, and place the test data before or after your scenarios, depending on what reads best.       Once you have set up your test data, ...

Date: September, 22 2010

Others News

© web editor | easy free website builder | best website builder software | bootstrap buttons | bootstrap image slider