Posted by editor
on December 23, 2008 at 7:59 AM PST
Swing finally gets testable? Also:
Java Today: FEST for testing Swing apps, OpenSSO Policy Agents, and pointilism meets pixelation
Featured Podcast: Java Mobility Podcast 65: Eric Arseneau, Go Small or Not at All
Weblogs: Mobile CloudDVR JavaFX demo at M3DDs, Felipe's quickie slides, and XML in Java refcard
Forum Posts: Query results, phoneME Advanced console output, new features in Metro security, trust and SecureConversation, and Java Linux arranged by distro
Swing finally gets testable?
It's no surprise that so many of the testing advocates are those who work in middleware or on the server side. It's a lot easier to whip up some some mock data or to can an http request than it is to exercise GUIs in exacting, reproducible ways. Modeling the clicking and dragging is hard, evaluating how the visual part of the interface responds is even harder.
Many Swing developers gave up on testability, or never even tried. But some continued to tough it out. For example, Alex Ruiz says:
I started by creating some very small Swing apps just for fun. Following my curiosity for testing, I found that testing UIs was a very fascinating challenge for many reasons. I realized that, to test UIs, unit testing was not as helpful as I wanted. Sure, I could test that my ActionListener performs some logic correctly, but I thought that it was not good enough. Unit testing of UI classes was as fragile as using mock objects: developers need too much knowledge of the internals of the UI. And, if the internals change without changing the actual UI behavior, tests can fail miserably. I also understood that testing UI-related classes in isolation could not give us confidence that the UI, as a whole, behaved as expected in front of the user. In order to be effective, tests needed to verify the behavior of a UI as if a user was actually using it.
I started looking into open source tools for functional tests of Swing UIs. Although all of them could simulate user input successfully by using the AWT Robot, they were not as usable as I desired. My first impression was that their APIs were too verbose, making creation and maintenance of UI tests quite tedious.
Then my wife, Yvonne, and I started doing some experiments with fluent interfaces, which ended up as FEST . From that point on, the project has grown thanks to the feedback and contribution of its users.
In Swing, UI testing and beyond - interview with Alex Ruiz , Kirill Grouchnikov talks with Alex about FEST (Fixtures for Easy Software Testing). He discusses whether testing tools and APIs should be part of UI toolkit core distributions, what Swing's pain points are and what Swing needs going forward, the feasibility of extending FEST to SWT and JavaFX, and more.
Also in Java Today , Sean Brydon and Aravindan Ranganathan introduce OpenSSO as a Java EE security solution in the SDN article Protecting Java EE Applications With OpenSSO Policy Agents, Part 1: Basic Steps . "By installing a Policy Agent at the application-server instance on which your applications are deployed and then configuring the Policy Agent, you can enforce authentication, single sign-on (SSO), and authorization. During installation, classes that can secure the deployed applications are added to your application-server instance. Subsequently, you can also enable Web-service security, personalize applications for users, and map to the Java EE security mechanisms."
Paul Reiners shows how to animate images in unexpected and artistic ways using the Java 2D API and cellular automata in the article Pointillism meets pixelation . In the process, he demonstrates implementation of an image operator in Java code and explains cyclic space, a type of 2D cellular automaton. You can use the ideas from this article to create your own image operators and artistic programs using Java technology.
The latest Java Mobility Podcast is
Java Mobility Podcast 65: Eric Arseneau, Go Small or Not at All
Eric Areseneau, M&E Governance Board member and Squawk project lead, was recently written up as a Contrarian Mind. Listen to his ideas on getting a Java Virtual Machine in small embedded systems.
Today's Weblogs begins with Terrence Barr showing off the mobile version of the popular CloudDVR JavaFX demo in JavaFX Mobile: See and learn at M3DD "When I do this demo and show the application run consistently in parallel on a desktop as well as on a mid-range phone I typically get raised eyebrows and hear things like "Hmm - this is impressive. Where can I find out more?" . Well, in January you can find out more - at Java Mobile, Media, and eMbedded Developer Days (M3DD)."
Felipe Gaucho has posted
My slides from Devoxx 2008
Quickies are a nice opportunity to introduce a new project and train your presentation skills during Devoxx conference and, in 2008, I had the privilege to present 3 Quickies about my Open-Source projects.
Masoud Kalali announces that his Using XML in Java refcard is available for download as free as speech . "If you are new to using XML in Java then this refcard is definitely for you. It discuss XML utilization in Java along with performance comparison of DOM, SAX and STAX, validation, XSD, DTD, Xpath and general XML descriptions."
In today's Forums ,
tonhinbm needs help, because Query.getResultList() don't show database updates . "The problem is that the first time I execute query.getResultList() it reads data from database, but if database change after, I can't see that changes until I close or clear entity manager. Is there any way to force query.getResultList() reads data ALWAYS from database without clearing or closing entity manager."
davyp explains phoneME Advanced configuration in
Re: No console output . "For my pMEA builds you need to install a command shell to see messages printed on standard out (pMEF CLDC has its own shell environment). Follow the instructions in the "Run phoneME Advanced" section at: http://www.cs.kuleuven.be/~davy/phoneme/advanced.htm "
V B Kumar Jayanti is asking for feedback on
New Features in Metro Security, Trust and SecureConversation . "We would like to solicit your feedback/comments on the following proposed New Features in Metro Security, Trust and SecureConversation areas 1. Support for Password Derived Keys : http://wikis.glassfish.org/metro/Wiki.jsp?page=PasswordDerivedKeys . 2. Issued Token Caching and Sharing, SSO among services : http://wikis.glassfish.org/metro/Wiki.jsp?page=SSO . 3. WS-Trust Renew and Cancel Protocols : http://wikis.glassfish.org/metro/Wiki.jsp?page=TokenRenewingProtocol . 4. Support for WS-Trust version 1.4, WS-SecureConversation version 1.4 and WS-SecurityPolicy version 1.3 : http://wikis.glassfish.org/metro/Wiki.jsp?page=NewWSSXSpecs . Please note that the review period is 1 week. Comments received after that may not be considered for this release."
jstansel has a suggestion for distro-specific installers, in Re: Java/Plugin installation on Linux . "You may want to check out the jdk-distros https://jdk-distros.dev.java.net/ project. I know it's used by several distros including Debian and Ubuntu. The icedtea project is also used by several distros. In ubuntu this is used for the openjdk6 packages, which have a system installation / integration design nearly identical to the sun-java6 packages. In Linux it's generally better for a user to install using a distro package, rather than downloading from Sun, but I wouldn't hold my breath for the deployJava script to help with that."
Current and upcoming Java
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
Today RSS feed . Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the
Swing finally gets testable?