2

We've recently converted an element in our Eclipse RCP application from a TableViewer into a CheckboxTreeViewer and are updating the GUI tests in Jubula.

However, The test are failing because they no longer recognize the CheckboxTreeviewer component as a table. And the Tree component (from what I can see) has no means of selecting a column & row (as our previous tests did) which would be helpful and Jubula doesn't recognize our component as a Table component which would allow for this action.

Any suggestions on how this might be achieved. Looking to select a Column 1 row 0 to select all rows. Want to click into a column and row to check the contents of a label. Also would like to arrow up / down selection in the checkboxTreeViewer rows and columns to test selection values. Selection by indexPath does not work as this essentially is a Treeviewer with columns like a table. It is not an SWT TreeTable, but a JFace CheckboxTreeviewer with column label providers.

Have tried to use the Observation mode to achieve this, but it does not recognize the component either.

Thanks for your help in advance.

  • Marv
Marv
  • 77
  • 9

2 Answers2

0

If Observation mode does not recognize the Component then the only way to control it is via keyboard commands. But it's not stable because the if the number of elements change, your test could falsely alarm you.

I suggest you put a Select All/None button below your CheckboxTreeViewer to go ahead with your test.

Placing a text filter above such controls is also convenient for users and will help you too. You can make Jubula click at filtered result (it will be the first item); use the click test-step with the accurate x, y position to toggle it's value.

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25
  • Hi Adam, thanks for the quick reply! We do indeed have a filter in our app that does filter items populating the checkboxTreeViewer and autoselects the item when only one item remains in the CheckboxTreeViewer, but we are looking to select all and adding a button for GUI testing only isn't really an option for us as we don't want tests to dictate the form of our application. This one might have to simply become a "Manual" test if we cannot find a way to select a Column and Row in the CheckboxTreeViewer columns. Thanks again for taking time to answer. – Marv May 12 '17 at 15:59
0

In this case, I ended up Object Mapping each of the new CheckboxTreeViewers as a Tree Component and then using a Mouse Click - Test Step applied to that object which has the

Component Type: Tree Component Component name: Object_Mapped_checkboxTreeViewer Action Type, "Click in Component".

Since my specific Column to select has a listener for selecting all checks when mouse clicked, I set the test step settings with X position [Integer]: 2 and Y Position [Integer] 2 and left the x-units [String] and y-units [String] as defaults of "percent". The click will occur in the exact same position of the Tree Component each time, so this essentially acts as a button selection via mouse click

Hope this helps others.

Marv
  • 77
  • 9