GWT
Jul 20, 2008
YUI and GWT As Viruses... How do you test?
by
Frank Cohen
—
last modified
Jul 20, 2008 10:42 AM
Filed Under:
The software industry is moving forward again to provide new ways to
build software. In the 1980's Apple and Microsoft produced operating
systems that included features to display standard user interface
elements to the desktop screen. Before that if you wanted to display a
menu bar you wrote code to draw the menus to the screen and more code
to let the user click a menu command. In the past 2 years Yahoo,
Google, and Appcelerator began publishing user interface frameworks for
browser-based applications.
Today, Yahoo, Google, and Appcelerator publish excellent software development kits to help organizations improve the usability of their Web applications. For instance, I added a menu bar to one of my Web applications by dropping-in a Google Web Toolkit (GWT) widget. The process took less than an hour.
Writing code is only half of the effort it takes to deliver high quality Web services. Service delivery requires testing: functional testing to ensure the application works, load and performance testing to ensure we have enough servers and bandwidth, and service monitoring to ensure we achieve a service level agreement.
Unfortunately, none of the new toolkits comes with a test system. Once you add a widget to your application, how do you test the application? From this perspective, Yahoo User Interface (YUI) and GWT are viruses that spread into your applications. While they help you get more functionality into your application they are little help at service delivery.
Some of the toolkits include support for unit testing and functional testing. For instance, GWT includes a unit test framework based on jUnit. Developers write jUnit test cases in Java to test asynchronous messaging between a widget and the back-end server. Setya has a good introduction to unit testing in GWT here. Developers may use test automation from PushToTest or The Grinder to automate operation of these test cases as load and performance tests. Additionally, some toolkits refer developers to use Selenium for functional testing at the browser user interface level.
Selenium is no cure-all for GWT testing. It is complex, requires learning its command syntax and language, has no sense of the Ajax event model, no operational data production to deliver test data, and has no sense of the schemas used to message the back-end. (PushToTest is working on these issues.)
I am calling for the toolkit publishers to deliver a complete solution. I urge the publishers to deliver their excellent frameworks, the cool widgets, and a powerful test framework and utility. The test framework understands and supports the event model of their widgets, the message schemas, and the widgets are fully instrumented with published APIs to make test authoring easy and efficient.
-Frank
Today, Yahoo, Google, and Appcelerator publish excellent software development kits to help organizations improve the usability of their Web applications. For instance, I added a menu bar to one of my Web applications by dropping-in a Google Web Toolkit (GWT) widget. The process took less than an hour.
Writing code is only half of the effort it takes to deliver high quality Web services. Service delivery requires testing: functional testing to ensure the application works, load and performance testing to ensure we have enough servers and bandwidth, and service monitoring to ensure we achieve a service level agreement.
Unfortunately, none of the new toolkits comes with a test system. Once you add a widget to your application, how do you test the application? From this perspective, Yahoo User Interface (YUI) and GWT are viruses that spread into your applications. While they help you get more functionality into your application they are little help at service delivery.
Some of the toolkits include support for unit testing and functional testing. For instance, GWT includes a unit test framework based on jUnit. Developers write jUnit test cases in Java to test asynchronous messaging between a widget and the back-end server. Setya has a good introduction to unit testing in GWT here. Developers may use test automation from PushToTest or The Grinder to automate operation of these test cases as load and performance tests. Additionally, some toolkits refer developers to use Selenium for functional testing at the browser user interface level.
Selenium is no cure-all for GWT testing. It is complex, requires learning its command syntax and language, has no sense of the Ajax event model, no operational data production to deliver test data, and has no sense of the schemas used to message the back-end. (PushToTest is working on these issues.)
I am calling for the toolkit publishers to deliver a complete solution. I urge the publishers to deliver their excellent frameworks, the cool widgets, and a powerful test framework and utility. The test framework understands and supports the event model of their widgets, the message schemas, and the widgets are fully instrumented with published APIs to make test authoring easy and efficient.
-Frank


