Kieran France Kieran France is a programmer for IDRSolutions in charge of there internal test suite. In his spare time he enjoys tinkering with gadgets and code.

Fest For Beginners – Initial Concepts

1 min read

What is Fest

Recently I have improved the highlighting of PDF files in our Java PDF viewer. With this  improvement I have had to find a way to test the highlights and any future improvements we make to the highlights.

For this reason I have started using a test library called Fest. Fest is a set of APIs that can be used to test java applications which include api to simulate user input and interaction with a user interface. In other words instead of me testing a series of files, performing the same actions on each file, by hand, everytime we want to make a build I can have a computer do it for me.

One of the major advantages I found of performing tests in this way is that calling various function calls from a test running at a lower level than the user can interact is completely ignoring a section of code that may be including other methods or variables that aren’t called at the lower level. By testing using fest we can compare output across a known working version to ensure everything works correctly for the end user without having to dedicate a team members time to sitting there and working through the same test for hours.

Have you convinced you that Fest is very useful for regression testing?

First steps with Fest

In order for the way I have set up Fest to work you will need to have set unique names set to each gui component that you will be using.

Once you have code that will set up and open your application you need to create a BasicRobot object and a FrameFixture object. This can be done as follows.

BasicRobot robotf = (BasicRobot)BasicRobot.robotWithCurrentAwtHierarchy();
//mainFrame is the name of a frame component.
FrameFixture frame = WindowFinder.findFrame("mainFrame").

Now you have these two object you will be able to simulate user input using FrameFixture. In order to have Fest trigger events as a user would we can call methods named after the various user interface types such as button, checkBox, scrollPane, radioButton…
These methods take a string value that should be the unique name of the component you wish to trigger. This will return a fixture that can interact with the user interface as the user would using methods like click.

These are the initial concepts that you need to keep in mind if you wish to use Fest for your own tests. If you wish to try Fest yourself it can be found at

I’ll be covering it in more detail in my coming articles.

View PDF files in a web application →

Parse PDF files as HTML →

Display PDF Forms in a web browser →

View PDF Documents in Java Applications →

Rasterize PDF Documents to image →

Read/Write images (including HEIC, JPG and WEBP) →

Convert Image files to PDF Documents →

Kieran France Kieran France is a programmer for IDRSolutions in charge of there internal test suite. In his spare time he enjoys tinkering with gadgets and code.

One Reply to “Fest For Beginners – Initial Concepts”

  1. What I really like about being able to name the components is that it works if you change platform or look and feel. Tools which use co-ordinates to show where to click all break in this case.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2022. All rights reserved.