Related Entries

Quick Ref: SVN command line
Git with Dropbox
Cisco's new urbanism
Portable development links
Wish I had this 10 years ago

« Prime Minister sends a greeting card to Pak Prez
» Outlook 2003 + Flags = todo list

Sample Source : Watij and easyb

Simple example on how to link easyb and Watij to test web applications

Watij is a slick automation library to automate Internet Explorer. easyb is a good tool for behaviour driven development - BDD. Didn’t feel like going out on Sunday afternoon - decided to explore both.

Download a sample project that illustrates how to use both of these to automate testing of web sites. It has testing code as both easyb and junit tests. Unzip the file into a folder and read README.txt on how to use it. The project opens Google, searches for my name and verifies the search results.

Notes
  • It is actually pretty easy to code using Watij.
  • Get Microsft Internet Explorer Developer Toolbar and use it to easily inspect HTML elements. That helps you in quickly making tests.
  • IE DOM has every element and attribute in capital letters. If you are used to viewing HTML source to identify HTML elements, keep this in mind.
  • Unlike Selenium, with Watij, you are restricted to Windows and IE. Not very ideal.
easyb or junit?
  • junit makes it very easy to write tests with good IDEs. You don’t have to keep looking into Watij documentation when you have content-assist to help you with available functions.
  • easyb makes a customer friendly way to specify and report on test criteria.
  • My recommendation is to write tests as a scratch junit class, test it out and then move it to spec.