Hi all - I had issues with following recipe 22 as laid out for a non-trivial project. Technology was JRuby 1.7 with Monkeybars 1.1.2 and Java 1.6.
I found that using the Before and After hooks failed. The failure was only apparent when running a second scenario - a single scenario would run fine. (I’m not sure of the failure reason - possibly because the fest robot was kept around?). For my app, I had to do an Around hook as follows:
Around do |sc, blk| runner = GuiActionRunner.execute(AppStarter.new) $robot = BasicRobot.robot_with_current_awt_hierarchy $qe_frame = FrameFixture.new($robot, "Quantum Emulator") blk.call $robot.clean_up $robot = nil $qe_frame = nil LqplController.instance.close end
(LqplController is a Monkeybars controller - closing it shuts down the app).
Complete (in-progress) code is at https://bitbucket.org/BrettGilesUofC/lqpl/src under the “feature/TryFlexForSwingTesting” branch.