Tips: Test, Test, Testing SWT GUIs



Email    print   
April 25, 2007 —  (Page 1 of 2)
No, it's not a stutter. But it is good advice. Test today, test tonight, test tomorrow—

If there's any secret to software development, it's that your applications, your packages and your classes need to be tested often. And not just by you, but by an automated process that can do the same testing a million times and never get tired.

Now it may be you who does or initiates the testing, or it may be a team dedicated to that purpose. In either case, automation is the key. As many know—although I continually find others who don't—JUnit, a regression-testing framework written by Erich Gamma and Kent Beck, is the choice for Java testing. JUnit makes it easy to write tests as Java classes.

And Eclipse makes it even easier by including support of JUnit right in the SDK. For most, testing using JUnit involves creating tests for your classes, packages and applications, that exercise their public APIs. However, what happens when you have an SWT application or an Eclipse View that you want to test? Are you left to do this strictly using visual testing? The answer is no.

SWT GUI testing breaks down into three software groups: commercial, Eclipse and open source. Yes I know Eclipse is open source, but I'm trying to distinguish what already comes with Eclipse from what you can add yourself.

Instantiations has a commercial product called WindowTester that comes in three flavors: WindowTester SWT, WindowTester Swing and WindowTester Pro (combination of the previous two). Using their software, you record your interactions with a GUI and it automatically generates JUnit test cases that you can exercise in the future.

The benefits of using this product are that the test cases it creates are Java code. This makes it easy to read, refactor and customize them, as well as create new ones.

In addition, the tests fit into the JUnit framework most Java developers already know. Exercise the test case as you normally would with JUnit. Be happy in the knowledge that when your test cases pass in the future, your GUI worked the same way as it did when the tests were first created. The only downside? You'll have to pay for the product.




Pages 1 2 


Share this link: http://sdt.bz/30440
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Test Case gives test managers greater control
The collaborative software keeps managers aware of what tests their teams are working on. Included in the release are tools that allow for greater communication among team members Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb