Search code examples
javatestingautomated-testsjubula

Repeat LAST action from Jubula Testcase


I am using Jubula to test a big softwaretool. Since the UI got updated Jubula has some big problems. The test quit's at a position (let's say after Step A), after I was trying to figure out whats the problem, I didn't find a problem and Jubula quits at a totally different position, some times before and some times after position A. It's seams to be really random if, and if, where it quits.

Now I got known to the eventhandler (before, I never was used to use them). Since there are much testcases and in every Testcase much much actions (at least 50) and Jubula is always "stopping" at different, the problem is not solved to add an eventhandler which always does the same thing (lets say clicks on a button) because some times Jubula shall click on button A and some times on B, in other cases he has to select something from a "dropdown-menu".

NOW my question: Is it possible to force Jubula, to repeat the LAST DONE action? Since I started to watch closely on the reports, I noticed that the buttons are already displayed and jubula just doesn't click on them. (i tried to wait until they appear before i click on 'em, but it still didn't work)

I would be really really happy if there is a solution (even if it's "difficult" or hard to realize because I need to add much components.)


Solution

  • There is a "difficult" solution, if you know how to build Jubula from it's sources.

    Jubula does not have a STEP_BACK event handler so you have introduce a STEP_BACK entry in ReentryProperty.java. After that, modify Traverser.java next() method to handle this new entry. You could also contact Bredex GmbH with such a feature request, they quickly respond to every mail.

    But I would rather try to make sure Jubula finds those buttons; create a custom case (i.e. Sure_Click) that clicks on button but has a RETRY event-handler with a few hundred millisecs holdback.

    If you have access to the AUT's code then try setting setData("TEST_COMP_NAME", "unique_id") for each widget Jubula has to find. It is the most/only stable way to locate widgets.