There are also Automaton, which is similar to TestFX and supports Swing as
well, and MavinFX, which is especially useful to assert Properties.

TestFX allows simple and clean testing without much boiler-plate code. When
we took JavaFX into consideration for a migration of our geographical
information system to Swing to first thing we looked for was a testing
framework. With a background with the FEST-Swing testing framework TestFX
convinced us, because even testing new dialogs looked a lot easier than
with FEST.

I can't say much about Squish. It seems that it follows an approach with a
recorder for user interactions which I guess won't allow creation of
test-cases before the actual production code is written.

--Benjamin




On Sat, Mar 28, 2015 at 8:45 PM, Tom Eugelink <t...@tbee.org> wrote:

> JFXtras uses TestFX (3), very pleasant, highly recommended.
>
>
>
> On 28-3-2015 09:13, Adam Granger wrote:
>
>> Following migration to JavaFX I've been looking into a unit testing...
>> Possible solutions
>>
>>   - "home brew" - just code up a few basic methods like "find a node with
>> given selector within given timeout", then build tests using those using
>> JUnit / Mockito. Also used @Rule approach from
>> http://stackoverflow.com/a/18988752/898289 for simple tests which didn't
>> require any asynchronous behaviour. I was previously using this approach
>> until discovered TestFX
>>
>>   -  Jemmy - seems well documented. Last release 4 years ago - no updates
>> since JavaFX 2.2? Is this because its so good, or does anyone know
>> whether it has been scrapped? Any plans to update for JavaFX 8?
>> https://jemmy.java.net/
>>
>>   - TestFX - just started dabbling with this - seems a lot better
>> maintained that Jemmy, however the new release 4 is still alpha and
>> documentation is a little sparse - https://github.com/TestFX/TestFX
>>
>>   - Squish by FrogLogic - commercial product, but only seems suitable for
>> integration level testing. -
>> http://doc.froglogic.com/squish/5.1/tutorial-getting-started-java_fx.html
>>
>> I'm interested in any recommendations this group might have or experiences
>> of solutions I've mentioned...  What solution do OpenJFX / other large FX
>> developments use for unit testing?
>>
>> Many thanks,
>>
>> Adam.
>>
>>
>

Reply via email to