When You Need to Prepare Java and JavaFX Applications for Testing

Applies to TestLeft 15.40, last modified on March 17, 2022

You can test Java and JavaFX applications without any specific preparations. You can also access individual objects of Java and JavaFX applications, their internal properties and methods from your tests.

In some cases, you may need to edit JRE configuration files or launch your application with specific command-line arguments:

  • If your Java application uses the Java Swing ComboBox, Java Swing List or Java Swing Tree control and the com.sun.java.swing.plaf.windows.WindowsLookAndFeel look and feel, launch your application with the swing.disablevistaanimation command-line parameter set to True, or specify the parameter in the application code. Otherwise, errors may occur during testing.

    Here is an example of how you can specify this parameter:

    java.exe -Dswing.disablevistaanimation=true -cp MyApp.jar MyApp.Main
  • To test Java Web Start applications, configure the javaws.policy file to provide the application with access to the needed resources. See Preparing Java Web Start Applications for Testing.

  • To test JavaFX applications embedded in a web page, you may need to configure your browser. See Preparing Web Browsers for Testing.

See Also

Preparing Java and JavaFX Applications for Testing

Highlight search results