Several questions on testing of figures, subfigures and data models [message #690275] |
Wed, 29 June 2011 09:59 |
|
As we have a data model, a visual data model and the figures on top, several questions arise:
- Our UML Lab class diagram editor uses class figures containing several figures without a corresponding EditPart (small +/- symbols to expand collapse attribute and operation compartments). How would I make Jubula aware of these figures?
- The class figures contain seperate figures for attribute and operation compartments. They also lack an EditPart pendant. How do I tell Jubula to address them via "attribute" / "operation" path segments?
- For our association figures the inspector gives me a tree that starts with an EditPart derived from org.eclipse.gef.editparts.ScalableFreeformRootEditPart. I wrote an IEditPartIdentifier for it (always returning "root", as I assume there is only one) and the inspector now correctly shows it as "root" node. The checkExistenceOfFigure_byTextpath check however cannot find it. I may have to count the root nodes ... or is this a problem with Jubula. I was wondering how to create a path to the assoc ... the class figures themselves have no parent nodes ...
- Can I check our data model with a Jubula test? Like, after drawing and naming a class check if it has been added to our visual model correctly and also to our data model? I am currently using a tree view of our model as a workaround. Nevertheless, our developers would like to write tests and check the data model at the same time. And they give plenty of reasons for it. What is your opinion on this problem / feature?
thx for your time!
- Jörn
|
|
|
Re: Several questions on testing of figures, subfigures and data models [message #690339 is a reply to message #690275] |
Wed, 29 June 2011 11:54 |
Zeb Ford-Reitz Messages: 33 Registered: November 2010 |
Member |
|
|
Hi Jörn,
1 and 2. Jubula's support for GEF components is limited to Figures with corresponding EditParts. If I remember correctly, addressing components purely via Figures created some pretty convoluted path names, and small layout changes (such as packaging a set of Figures into a container Figure) would break the paths used in the tests.
You could use "Click in Figure" with coordinates in order to click directly on the desired Figure, but that's extremely fragile, and I would only recommend it as a last resort. Another possibility may be use of keyboard shortcuts (if actions can be performed on the Figures via shortcut; ex. the "-" key to collapse the selected Figure). Beyond all that, you could also open an enhancement in our bugzilla, and feel free to add any additional experiences, suggestions, implementations, AUTs, test scenarios, and test results that you feel might help us to realize your use case.
3. I don't understand why you want to check the existence of the root node. After a quick glance at org.eclipse.jubula.rc.rcp.gef.implclasses.FigureCanvasImplClass#findEditPart(String, String[]), I think the EditPart search actually begins with the children of the root EditPart (meaning that the root EditPart would not be part of the path). If that's the case, then I would expect the Inspector (when identifying EditParts other than the root EditPart) to deliver paths that do not include the root EditPart. Is this not the case? I do not understand your statement about class figures not having parent nodes, but perhaps what you are seeing is the Inspector ignoring the root EditPart.
4. Jubula is above all a functional UI testing tool. This means that if a check is being performed, it will be performed (so far as possible) on the UI rather than directly on the model because the UI is what a manual tester would also verify. I wouldn't classify use of the tree view as a workaround: I think it makes sense to verify that both graphical representations of the model (tree view and canvas) are in sync and displaying the correct values. Now, having said all of that, you can also extend Jubula, adding Actions to test your model directly.
- Zeb
|
|
|
Re: Several questions on testing of figures, subfigures and data models [message #690430 is a reply to message #690339] |
Wed, 29 June 2011 14:13 |
|
Hi Zeb,
I will create an enhancement ticket for 1. / 2. as we represent EditParts with figures in container figure all over the place.
You are correct in your interpretation of my third problem: The inspector will give me the class name as path when inspecting a class. The root edit part is ignored. Unfortunately, with associations the path looks sth like "com.yattasolutions.diagrams.classdiagram.gef.editor.graphics.ScalableFreeformRootEditPartExtended_1/myAssoc". ScalableFreeformRootEditPartExtended extends ScalableFreeformRootEditPart. Writing an IEditPartIdentifier does not seem to be the problem ... I made it return "root" as identifier and the path has become "root/myAssoc" but jubula does not seem to see this "root" element. Will try with a counting identifier for ScalableFreeformRootEditPartExtended later.
Will postpone thinking about 4.
Another question:
5. We have several tabs inside the eclipe Properties view defined in one of the plugin.xml's of UML Lab. I can make Jubula click on the Properties view and check labels already present, but the Object mapper will not highlight the tabs in the Properties view. Is there another way of selecting tabs, other than click by pixel?
thx again
- Jörn
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03095 seconds