Folks..
Hi, I'm GeePaw Hill. I've been working off and on a JavaFx project called 'contentment'.
It is essentially a kind of scripted whiteboarding tool, which I use to create presentations and videos. (Imagine someone giving a nice whiteboard talk, only the script of what happens on the whiteboard is pre-written, and it does a few things whiteboards just can't do.)
A 'script' here is just some java code that manipulates and animates a scene graph in various ways. The steps in the script are often but by no means always Transition-based.
I'm a (very) old-school TDD'er, relying primarily on microtests rather than integration tests. This means that my real focus for TestFx is around testing individual Step implementations. Step's can be 'played', but they can also be 'jumped,' both forward and back. I have a lot of need for tests where I take a given Step, and combine plays and jumps in various ways and ascertain that the individual implementations really honor their contracts. If I call, say, the asynchronous 'play()', the state must be the same at the end as if I'd called the (synchronous) 'forward()', or if I call 'play()' then 'backward()' I need to validate that the graph is as if the Step had never played, and so on. Occasionally, I also have need to test specific visual aspects, though to be honest I use my eyes for that purpose when I'm first working out the code/math for a Step.
The Steps are really testable just by having them operate on their Nodes that are placed inside a single scaled panel. So I have Step's that do things like add Node and remove Node. I don't need to test what long chains of steps look like on the screen. I just need to be sure that a given isolated step does exactly what I want when it runs.
In my head, I imagine something that looks very close to the old GuiTest (which I can't find in the code anymore). Each test fixture takes a node that is the scaled panel, stuffs it into Pane and Scene.. Then each test function is just a series of commands to the Step followed by some assertions. It's important that the Steps be rendered, not so much because I need to see them as because I need to test for things like bounding boxes and scaling and visibility.
Is TestFx what I want? Should I be building from head or just grabbing maven artifiacts? Should I be starting with ApplicationTest where the application just loads Pane and Scene into the supplied Stage, then the individual test functions take the Pane as their root?
I've surfed a fair bit, and most of the examples I've seen use the GuiTest from older rev's. I have seen the rather nice write-up from Adam Carroll, but I'm reluctant to invest in understanding his code base deeply enough to get where I want -- if I don't have to.
Any light you'd be willing to shed would be terrific!
Thanks,
GeePaw
@geepawhill