6/22/2008

Jazoon: 2008-06-25 "Agile Testing of Rich UI Swing Applications"

During Jazoon I will give the Lab "Agile Testing of Rich UI Swing Applications"

Timeline
Wednesday, 2008-06-25, 11:00 - 12:50, Arena 7
11.00 start part 1
11.50 break
12.00 start part 2
12.50 end

This is a Lab. It will not be an ex-cathedra teaching. So you are engaged to play with your sources and ask questions. I will go around for discussions and answering questions about the topic and -if you like- about the football match in the afternoon. ;-)
You may want to:
- check the infrastructure provided
- run the application
- run the tests via TestNG Eclipse plugin
- run the tests via Ant
- check the TestNG results
- check the Fit result
- modify the TestNG test
- write own TestNG component tests
- modify the Fit test
- write own Fit tests
- write own Jemmy interactions
- integrate the sources into a Continous Integration process (TeamCity)
- configure TeamCity projects and build configurations
- start builds from your TeamCity server site
- start builds from Eclipse
- check build result, examin reports and artifacts

Abstract
We will build up and use a comprehensive technical infrastructure for testing Java Rich Client applications. Based on an example Swing application we explore unit-testing components with TestNG. We discover that TestNG usage benefits especially if you want to group your tests, introduce dependencies or test concurrency.

We explore functional tests by using Jemmy for driving interactions on our UIs and Fit for writing state of the art acceptance tests in HTML syntax. We integrate Jemmy, Fit and TestNG to specify and drive our functional features. We integrate component and functional tests to overcome the technical barrier which is in place normally.

Finally we integrate all our free available tools with Ant and TeamCity. Our unit tests and functional tests run in a row continuously. Our full-fledged continuous integration and test-driven development environment gives feedback about the application quality and sync the application specification with the current application behaviour. We can trigger, monitor and react on (hopefully not broken) builds while using the TeamCity Web 2.0 UI or work seamlessly and do the same, additionally start remote runs and delayed commits from inside our IDE like Eclipse or IntelliJ IDEA.

Preconditions:
Eclipse 3.3.2
JDK Java 6
TeamCity 3.1.1 "Professinal Edition"

Step 1: Install Subversion support "Eclipse Software update"
Subclipse 1.2.4 (only plugin itself)
Update site: "http://subclipse.tigris.org/update_1.2.x"
(although the Subversive plugin is also ok for checking out the sources you will not gain maximum benefit in the context of the TeamCity integration)

Step 2: Checkout project "RichClientTesting"
http://87.230.78.21:4711/svn/projects/trunk
(Fit, Jemmy, TestNG artifacts already included in the project)

Step 3: Customize build.xml: Path to your home folder where your workspace is located

Step 4: Install TestNG support "Eclipse Software update"
Update site: "http://beust.com/eclipse"

Step 5: Install TeamCity Server and TeamCity build agent (running both as a service is best)
http://www.jetbrains.com/teamcity/download/index.html
(default configuration with bundled Tomcat and HSQLDB is enough)

Step 6: Install Eclipse TeamCity plugin
Local TeamCity site: "My settings & Tools" (http://localhost:8080)

No comments: