Fork me on GitHub

Thursday, December 25, 2008

Which color am I?

Your rainbow is shaded white and indigo.


What it is says about you: You are a contemplative person. You appreciate cities, technology, and other great things people have created. People depend on you to make them feel secure. Friends count on you for being honest and insightful.

Find the colors of your rainbow at

Well I am happy :)...

Friday, December 12, 2008

Announcing FlashWatir and Silverlight-Selenium

Well two of my open source projects have gone live. I am really happy that I can bring them open and it will be useful to people who want to test applications with these RIA technologies. I have always been an advocate of testability and whenever a new glossy technology comes testability goes for a toss and this has been a concern to me for a long time. With these two projects I hope I have played a small part in bringing testability for flash and silverlight.

For those who want to use it flash-watir is available as a gem as well as source in SVN. Please visit the FlashWatir Google Code Project. Read the docs, play around with the source. If you have any questions or want to contribute, let me know.

Silverlight-Selenium is available as of now in Java (I know silverlight is .Net stuff :D but it won't take long to write it in other languages). Please visit the project Silverlight Selenium.

Let me know if you have any questions or feedback.

I thank Paulo Caroli for helping me out in understanding flash testability. As well pairing with me for silverlight-selenium and showing how to do TestDriven Development :). Thanks for Jeya for pairing with me and setting up the silverlight ennvironment.

P.S. Work on silverlight extension for Watir in on the way.

Friday, December 5, 2008

Test Drivers, Frameworks and Harness

Edited on 20 March 2009 - Added the last paragraph about JUnit

Wanted write about this for a long time. People tend to ask me if Watir is a framework or does Watir read Excel or how to connect to database from Watir and questions similar to that. This is not a Watir specific post but some understanding I have about these three important components of any automated testing. I wrote this because I feel that people tend to ask these questions because they don't understand the function of these three components. So here it goes...

Test Drivers - They drive the application. If you are connecting directly to domain or service layer you will not have an external one most probably, the API itself will be the driver. But if you driving tests through GUI interface or may be a remote service, then you will have a GUI driver or something like a webservice driver to drive the application. Libraries like Watir, Selenium, WebDriver or SOAP4R (to drive webservices through SOAP) fall into this category. They are not testing tools but you can very well build one on top of them.

Test frameworks - Scaffolding to start your testing. Nobody will start writing tests from scratch every time.Framework acts as the base infrastructure so that we don't need to care much about it. It will have things which can be reused across our tests but not specific to application mostly like connection to database, writing log or reading and writing to Excel. Normally we start with a generic framework and as we write tests we tend to build abstractions of our domain and slowly project specific abstractions and functions grow into the framework.

For example in JUnit, TestCase class is a framework part. It gives you assertions. Similarly Taza framework for Watir gives you generators, integrates with Rspec for assertions and reporting (It is a framework with frameworks inside ;)).

Test Harness - They are used to execute the tests we write. Like JUnit test runner or RSpec test runner. Most of the time harness will be coupled with a framework but it is possible to create a generic harness not coupled to a framework as long as the framework follows some kind of contract that harness enforces. Like in JUnit any method annotated as test will be picked up by the test runner to be executed as test.

What I have written is a view I developed when working with these components over years. You may have a different perspective. If so let me know. Your comments and views are welcome.

One more thing... A common question I get is why I use JUnit or RSpec which are meant for unit testing. Junit and RSpec are test frameworks. You can run pretty much any code inside them. It is incidental that they are used for unit testing because they are simple and light weight.