Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Example Jubula Client Extension for the Swing component "JSlider"(Example Jubula Client Extension for the Swing component "JSlider" described in the book but don´t get nothing!)
Example Jubula Client Extension for the Swing component "JSlider" [message #837358] Thu, 05 April 2012 15:22 Go to next message
Ricardo Ferreira is currently offline Ricardo Ferreira
Messages: 6
Registered: April 2012
Junior Member
Jubula: Jubula Standalone 1.2.0
SO: Windows 7 Professional
Document: Extend.pdf - Extending Jubula March 19, 2012

I Follow the Example Jubula Client Extension for the Swing component "JSlider" described in the book but don´t get nothing!

1 - STEP
cap 2.2.1 Exporting the toolkit plugin to Jubula
step 9 and 10
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.toolkit folder
to JubulaDirectory/Jubula/plugins/ folder

2 - STEP
cap 2.4 Where to put your Tester Classes
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.rc.jar
to JubulaDirectory/server/lib/extImplClasses

3 - STEP
Create a new Jubula Project => TestJSlider
choose toolkit => swing
AUT Name => AUT Test JSlider
AUT ID => AUT ID JSlider
Executable JAR File Name => JubulaDirectory\examples\development\extension\AUT\JSlider.jar

4- STEP
Create Test Case => TestJSlider
Create Test Suite => JSliderSuite
Add the Test Case(TestJSlider) to Test Suite(JSliderSuite)
Start AUT Agent
Connect to AUT Agent - Connected
Sart AUT Test JSlider(AUT ID JSlider) - The JSlider Example AUT is running
Start Observation Mode - The Observation Console is running
Change the value of JSlider => The Observation Console don´t get nothing, no ACTION !!

NOTE: in user\.jubula\logs the aut_agent.log, client.log, rc_swing.log are empty

My question is what is supost this example to show?
Failure to do something? or did something wrong?
I think that in this example was interesting to compare the value of the JSlider, and that was what I expected!
what I need to do to complete this example to get the value of the JSlider and compare this value?

thanks.
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #838592 is a reply to message #837358] Sat, 07 April 2012 09:43 Go to previous messageGo to next message
Achim Loerke is currently offline Achim Loerke
Messages: 349
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Please check this thread for a possible cause of the problem.

Achim
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #839941 is a reply to message #838592] Mon, 09 April 2012 12:57 Go to previous messageGo to next message
Ricardo Ferreira is currently offline Ricardo Ferreira
Messages: 6
Registered: April 2012
Junior Member
I read that thread and follow that information, about the bug 337, but I still have the same behavior !

I made again all the steps that I describe before and nothing !

after the STEP 2, I Follow the workaround in the bug 337
go to JubulaDirectory\jubula\configuration\org.eclipse.equinox.simpleconfigurator
add in bundles.info the line
org.eclipse.jubula.examples.extension.swing.toolkit,1.2.0.201203251631,plugins/org.eclipse.jubula.examples.extension.swing.toolkit-1.2.0-SNAPSHOT.jar,4,false

After this step it is supposed to see this bundle in
opening "Help --> About --> Installation Details --> Plug-ins

but the bundle is not there !

so, I still have the same questions and no solutions !
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #841444 is a reply to message #839941] Wed, 11 April 2012 10:07 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1157
Registered: July 2009
Senior Member
Hi,

I'm not sure what the problem in your second post is, but I can confirm that the aim of the example extension is basically just to be able to map the JSlider and perform any actions on it that are on the "Graphics Component" (i.e. click, click in component, check existence etc.). The example does not show you what a fully supported JSlider could look like.

Hope that helps,
Alex
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #841779 is a reply to message #841444] Wed, 11 April 2012 18:16 Go to previous messageGo to next message
Ricardo Ferreira is currently offline Ricardo Ferreira
Messages: 6
Registered: April 2012
Junior Member
so, lets separate the problems..

1º Problem

1 - This project don't compile, to compile I have to put in classpath the bundle org.eclipse.swt
plugin.xml -> Runtime -> classpath

2 - This Bundle is not added in the IDE Jubula after follow the manual and made the workaround in the bug 337
So I fix this problem with:
2.1 In plugin.xml file change the name of toolkitID
plugin.xml -> Extensions
Current name => toolkitID="com.bredexsw.guidancer.exampleSwingToolkitExtension"
change to => toolkitID="org.eclipse.jubula.examples.extension.swing.toolkit"
2.2 Generate the new toolkit.jar and add in JubulaDirectory/Jubula/plugins/
2.3 IDE jubula give a error and not Open, to fix that just export org.eclipse.swt width your toolkit
2.4 Now if you open "Help --> About --> Installation Details --> Plug-ins => the plugin is there - Great!



2º Problem

After the plugin is load by the IDE Jubula I made the steps 3 and 4 that I describe before, but :

I dont get nothing in the Observation Console
I Have a exception when I started the Object Mapped Mode and get nothing !

The ComponentConfiguration.xml file:

---------------------- ComponentConfiguration.xml -----------------------
<configVersion>
<majorVersion>1</majorVersion>
<minorVersion>36</minorVersion>
</configVersion>

<toolkitComponent type="javax.swing.JSlider" visible="true">
<realizes>guidancer.abstract.Widget</realizes>
<testerClass>
org.eclipse.jubula.rc.swing.swing.implclasses.JSliderImplClass
</testerClass>
<componentClass name="javax.swing.JSlider" />
</toolkitComponent>

------------------------------------------------------------------------

So my question, for example, like Alexandre tells, it is supposed I have the Action click or not ?
If yes, It was supost I get that Action in Mode Observation Console ?

Or I need to put all Action that I want in the ComponentConfiguration.xml file ?

Can you give me more information about this ?

thanks.
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #846651 is a reply to message #841779] Mon, 16 April 2012 14:10 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-Reitz
Messages: 32
Registered: November 2010
Member
It sounds like you were able to resolve the compilation issue in the correct way: by adding an SWT library with an acceptable version (i.e. you would like to compile against the oldest SWT version you intend to support).

It shouldn't be necessary to change the toolkitID, and it should *definitely* not be necessary to re-export the org.eclipse.swt package from your bundle. Can you provide some log output from starting Jubula with the parameters "-debug -consolelog" after performing the steps outlined in bug 337 but before making other changes to toolkitID or package exports?

With a correctly configured and installed example extension, the Click action should be available for JSlider when specifying a Test Step. This action, as well as several others, are inherited from Graphics Component ("guidancer.abstract.Widget"). This will *not* necessarily make the Click action on JSlider observable from Observation Mode. You should be able to verify that the new Component (JSlider) is available by specifying a Test Step and selecting JSlider from the list of available Component types. If JSlider is not in the list, then the extension did not successfully add the Component.

You also mentioned that you received an error message when starting the Object Mapping Mode. Can you include the stack trace for that error?

- Zeb
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #848855 is a reply to message #846651] Wed, 18 April 2012 16:37 Go to previous messageGo to next message
Ricardo Ferreira is currently offline Ricardo Ferreira
Messages: 6
Registered: April 2012
Junior Member
thanks for your feedback

-------------------- 1 try ---------------
1º Problem - with a new generated toolkit.jar

1 - This project don't compile, to compile I have to put in classpath the bundle org.eclipse.swt
plugin.xml -> Runtime -> classpath => ok

2 - Create the toolkit.jar
2.1 I left the original toolkitID Current name => toolkitID="com.bredexsw.guidancer.exampleSwingToolkitExtension"
2.2 Generate the new toolkit.jar and add in JubulaDirectory/Jubula/plugins/ without export org.eclipse.swt width the toolkit

3 IDE jubula give a error and not Open -> see the 1334759355195.log

what you mean with " starting Jubula with the parameters "-debug -consolelog" " , how make that?
The only reference about debug that i find is in documentation -> UserManual.pdf
3.33.4 Starting the AUT
Applications started in this way are always started in debug mode.

-------------------- 2 try ----------------
1º Problem - with the toolkit.jar that comes with jubula install
1 - STEP
cap 2.2.1 Exporting the toolkit plugin to Jubula
step 9 and 10
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.toolkit folder
to JubulaDirectory/Jubula/plugins/ folder

2 - STEP
cap 2.4 Where to put your Tester Classes
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.rc.jar
to JubulaDirectory/server/lib/extImplClasses

3 - IDE jubula give a error and not Open -> see the 1333974014757.log
---------

What I made wrong ?

thanks.

Re: Example Jubula Client Extension for the Swing component "JSlider" [message #849927 is a reply to message #848855] Thu, 19 April 2012 15:31 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-Reitz
Messages: 32
Registered: November 2010
Member
Quote:
what you mean with " starting Jubula with the parameters "-debug -consolelog" " , how make that?

You can do this when starting Jubula from the command line or from the Eclipse IDE. The command line is probably the easiest way:
1. In a command shell, navigate to the directory "<JubulaDirectory>/jubula".
2. Type the command (on Windows, for example) "jubula.exe -debug -consolelog".

It looks like you didn't need the -consolelog, as you were able to locate and include the log, but the -debug might be helpful.

I have never seen the error resulting from your 1st attempt (java.lang.IllegalArgumentException: Line does not contain at least 5 tokens), but it looks like you made an error editing your bundles.info file (as described in GUIdancer bug 337). Until you resolve this issue, Jubula cannot successfully load your extension.

I see no way that your 2nd try could work. Copying a directory with class files into the "plugins" directory of an Eclipse-based application will not add those classes as a plug-in, as far as I know. For one thing, the manifest wouldn't be present. I recommend fixing your bundles.info file and seeing if that solves the problem. If not, please post a log of the results here.
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #849936 is a reply to message #849927] Thu, 19 April 2012 15:40 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-Reitz
Messages: 32
Registered: November 2010
Member
One more piece of information that I just noticed in the log...
The string that's causing problems in your bundles.info is "org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204181612,plugins/org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204181612.jar,4,false", which should probably be "org.eclipse.jubula.examples.extension.swing.toolkit,1.2.0.201204181612,plugins/org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204181612.jar,4,false" (note the first comma separating bundle symbolic name from bundle version).

Also note that the JAR location/name has to be accurate! If your bundle JAR is named "toolkit.jar", then that will need to be entered into your bundles.info file instead of "org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204181612.jar".

- Zeb
Re: Example Jubula Client Extension for the Swing component "JSlider" [message #850033 is a reply to message #849936] Thu, 19 April 2012 17:45 Go to previous messageGo to next message
Ricardo Ferreira is currently offline Ricardo Ferreira
Messages: 6
Registered: April 2012
Junior Member
Zeb, thanks for your feedback, i make again the 1 and 2 try

-------------------- 1 try ---------------
1º Problem - with a new genareted .jar of the toolkit

1 - This project don't compile, to compile I have to put in classpath the bundle org.eclipse.swt
plugin.xml -> Runtime -> classpath => ok

2
2.1 I left the original toolkitID Current name => toolkitID="com.bredexsw.guidancer.exampleSwingToolkitExtension"
2.2 Generate the new org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204191900.jar without export org.eclipse.swt width the toolkit
2.3 Add the org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204191900.jar in JubulaDirectory/Jubula/plugins/

3
cap 2.4 Where to put your Tester Classes
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.rc.jar
to JubulaDirectory/server/lib/extImplClasses


4- Follow the workaround in the bug 337
go to JubulaDirectory\jubula\configuration\org.eclipse.equinox.simpleconfigurator
add in bundles.info the line
org.eclipse.jubula.examples.extension.swing.toolkit,1.2.0.201204191900,plugins/org.eclipse.jubula.examples.extension.swing.toolkit_1.2.0.201204191900.jar,4,false


5 IDE jubula open

Open "Help --> About --> Installation Details --> Plug-ins => the plugin is there => Great

like you said =>
"You should be able to verify that the new Component (JSlider) is available by specifying a Test Step and selecting JSlider from the list of available Component types.
If JSlider is not in the list, then the extension did not successfully add the Component."
yes I see JSlider component - Great

6 - STEP
Create a new Jubula Project => TestJSlider
choose toolkit => swing
AUT Name => AUT Test JSlider
AUT ID => AUT ID JSlider
Executable JAR File Name => JubulaDirectory\examples\development\extension\AUT\JSlider.jar



7
Create Test Case => TestJSlider
Create Test Suite => JSliderSuite
Add the Test Case(TestJSlider) to Test Suite(JSliderSuite)
crete a new Test Step(TestStep1) add that to Test Case(TestJSlider)

TestStep1
TYPE: JSlider
NAME: comp_name
ACTION: Check Existence

Start AUT Agent
Connect to AUT Agent - Connected
Sart AUT Test JSlider(AUT ID JSlider) - The JSlider Example AUT is running

So at this step I still have a error "Incomplete Object Mapping for AUT "JSlider AUT""

Start Object Mapping Mode - ok
But now I dont get no object to Map, Jubula don´t give me no object!

Unassigned component name
comp_name

Unassigned technical name
NOTHING !!!

there is nothing in the debug and no logs !!

what is missing ?

the problem is this JubulaDirectory\examples\development\extension\AUT\JSlider.jar ?

thanks.

-------------------- 2 try ----------------
1º Problem - with the org.eclipse.jubula.examples.extension.swing.toolkit-1.2.0-SNAPSHOT.jar that comes with jubula instalattion
1 - STEP
cap 2.2.1 Exporting the toolkit plugin to Jubula
step 9 and 10
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.toolkit-1.2.0-SNAPSHOT.jar
to JubulaDirectory/Jubula/plugins/ folder

NOTE: if you open the org.eclipse.jubula.examples.extension.swing.toolkit-1.2.0-SNAPSHOT.jar the manifest file is there.

2 - STEP
cap 2.4 Where to put your Tester Classes
go to JubulaDirectory\examples\development\extension\bin
copy the org.eclipse.jubula.examples.extension.swing.rc.jar
to JubulaDirectory/server/lib/extImplClasses


3- Follow the workaround in the bug 337
go to JubulaDirectory\jubula\configuration\org.eclipse.equinox.simpleconfigurator
add in bundles.info the line
org.eclipse.jubula.examples.extension.swing.toolkit,1.2.0-SNAPSHOT,plugins/org.eclipse.jubula.examples.extension.swing.toolkit-1.2.0-SNAPSHOT.jar,4,false
that way the IDE Jubula give a error and don't open , I just change to
org.eclipse.jubula.examples.extension.swing.toolkit,1.2.0,plugins/org.eclipse.jubula.examples.extension.swing.toolkit-1.2.0-SNAPSHOT.jar,4,false
and now IDE Jubula open - Great !

The problem is that the plugin is not there !

Open "Help --> About --> Installation Details --> Plug-ins => the plugin is not here ! I should see in Plug-in Id org.eclipse.jubula.examples.extension.swing.toolkit

I started the IDE Jubula like you said "-debug -consolelog" , but no logs and nothing in the debug.

like you said =>
"You should be able to verify that the new Component (JSlider) is available by specifying a Test Step and selecting JSlider from the list of available Component types.
If JSlider is not in the list, then the extension did not successfully add the Component."
No I don´t see the JSlider component

so just to finish this try, can I use the .jar files that are in JubulaDirectory\examples\development\extension\bin ?

If I can, something is missing ?











Re: Example Jubula Client Extension for the Swing component "JSlider" [message #853727 is a reply to message #850033] Mon, 23 April 2012 09:28 Go to previous message
Zeb Ford-Reitz is currently offline Zeb Ford-Reitz
Messages: 32
Registered: November 2010
Member
Hi Ricardo,

Unfortunately, I'm not going to have time to pursue this further. Perhaps someone else from the community can assist you. Other than that, I can point you to the support page of the Jubula website (h ttp://www.eclipse.org/jubula/support.php - I cannot yet post working links to this forum, so I've mangled the link by putting a space between "h" and "ttp"), where professional support is an option.

- Zeb
Previous Topic:Custom ComboBox not readable
Next Topic:Best way of running Jubula test cases in continuous integration enviroment
Goto Forum:
  


Current Time: Fri Oct 31 10:03:18 GMT 2014

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

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