Click here to load reader
Upload
warin-laocharoen
View
1.657
Download
0
Embed Size (px)
Citation preview
Warin LaocharoenKnowledge-Sharing Session - 23 May 2013
Java UI Unit Testing with Jemmy
Wednesday, 22 May, 13
• What's Jemmy
• Jemmy API Usage
• Unit Testing with Jemmy
• Future Integration
• Q&A
Agenda
Wednesday, 22 May, 13
• A Java library that is used to create automated tests for Java GUI applications.
• It contains methods to reproduce all user actions which can be performed on
• Jemmy2 for Swing/AWT
• Jemmy3 for JavaFx components
What's Jemmy
Wednesday, 22 May, 13
• not so many tutorials
• not so many presentations and documents
• few samples
What's Jemmy ( cont. )
Wednesday, 22 May, 13
• Test Harness Meaning it is not a tool for test execution. Any harness which is able to execute tests written in Java (such as JUnit, for example) could be used to execute tests.
• Record-Replaying Tool
Jemmy is not ....
Wednesday, 22 May, 13
• the same JVM as tested-application
• simulate user operations on components by calling events
• search components recursively by given criteria
• criteria defined as implementation of ComponentChooser Interface
How Jemmy works ?
Wednesday, 22 May, 13
Jemmy Workflow
• Find controls you need to do action for
• Do something with that control
• Verify Results of the action
Find Do Verify
Failure Analysis
Pass Pass
Pass
Failed Failed Failed
Wednesday, 22 May, 13
Jemmy API
• Operatorsused for capture components & actions
• QueueTool / Timeoutstiming tool
• Utility
Wednesday, 22 May, 13
Unit Testing with Jemmy
• integrated with Mock Framework (EasyMock)
• support Continuous Integration (Jenkins)
Wednesday, 22 May, 13
DEMO
Wednesday, 22 May, 13
• integrated with BDD( Behavior-Driven Development )
• Borden Automated Regression Test supported
Future Integration
Wednesday, 22 May, 13
Based on Gherkins Step Definitions
• Given• When• Then• And
defined syntax with:
Wednesday, 22 May, 13
References
• http://jemmy.java.net
• http://wiki.netbeans.org/Jemmy
• http://www.slideshare.net/pa810p/jemmy-introduction
• http://github.com/cucumber/cucumber-jvm
Wednesday, 22 May, 13
Q & A
Wednesday, 22 May, 13