Book Review: Swing Extreme Testing

May 6th, 2009 | by Tonny Kohar |

There are many books published which describe on how to write unit test eg: using JUnit for Java program. Those books are come from simple-complex scenario depending on the book target reader. However, there are only a few which specialized on User Interface testing. So if you ever wondered on how to test Java GUI, then Swing Extreme Testing by Tim Lavers and Lindsay Peters from Packt Publishing might interest you.

Because there is already review of this book by Alex Ruiz who focused on pro and cons, so in this review I will focus on the book’s content itself.

Swing Extreme Testing book is come with 311 pages. The chapters structure is nice and follow the logical step and easy to follow. This books use real life application as the example rather than using imaginative sample. The content is very interesting it start with the methodology (Extreme Testing) as the author called. What needs to be tested, who is to write the tests, when they are to be written, so on. Then go to management of test class and test data. And the testing of User Interface itself. This books also describe the technique to test JavaHelp, ResourceBundle Testing, Server and User Interface Testing, and Multiple JVM testings.

In this books, the author present Cyborg, a higher-level wrapper for java.awt.Robot class. This is the tool for user interface testing. The books also discuss some very important techniques for testing Swing applications. These techniques are: how to set up user interfaces in a thread-safe manner, how to find the objects representing particular components on the screen and how to interrogate a component for its state.

The book is closed with flaky test, tests that occasionally fail or do not terminate. As the authors says

“The problem with having flaky tests is that they remove the element of reproducibility from our testing process. If our tests pass, we don’t know whether all the bugs we’re testing against have actually been fixed, or whether they just happened not to manifest themselves in that testing run. If our tests fail, this could be due to either production errors or testing errors, or both. If we can’t be sure of our test results, we can’t be sure of our software.”

Finally, all the tests presented are automated test. This books also contains many tips and trick using real life application (what worked for them and what didn’t). Those tips and tricks itself worth the book.

Some note: I really surprised when book also describe the ResourceBundle and JavaHelp tests.

Tags: , , ,

  1. 4 Responses to “Book Review: Swing Extreme Testing”

  2. By Andy Till on May 6, 2009 | Reply

    But was it any good?

  3. By Tonny Kohar on May 7, 2009 | Reply

    @Andy

    Yes, the book is good, I recommend it if you are planning to develop Java Swing UI and wondering how to create automated test.

    And If you do not agree with the authors regarding certain methodologies, at least the tips and tricks plus the author’s experience (they describe what’s work and what didn’t) itself worth the book.

  4. By Mircea on Sep 16, 2009 | Reply

    Hi Tonny!

    I’m a developer at javabooks.org. We just went online two days ago, so we need lots of help with the reviews. We’ll be happy if you’d like to post your review on our web page too.

    Thanks,
    Mircea

  5. By Tonny Kohar on Sep 30, 2009 | Reply

    @Mircea

    Please feel free to re-post (aka copy paste) my review of the book on your site

Post a Comment

*