RichTextFX
RichTextFX copied to clipboard
Add support for TestFX tests
I fixed some issues yesterday but these fixes cannot be tested automatically to insure the fix works without screwing up something else. Could we add support to TestFX to insure the code runs properly? If so, I would love to integrate that with Spock so that parameterized tests would be easier to implement, but you've already expressed beforehand that you want to keep the languages we use down to a minimum.
:+1: for TestFX.
I'm sure you can write parameterized tests with pure java test frameworks.
I'm sure you can write parameterized tests with pure java test frameworks.
Oh you can, but Spock makes it easy to read via its table-like when
block.
I'll look into the TestFX integration. I remember receiving a notification recently that there was an issue with it when it is run in headless mode, but I can't recall all of what that was.
Just FYI, TestFX 4, as it currently stands right now, will be problematic to integrate into this project for two reasons: first, see TestFX/TestFX#290 and second, note how the development has been slowed severely (last commit was months ago, some PRs submitted a few months ago have yet to be merged (such as this one), and the developer even notes how busy he is).
We'd need to use TestFX 3, but I'm not sure what issues arise in that version.
Well, then let's try to not have a dependency on TextFX. Anyway, I think that with these lines in Travis config, it should be OK to run tests that do graphical rendering, if that was the motivation.
it should be OK to run tests that do graphical rendering, if that was the motivation.
Graphical rendering wasn't really the motivation. TestFX provides an FXRobot
class that will simulate user interaction nicely.
The current use case, #370, only needs firing a few events, which is not too difficult to do directly.
I was also thinking of #357
OK, that's tricky.
I fixed the Shortcut issue, and currently a lot of activity is occurring on TestFX due to write access being granted to another person who has more time on their hands.
Still, my focus is on finishing the non-linear undo/redo commit in UndoFX. I hope to finish it by the end of December as I'll have a lot more time in a few weeks.
Would someone mind writing a list of tests we should implement for this project via TestFX? I've written the javadoc for its core
project as a way to learn how it works, so that shouldn't be too difficult to do now.
I added the capability to write TestFX tests. However, we still need a list of tests to write.
After writing #504, here's a few things that need to be figured out still:
- [x] Add CI for Windows environment via AppVeyor: currently, only @TomasMikula can add the webhooks to make this possible. No doubt, he'll do that eventually.
- [x] Figure out which of the currently-ignored tests should not be run on various OSes (for example, emitting a
KeyCode.Paste
on Linux does not work, but it does on Mac). Once the AppVeyor webhook gets set up, these can be easily figured out - [ ] Write tests that insure mouse-overriding code works correctly
#517 failed because a test that is only supposed to run on Mac was run on Linux and times out. Strangely, this same test passed in Travis in the initial PR.