[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jubula-dev] [Building jubula] Problem with debugging testexec in eclipse
|
Hello Egor,
again - please find the answers inlined:
On 11.11.2013 14:15, Egor wrote:
Hello Markus!
Wow. Thanks for such a detailed answer on my question!
No problem - you're welcome!
First about enhancements - I'm trying to get to know Jubula for my
master thesis - generally I'm discussing with my chef the idea of
adding command flow options to the test model. Generally it's supposed
to be loops and simple branching in some way. That's why I was aiming
on debugging testexec, in order to get an idea how model from database
is communicated with autagent (haven't found details on that in the
documents I looked through). I can make a look on how model is
persisted in database simply by looking into MySQL, but for the way
model is communicated for execution (the whole model/step-by-step or
smth else) I have to debug it... and probably if i dream about
implementing this command flow - I need to be able to control how the
model is communicated, right? :)
Debugging sounds good - unfortunately we don't have that much of
developer documentation. However we've already done three master thesis
in the recent past covering a pretty similar topic you're researching
in: model based testing / deriving test cases from UML activity diagrams
based on EML / the Eclipse papyrus project. Also implementing features
such as branch coverage test case and diagram generation (vice versa).
They've been created in collaboration with the TU Braunschweig and the
"Ostfalia - University of Applied Sciences". If you're interested we
could - at some point in time - make a conference call / or you could
even visit us here in Braunschweig, Germany :-)
As about ant build file - as I've understood it's simply an envelope
to run maven build with more memory allocated, right? After looking
through mailing archives I am starting with making maven build first.
Tried ant as well, but it didn't work smoothy, showing lots of errors.
Can give more details on this, but in the end, after i change ant
script a bit (generally on some reason exec command doesn't accept
multiple arguments and property as base directory variable), there is
an error of non-existing mojo during verify run of maven on
app.dashboard project. Using 1.9.2 ant version:
"[exec] [INFO] Internal error in the plugin manager executing goal
'org.eclipse.tycho:tycho-source-plugin:0.18.0:plugin-source': Unable
to find the mojo 'plugin-source' (or one of its required components)
in the plugin 'org.eclipse.tycho:tycho-source-plugin' "
Now moving to the most exciting topic - the build itself. I looked
into your commit to "master" branch - as I didn't have *.app.testexec
project in my workspace, I've cloned "master" branch instead of
"keppler" one. This worked better than before, thanks for your help!
Yes - just keep in mind that master is also our current development
branch. As you are currently using some of our internal / non-defined
APIs just keep in mind that things might change ;-)
Speaking of changes: we've recently renamed *.app.cmd into
*.app.testexec - this is why it's been missing on the 7.2 branch.
But at the same time I ran into the next problem. Probably MySQL
wasn't that much planned to be used with Jubula, and probably that's
why I face these issues. Generally as my jubula ITE, downloaded from
BREDEX site, shows me error on connecting to H2 database (both
embedded and the one I've tried to install), I continue using MySQL.
These causes an error on the database connection step, that sounds
like this:
"Sun Nov 10 20:37:35 CET 2013Database:Connecting as "root" to
"jdbc:mysql://localhost:3306/jubula"...
[EL Severe]: 2013-11-10 20:37:40.775--ServerSession(106193257)--Local
Exception Stack:
Exception [EclipseLink-4003] (Eclipse Persistence Services -
2.3.1.v20110908-r10021):
org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Configuration error. Class
[com.mysql.jdbc.Driver] not found.
at
org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82)
..." (log from console attached)
Generally it complains about JDBC database driver absence. I tried to
solve it in the number of ways using MySQL connector/J jar file (i've
checked - corresponding class is included in the jar):
1. Add corresponding jat to JRE (it is added, it shown on the build
path of the project)
2. Add corresponding jar directly into project build path (both
org.eclipse.jubula.client.core and org.jubula.app.testexec)
3. Make wrapper for corresponding jar to imitate bundle and add it to
the target platform (local folder with bundle jar as location for
platform definition)
4. Installing Jubula Database drivers from marketplace on the used
Eclipse (saw this recommendation o forum for this exception, but it
was in a bit different context... tried it anyways).
All this gave no result. The only way I was able to change smth was by
adding to the manifest of org.eclipse.jubula.client.core the following:
"Bundle-ClassPath: .,
resources/,
lib/dom4j-1.6.1.jar,
lib/mysql.jar",
in overall just directly adding mysql driver to classpath in bundle
definition as local jar. This still didn't allow me to enjoy debugging
testexec, as resulted in the following error:
"!ENTRY org.eclipse.core.jobs 4 2 2013-11-10 20:46:44.238
!MESSAGE An internal error occurred during: "Database:Connecting...".
!STACK 0
java.lang.NoClassDefFoundError:
org/eclipse/persistence/internal/libraries/antlr/runtime/Parser
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)" (log from
console attached)
Adding antlr bundle the same way as I"ve added mysql driver didn't
help and now I'm out of options. Just in case also attach full list of
errors I get in eclipse (this time there a bit more). As target
platform I still use juno.target
uuuph. I'm sorry that this problem description happen to be so
space-consuming. I really hope that solution is very simple and it
doesn't take a lot of time. Probably I've just missed something really
obvious as I'm not experienced with OSGi/RCP/RAP and etc.
Your actions sound (approximatly) correct: Jubula and it's source code
has to be EPL conform and may not be based on non EPL libraries - which
is why there is no out-of-the box IDE support of Jubula and MySQL
driver. However we've got an update site
(http://update.bredex.de/jubula) which holds an optional fragment for
our core-bundles to provide those drivers e.g. for you IDE / ITE. Simply
add the database feature
(com.bredexsw.jubula.client.core.driver.feature) within that update site
to your target definition and add it (the fragement
com.bredexsw.jubula.client.core.driver) to the launch-configuration of
your IDEs testexec. This should add the support for MySQL database
instances. For the missing antlr parser try adding the
"org.eclipse.persistence.antlr" bundle and it's dependencies to your
testexec launch configuration. If this should still lead to a failing
testexec startup - I'd recommend filing a bug against Jubula @
bugs.eclipse.org and work - for now - with the built-in h2-database.
Best regards,
Sukhanov Egor
eg.sukhanov@xxxxxxxxx <mailto:eg.sukhanov@xxxxxxxxx>
On 08.11.2013, at 10:08, Markus Tiede wrote:
Hello Egor,
please find the answers inlined:
On 07.11.2013 19:06, Egor wrote:
Hello there!
I"m right now in process of building jubula (for quite a while
already) to start working on my master thesis, that involves
enhancing it a bit.
Sounds good - could you maybe give some more information what kind of
enhancements you want to realize? ... so that we can point you in the
right direction how to achieve this?
The problem is I can't achieve a working build from the source code.
Generally I want to run command line client in debug mode in
Eclipse, and its not working by now :D
Just a bit about the environment:
- Mac OSX 10.6.8
- Eclipse for RCP and RAP Developers (Kepler SR1 for x64 Mac)
- Source code from Kepler branch
(http://git.eclipse.org/gitroot/jubula/org.eclipse.jubula.core.git)
- Target platform is set to juno.target
- Java 1.6
- MySQL 5.6.14 (MacOS x64)
Steps i did:
1. Builded it with maven (target platform juno)
For that I'd recommend to build it from the command line first by
simply invoking "ant" directly within the
org.eclipse.jubula.core.git-clone - this should successfully build
the Jubula feature as well as the dashboard and in the meantime
generate all necessary artifacts to setup your Eclipse IDE more easily.
2. created a test that works both from jubula ITE and existing
testexec in jubula package
After the maven build and refreshing workspace i still get number of
errors. Among them there are some in org.eclipse.jubula.examples.* -
i dont mention them. The list of the rest is attached to this
letter. Generally there are problems in org.jubula.rc.swt.utils and
org.jubula.rc.rcp.e3.specific modules.
These problems are "expected" - as some of our projects require a
different target platform. You can simply close all projects in the
"org.eclipse.jubula.examples.*" namespace. The SWT utils problem is
known and Mac OS X build environment specific (due to the
automatically bound SWT fragment implementation) but does not - afaik
- has any side effects. The *e3* specific modules compile against a
3.x target platform and hence Eclipse only supports one target
platform being set at once they report API errors in the IDE. However
when building from the command line the different target platforms
are automatically taken into account by maven / tycho.
3. Run "org.eclipse.jubula.app.cmd.launcher" as eclipse application
This is the correct application to launch - and should start up the
testexec from within your IDE.
works, console output complains about missing command line arguments
and shows me tooltip
4. Run "org.eclipse.jubula.app.cmd.launcher" as eclipse application
*with proper command line arguments*
*
*
I get the following error:
"!SESSION 2013-11-07 18:45:50.151
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_22
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -application
org.eclipse.jubula.app.cmd.launcher -project TestProject -version
1.0 -testsuite TestSuiteFirst -server localhost -port 59999 -autid
adderSwing SwingAut -resultdir
/Users/sukhanov/Documents/thesis/report -datadir
/Users/sukhanov/Documents/thesis/report -language en_US -dbuser root
-dbpw pause -dburl jdbc:mysql://localhost:3306/jubula
Command-line arguments: -application
org.eclipse.jubula.app.cmd.launcher -data
/Users/sukhanov/Documents/thesis/workspace/../runtime-org.eclipse.jubula.app.cmd.launcher
-dev
file:/Users/sukhanov/Documents/thesis/workspace/.metadata/.plugins/org.eclipse.pde.core/org.eclipse.jubula.app.cmd.launcher/dev.properties
-consoleLog -project TestProject -version 1.0 -testsuite
TestSuiteFirst -server localhost -port 59999 -autid adderSwing
SwingAut -resultdir /Users/sukhanov/Documents/thesis/report -datadir
/Users/sukhanov/Documents/thesis/report -language en_US -dbuser root
-dbpw pause -dburl jdbc:mysql://localhost:3306/jubula
!ENTRY org.eclipse.osgi 4 0 2013-11-07 18:45:56.774
!MESSAGE Application error
!STACK 1
org.eclipse.jubula.tools.exception.GDConfigXmlException
at
org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder.getCompSystem(ComponentBuilder.java:194)
at org.eclipse.jubula.client.core.ClientTest.<init>(ClientTest.java:203)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at
org.eclipse.jubula.client.core.ClientTestFactory.getClientTest(ClientTestFactory.java:44)
at
org.eclipse.jubula.app.cmd.batch.ExecutionController.<init>(ExecutionController.java:327)
at
org.eclipse.jubula.app.cmd.batch.ExecutionController.getInstance(ExecutionController.java:341)
at org.eclipse.jubula.app.cmd.Client.preRun(Client.java:63)
at
org.eclipse.jubula.client.cmd.AbstractCmdlineClient.run(AbstractCmdlineClient.java:401)
at
org.eclipse.jubula.client.cmd.AbstractLauncher.start(AbstractLauncher.java:26)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
An error has occurred. See the log file
/Users/sukhanov/Documents/thesis/runtime-org.eclipse.jubula.app.cmd.launcher/.metadata/.log."
If i try starting not cmd client - i still get this error in log file.
This indicates that you did not add the dependencies to our
"org.eclipse.jubula.toolkit.provider.*" - adding all of these bundles
(and their dependencies) to the plug-ins of the application you're
launching should resolve the problem with a non-existing
"Component-System". There is no hard dependency between the testexec
and those bundles as there are coupled pretty loosely.
Please, can u help me with fixing this?
I appreciate any help, cause I am a bit desperate after trying to
build jubula for three weeks already and always running in random
problems.
Don't hesitate to ask earlier in the future ;-) - I'll add a
pre-defined launch-configuration for the testexec for the master
branch today and place it here:
"org.eclipse.jubula.project.configuration/ide-launch/testexec.launch"
to hopefully avoid problems invoking the testexec from the IDE in future.
Thanks a lot in advance!
=
Best regards,
Sukhanov Egor
eg.sukhanov@xxxxxxxxx <mailto:eg.sukhanov@xxxxxxxxx>
<mailto:eg.sukhanov@xxxxxxxxx>
_______________________________________________
jubula-dev mailing list
jubula-dev@xxxxxxxxxxx <mailto:jubula-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/jubula-dev
_______________________________________________
jubula-dev mailing list
jubula-dev@xxxxxxxxxxx <mailto:jubula-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/jubula-dev
=
_______________________________________________
jubula-dev mailing list
jubula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jubula-dev
--
BREDEX GmbH
Mauernstr. 33
38100 Braunschweig
Tel.: +49-531-24330-0
Fax: +49-531-24330-99
http: www.bredex.de
Geschäftsführer: Achim Lörke, Ulrich Obst, Andreas Vogel
Amtsgericht Braunschweig HRB 2450