Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jubula-dev] Extending Jubula concrete toolkit

Hi Marvin,

thanks for the answer.

* For the next time please use our jubula-rc-dev[1] Mailing list.
Yes, sorry, I wasn't aware that there are two separate lists. (I'm sending this answer here, as I expect this thread to end with it.)

* So extending a toolkit component is normally done with also extending the java tester class(in the java implementation) we are using for it, to have all other actions work further more.
I originally had LabelTesterEx extend WidgetTester, but this class does not contain any method rcCheckText(), of course. Making LabelTesterEx extend LabelTester did the trick.

* This leads to the problem that if you are extending a general toolkit component you have in either way to implement this action for these components for the (e.g.) JavaFX toolkit.
This confirms what I suspected.

Concerning changing the core, I already hesitated to do so. Again, your statement confirms my thoughts.

As a result, I might go with only changing JavaFX toolkit first, and then later adopt the changes if necessary.

Thanks again!

Regards
Florian



-----Ursprüngliche Nachricht-----
Von: jubula-dev-bounces@xxxxxxxxxxx [mailto:jubula-dev-bounces@xxxxxxxxxxx] Im Auftrag von Marvin Mueller
Gesendet: Donnerstag, 24. Juli 2014 09:10
An: 'Jubula platform and tools development'
Betreff: Re: [jubula-dev] Extending Jubula concrete toolkit

Hello Florian,

Good to hear that most of the things are working for you . :)

For the next time please use our jubula-rc-dev[1] Mailing list. This is for discussions in the remote control parts which we are talking about here.

First of all I will answer your questions:
>* What is the problem with my approach? Why is "Check text" not available anymore?
Defining a tester class when realizing or extending a component is replacing the "original" class of this toolkit component. Since you have only implemented the one action you have newly defined all other actions do not work. So extending a toolkit component is normally done with also extending the java tester class(in the java implementation) we are using for it, to have all other actions work further more.


 >* Is it a good idea trying to extend the generic toolkit via a toolkit extension? Will this work at all?  Does it make more sense to make the changes in the core?
I think extending an abstract(general) toolkit is not working really well(but I did not tested it). The problem we have here is if you define a component, or extending it you have to implement all actions:
The following problem we have with this. Since we are using inheritance for the implementation of our tester class you cannot put a "common" implementation into this inheritance tree. This leads to the problem that if you are extending a general toolkit component you have in either way to implement this action for these components for the (e.g.) JavaFX toolkit.

So it might be possible that your approach is working, but you must at least have a implementation in the Toolkit you want to use.
Making changes to the "core" will have the drawbacks that if you are doing a general implementation you must also adapt the implementation of all toolkits. And if we are making changes you should have bring your code up to date. So I recommend NOT to do this.

>* Is there a documentation of the elements in the ComponentConfiguration.xml file?
No there is no documentation for any ComponentConfiguration.xml. Sorry for that.

I hope this could help you.

Best regards,
Marvin Mueller

[1] https://dev.eclipse.org/mailman/listinfo/jubula-rc-dev
--
BREDEX GmbH
Mauernstr. 33
38100 Braunschweig

Tel.: +49-531-24330-0
Fax:  +49-531-24330-99
http: www.bredex.de

Geschäftsführer: Andreas Vogel, Ulrich Obst, Achim Lörke Amtsgericht Braunschweig HRB 2450

-----Original Message-----
From: jubula-dev-bounces@xxxxxxxxxxx [mailto:jubula-dev-bounces@xxxxxxxxxxx] On Behalf Of Florian Lenzner
Sent: Dienstag, 22. Juli 2014 16:57
To: jubula-dev@xxxxxxxxxxx
Subject: [jubula-dev] Extending Jubula concrete toolkit

Hi all,

I'm struggling with a toolkit extension which involves an extension of the concrete toolkit.
I'm running Jubula 8.0.0 (standalone).

This is what I am trying to do:

I want to test an application that uses a sliding motion on various controls (not necessarily slider controls).
The application currently uses JavaFX, but we might have a different UI framework in the future.
To cater for this (independency of control type/toolkit), I would like to introduce the new action in the concrete toolkit.

I already succeeded doing the following:
* Building the example extension (for JavaFX toolkit).
* As a test, extending javafx.scene.control.Label with a new action "slide".
  I successfully triggered the action on a label during a test run.

Now, to make the new action available for all controls, I...
* ...declared an abstract component that extends guidancer.abstract.Widget, and a corresponding
  concrete component that realizes the new abstract component. The abstract component declares
  the new action. With this, the new "Slide" action is available for a "Graphics Component".

I am now struggling with where to implement the new action for the JavaFX toolkit.
My first approach goes like that:

        <abstractComponent type="foo.bar.abstract.Widget">
                <extends>guidancer.abstract.Widget</extends>
                <action name="CompSystem.Slide">
                        <method>rcSlide</method>
                        <!-- Params here -->
                </action>
        </abstractComponent>
        <concreteComponent type="foo.bar.concrete.Widget">
                <realizes>foo.bar.abstract.Widget</realizes>
        </concreteComponent>
        <toolkitComponent type="javafx.scene.control.LabelEx" visible="true">
                <realizes>foo.bar.concrete.Widget</realizes>
                <extends>javafx.scene.control.Label</extends>
                <testerClass>org.eclipse.jubula.rc.javafx.tester.LabelExTester</testerClass>
        </toolkitComponent>

The LabelExTester class (only) contains an rcSlide() method.

With this, I can successfully slide a control which is a javafx.scene.control.Label. But checking the text of the very same control fails with "Operation not supported by the selected toolkit." It appears that my approach breaks the implementation of the guidancer.abstract.Widget actions for javafx.scene.control.Label.

My questions are:
* Is it a good idea trying to extend the generic toolkit via a toolkit extension? Will this work at all?
  Does it make more sense to make the changes in the core?
* What is the problem with my approach? Why is "Check text" not available anymore?
* Is there a documentation of the elements in the ComponentConfiguration.xml file?

Any information is greatly appreciated!

_______________________________________________
jubula-dev mailing list
jubula-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jubula-dev
_______________________________________________
jubula-dev mailing list
jubula-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jubula-dev

Back to the top