Giter VIP home page Giter VIP logo

uispec4j's Introduction

UISpec4J

UISpec4J is an Open Source functional and/or unit testing library for Swing-based Java applications.

If you are writing a Swing application, you will appreciate UISpec4J above all for its simplicity: UISpec4J's APIs are designed to hide as much as possible the complexity of Swing, resulting in easy to write and easy to read test scripts. This is especially true when comparing UISpec4J tests with those produced using Swing or low-level, event-based testing libraries.

Checkout the official website at http://www.uispec4j.org for more information.

Window Interception failures

UISpec4J version 2.4 may fail tests that involve intercepting windows. This is due to a change in a couple of function related to modal windows. These appear on the JDK 1.6.0 update 38. If you are using newer JDKs and intercept windows you will need to use the 2.5-SNAPSHOT builds (see below).

JDK 7 and 8 support

The MASTER branch now include support for both JDK7 and JDK8. All current test are passing. The jdk7 branch has been removed. Please submit update and push to the MASTER branch. To use UISpec4J you should use 2.5-SNAPSHOT builds (see below).

Building

Recent JDK updated have been changing several internal swing implementations that UISpec4J depends on. We are trying to keep the source up to date. Please report issues if you fail to build on a specific version. While the official 2.5 release is not out, you can build the project as follows:

JDK Command
jdk6 mvn -Pjdk6 -Dgpg.skip=true clean install
jdk7 mvn -Pjdk7 -Dgpg.skip=true clean install
jdk8 mvn -Pjdk8 -Dgpg.skip=true clean install

Running JDK7 on Linux

As of JDK 7 MToolkit is no long available on Linux (see Java SE 7 and JDK 7 Compatibility). This is still the default Toolkit on Linux for UISpec4J. To make you tests run on Linux run you builds as follow:

   mvn -Dawt.toolkit=sun.awt.X11.XToolkit clean test

Experimental Headless mode

If you build from MASTER you may be able to run your test on a headless machine using Caciocavallo this is a Toolkit and Graphical engine that do not require a real display. This makes it possible to run your tests in a fully headless environment. The base test on Linux worked fine (on MacOS there is a platform specific UISpec4J test that fails).

To run your tests with Caciocavallo you need to run on JDK7 and add the following dependency:

      <dependency>
          <groupId>net.java.openjdk.cacio</groupId>
          <artifactId>cacio-tta</artifactId>
          <version>1.3</version>
          <scope>test</scope>
      </dependency>

Then add the following variables to your Maven command line.

   -Djava.awt.headless=false
   -Dawt.toolkit=net.java.openjdk.cacio.ctc.CTCToolkit
   -Djava.awt.graphicsenv=net.java.openjdk.cacio.ctc.CTCGraphicsEnvironment

Before attempting to use this option, make sure your test work correctly on the standard toolkit. Remember this is still experimental, and your mileage may vary.

uispec4j's People

Contributors

ldesgrange avatar marcguiot avatar nebulorum avatar optimix avatar pascalpratmarty avatar scrego avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.