Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » How to best debug an rcp accessibility plugin?
How to best debug an rcp accessibility plugin? [message #689342] Mon, 27 June 2011 13:32 Go to next message
Joern Dreyer is currently offline Joern DreyerFriend
Messages: 7
Registered: June 2011
Location: Kassel, Germany
Junior Member

After having a working test-case, I started implementing an rcp accessibility plugin for UML Lab class diagram figures. To debug it, I will have to create a new AUT configuration that starts the UML Lab RCP in debug mode, don't I. What is the recommended way of debugging accessibility plugins for custom figures?
Re: How to best debug an rcp accessibility plugin? [message #689432 is a reply to message #689342] Mon, 27 June 2011 16:21 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-ReitzFriend
Messages: 33
Registered: November 2010
Member
Yes; if you wish to debug your Accessibility plug-in, then you will need to debug the AUT. The best tool for debugging code that runs in the context of the AUT is remote debugging. I would recommend one of the following methods:

A. Create an AUT Configuration specifically for remote debugging. You can enter the necessary JVM arguments ("-vmargs -Xdebug ...") for remote debugging as the last entry in the "AUT Arguments" field of the AUT Configuration dialog. Be sure to include the JVM arguments from your <application>.ini file as well, as they will be overridden.

B. Modify your AUT's <application>.ini to include the necessary JVM arguments for remote debugging. I prefer this method when I have control over the AUT (i.e. it is a local, rather than a shared, installation) because I then do not need to worry about overriding the AUT's JVM arguments.

- Zeb
Re: How to best debug an rcp accessibility plugin? [message #689902 is a reply to message #689432] Tue, 28 June 2011 15:07 Go to previous messageGo to next message
Joern Dreyer is currently offline Joern DreyerFriend
Messages: 7
Registered: June 2011
Location: Kassel, Germany
Junior Member

Tried B first: works nicely. However the RCP is obfuscated so the Adapter won't work there.

A: used java.exe as the "Executable File Name" and copied the cmd line from my eclipse debug view as the "AUT Arguments". The AUT starts up nicely and remote debugging works, but
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=n,address=localhost:8787,server=y -Xmx2500m -XX:MaxPermSize=512m -Declipse.pde.launch=true -Dfile.encoding=Cp1252 -classpath very/long/path/to/eclipse_launcher.jar org.eclipse.equinox.launcher.Main -product our.product.name.is.also.quite.long -data another/long/path/to/a/workspace/to/prevent/the/workspace/dialog/from/popping/up -configuration "file:yet/another/long/path/to/the/configuration/" -dev "file:last/but/not/least/another/long/path/to/some/dev.properties" -os win32 -ws win32 -arch x86_64 -nl de_DE -consoleLog
with correct paths will exceed 400 chars ... resulting in the following error when jubula tries to store result data:
2016: General Database error.
  org.eclipse.jubula.client.core.persistence.PMException: Value too long for column AUT_CMD_PARAMETER VARCHAR(400): '-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=n,address=localhost:8787,server=y -Xmx2500m -XX:MaxPermSize=512m -Decli... (744); SQL statement:
  INSERT INTO TESTRESULT_SUMMARY (ID, AUT_AGENT_NAME, AUT_CMD_PARAMETER, AUT_CONFIG_NAME, AUT_HOSTNAME, AUT_ID, AUT_NAME, AUT_OS, COMMENT_DETAIL, COMMENT_TITLE, AUT_TOOLKIT, INTERNAL_AUT_CONFIG_GUID, INTERNAL_AUT_GUID, INTERNAL_GUID, INTERNAL_MONITORING_ID, INTERNAL_PROJECT_GUID, INTERNAL_PROJECT_ID, INTERNAL_TEST_JOB_GUID, INTERNAL_TESTSUITE_GUID, MONITORING_VALUE, M_VALUE_TYPE, PROJECT_MAJOR_VERSION, PROJECT_MINOR_VERSION, PROJECT_NAME, MONITORING_REPORT, M_REPORT_WRITTEN, TEST_JOB_NAME, TEST_JOB_START_TIME, TS_DATE, TS_DURATION, TS_END_TIME, TS_EVENTHANDLER_TESTSTEPS, TS_EXECUTED_TESTSTEPS, TS_EXPECTED_TESTSTEPS, TS_FAILED_TESTSTEPS, TS_LANGUAGE, TS_NAME, TS_RELEVANT, TS_START_TIME, TS_STATUS, INTERNAL_VERSION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [90005-117]
  	at org.eclipse.jubula.client.core.persistence.PersistenceManager.handleDetailedPersistenceException(PersistenceManager.java:99)
  	at org.eclipse.jubula.client.core.persistence.PersistenceManager.handleDBExceptionForAnySession(PersistenceManager.java:187)
  	at org.eclipse.jubula.client.core.persistence.Hibernator.commitTransaction(Hibernator.java:754)
  	at org.eclipse.jubula.client.core.persistence.TestResultSummaryPM.storeTestResultSummaryInDB(TestResultSummaryPM.java:130)
  	at org.eclipse.jubula.client.core.ClientTest.writeTestresultToDB(ClientTest.java:1116)
  	at org.eclipse.jubula.client.core.ClientTest$4.run(ClientTest.java:973)
  	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


To be honest, I think the way I configured the AUT might not be the best for testing / debugging an eclipse application from a workspace. Any suggestions?

Re: How to best debug an rcp accessibility plugin? [message #689908 is a reply to message #689902] Tue, 28 June 2011 15:15 Go to previous message
Zeb Ford-Reitz is currently offline Zeb Ford-ReitzFriend
Messages: 33
Registered: November 2010
Member
Keep in mind that if your classes are obfuscated, your Adapter will also need to be included in the obfuscation so that it can properly interact with the AUT in a deployed test environment (since testing from the IDE can only get you so far).

With that in mind, you might consider placing the command line that you mentioned into a shell script or batch script. Then you could use that script as the Executable File Name for the AUT Configuration. That should at least get around the database constraints.
Previous Topic:Connecting to Website and Testing
Next Topic:Eclipse Jubula on different computers
Goto Forum:
  


Current Time: Tue Apr 23 12:55:39 GMT 2024

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

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

Back to the top