Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Unique field Id (Class Id) with aditional attributes for RCP Jubula Tests(create a way to set the Id in RCP/SWT with a specific key)
Unique field Id (Class Id) with aditional attributes for RCP Jubula Tests [message #1268350] Mon, 10 March 2014 11:41 Go to next message
Afonso Remédios is currently offline Afonso RemédiosFriend
Messages: 3
Registered: March 2014
Junior Member

Scout will set the name/id of components for Jubula to use with the classId annotation,
but from the Jubula user manual section "4.2.4 Design for testability in RCP" they state that you have to use setData(String key, String ComponentName) using the key TEST_COMP_NAME.

Are you going to support this or just going to use setData(id) that is the generic use?

I like the solution of the annotation @ClassId but maybe it should have another attribute to state the key to use in setData(key, id).

Link to the issue to add unique Id:

Thank you
Afonso Remédios
Re: Unique field Id (Class Id) with aditional attributes for RCP Jubula Tests [message #1268372 is a reply to message #1268350] Mon, 10 March 2014 12:18 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member

Bug 420626 is just about having the id on the field.

Now we need to be able to consume this Unique ID and to set it on the SWT (or Swing) widget. The solution should be flexible enough to work with different UI testing tool (for example HP Quality Center does not have the same expectation as Jubula).

See also, for Swing: Set name of Swing component from Scout

If you want to try it now (Scout version > Luna M5), you can this (suggested in the thread about the e4 StylingEngine):

public ISwtScoutFormField createFormField(Composite parent, IFormField model) {
  ISwtScoutFormField formField = super.createFormField(parent, model);

  //Set something on the field:
  formField.getSwtField().setData("TEST_COMP_NAME", model.classId());

  //Set something on the label:
  formField.getSwtLabel().setData("TEST_COMP_NAME", model.classId() + "_LABEL");
  return formField;

I did not test this. I am really interrested in any feedback you can provide about this approach.

[Updated on: Mon, 10 March 2014 12:19]

Report message to a moderator

Previous Topic:Rap Table field default menu visibility problem
Next Topic:Questions concering SQL Service
Goto Forum:

Current Time: Sat Oct 16 22:33:56 GMT 2021

Powered by FUDForum. Page generated in 0.02196 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top