Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365609 - Extend Application component for executing methods reflectively
Summary: Extend Application component for executing methods reflectively
Status: CLOSED WONTFIX
Alias: None
Product: Jubula
Classification: Technology
Component: RC (show other bugs)
Version: 1.1.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Andreas Scharf CLA
QA Contact: Oliver Goetz CLA
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 10:03 EST by Andreas Scharf CLA
Modified: 2013-12-17 08:29 EST (History)
4 users (show)

See Also:
Achim.Loerke: iplog+
Achim.Loerke: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Scharf CLA 2011-12-05 10:03:51 EST
Overview: To make Jubula even more flexible in specifying tests, it would be great if the user could call arbitrary methods of classes within the AUT. One use case could be the execution of model based JUnit tests between normal UI tests.

I already discussed a possible implementation with Achim Lörke in the Jubula forum: http://www.eclipse.org/forums/index.php/m/760870/#msg_760870, which I will outline here:

- Extend Application component configuration with an action for reflectively calling a method. This action would use the following parameters:
 * ClassName The fully qualified class name, i.e. org.eclipse.jubula.example.JUnitRunner
 * MethodName The name of the method, i.e. execute
 * ParamTypes comma separated list of fully qualified class names for simple type, i.e. java.lang.String, ...Integer, ...Boolean
 * ParamValues comma separated list of actual call values, ie. =TC_PARAM,$VARIABLE,simple value,...
 * The return type would have to be String to keep the implementation effort reasonable.
- Extend ApplicationImpl class with an appropriate implementation for the above specified action

As mentioned in the forum I'll try to implement this feature and contribute a patch for it.
Comment 1 Achim Loerke CLA 2011-12-05 11:06:58 EST
Set Flags/Target Milestone and other metadata.
Assigned the ticket to Andeas.
Comment 2 Andreas Scharf CLA 2011-12-06 09:17:30 EST
While implementing this feature I stumbled upon one "problem": Loading a class in a simple SWT/Swing application is not a problem since we basically have one ClassLoader. But finding the right class in a RCP environment is more difficult. For finding the right plugin I though of using the well known "bundle:fullQualifiedClassName" syntax but (of course) SwtApplicationImplClass doesn't have any relations to org.eclipse.runtime. 

Any recommendations to solve that problem? I thought of writing something like a "RCPApplicationImplClass" for org.eclipse.jubula.rc.rcp but this doesn't look simple at the first glance (since the Application stuff is handled in a "magic" way).
Comment 3 Zeb Ford-Reitz CLA 2011-12-09 04:38:44 EST
I think that writing an RcpApplicationImplClass is the right way to go. You could take a look at ComponentConfiguration.xml in the org.eclipse.jubula.provider.swt project for an idea of how to define the application component (specifically, the org.eclipse.swt.GraphicApplication component). You would need to define the component in the ComponentConfiguration.xml in the org.eclipse.jubula.toolkit.provider.rcp project.
Comment 4 Alexandra Schladebeck CLA 2013-12-13 09:09:39 EST
Doing some pre-Christmas cleaning - since there has been no activity on this for a while, I'm closing as wontfix. If anyone has new information or new arguments, please reopen.
Comment 5 Oliver Goetz CLA 2013-12-17 08:29:01 EST
Closed due to comment 4