getting started with testFX and Eclipse

521 views
Skip to first unread message

fxtes...@gmail.com

unread,
Aug 5, 2014, 5:30:00 PM8/5/14
to testfx-...@googlegroups.com
I have JavaFX project in Eclipse and I am not quite sure how to setup TestFX to test that application.

I got testFX and built it using gradlew wrapper. I don't use maven however. It seems like like I got the jars and now I am wandering what's the next step. Do I add those jars to my Eclipse project as dependencies ... but then how am I actually executing whatever tests I write? Do I need to create those tests as a separate project with dependencies as jar and my app, then use run target to kick off the test?

Benjamin Gudehus

unread,
Aug 6, 2014, 3:31:40 AM8/6/14
to fxtes...@gmail.com, testfx-...@googlegroups.com
Hi!

You use JUnit together with TestFX to test your JavaFX applications. You can use a separate project for your test source code, but it is very common to put the test source code in the same project as the main source code resides. Another common pattern is to split your source directories into a main directory (for the actual application code) and a test directory (for the test code).

You actually run the tests with a run target (right click on source editor, run as -> junit test).

Regards
Benjamin


On Tue, Aug 5, 2014 at 11:30 PM, <fxtes...@gmail.com> wrote:
I have JavaFX project in Eclipse and I am not quite sure how to setup TestFX to test that application.

I got testFX and built it using gradlew wrapper. I don't use maven however. It seems like like I got the jars and now I am wandering what's the next step. Do I add those jars to my Eclipse project as dependencies ... but then how am I actually executing whatever tests I write? Do I need to create those tests as a separate project with dependencies as jar and my app, then use run target to kick off the test?

--
You received this message because you are subscribed to the Google Groups "TestFX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testfx-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages