Skip to content

assylias/TestFX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestFX

Easy-to-use library for testing JavaFX. TestFX provides:

  • A fluent and clean API for interacting with, and verifying the behavior of, JavaFX applications.
  • Supports Hamcrest Matchers and Lambda expressions.
  • Screenshots of failed tests.
  • Supports JavaFX 2 and JavaFX 8.

Changelog

Usage Example

class DesktopTest extends GuiTest
{
  public Parent getRootNode() {
    return new Desktop()
  }

  @Test
  public void shouldBeAbleToDragFileToTrashCan() {
    // GIVEN
    rightClick("#desktop").move("New").click("Text Document")
                          .type("myTextfile.txt").push(ENTER);
  
    // WHEN
    drag(".file").to("#trash-can");
    
    // THEN
    verifyThat("#desktop", contains(0, ".file"));
  }
}

Documentation

Links

Motivation

The motivation for creating TestFX was that the existing library for testing JavaFX, Jemmy, was too verbose and unwieldy. We wanted more behavior driven tests with easy-to-read code that our tester could follow and modify on her own. Today, TestFX is used in all of the about 100 automated GUI tests in LoadUI (source code, video).

Comparison with Jemmy

Mailing list

Head over to [email protected] for discussions, questions and announcements.

Credits

TestFX was initially created by @dainnilsson and @minisu as a part of LoadUI in 2012. Today, it is being extended and maintained by @minisu, @Philipp91 and the other contributors.

About

Simple and clean testing for JavaFX.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published