Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » External sql command executed without effect
External sql command executed without effect [message #1180838] Mon, 11 November 2013 02:30 Go to next message
Martin Figel is currently offline Martin Figel
Messages: 4
Registered: November 2013
Junior Member
Hi,

I'm using a external command to clean up the database after changing values via GUI-Test. This is done by using 'ub_app_executeExternalCommand' with following parameters:

COMMAND [String]: "C:\\Coding\\Tools\\jisql-2.0.11\\update.cmd"
or COMMAND [String]: "C:\\Coding\\Tools\\jisql-2.0.11\\update.bat"
or COMMAND [String]: C:\\Coding\\Tools\\jisql-2.0.11\\update.cmd
or COMMAND [String]: C:\\Coding\\Tools\\jisql-2.0.11\\update.bat
EXPECTED_EXIT_CODE [Integer]: 1
LOCAL [Boolean]: true
TIMEOUT_IN_MILLISECS [Integer]: 10000

The script 'update.cmd':
java -classpath lib/jisql-2.0.11.jar;lib/jopt-simple-3.2.jar;lib/javacsv.jar;C:/Coding/Workspace/Deva2_Libs/ojdbc14.jar com.xigole.util.sql.Jisql -user franz -password hiho -driver oraclethin -cstring jdbc:oracle:thin:@myhost:1521:mysid -c ; -query "UPDATE VERSUCH.pre_achdat SET F_NUTZ=2,SUPPLIER_ID=2,POSIT=2 WHERE NUMMER=119;"


The script seems to be executed successfully via Jubula, since exit code = 1, but won't have any affect in the database. Observing the execution of the testscript doesn't show any popup of the command window, which is done when execting the cmd-file directly. Doing this, changes will be applied to the database pretty well.

OS: Windows 7 prof
DB: Oracle 11g 10.2.0.3.0
eclipse: Kepler 20130614-0229
Jubula PlugIns: Jubula Functional Testing 2.1.1.201309020759
Jubula Launch Support for Java / Swing 2.1.1.201309020759

I would be happy if someone would give me a hint to get this working.
Re: External sql command executed without effect [message #1187554 is a reply to message #1180838] Fri, 15 November 2013 01:54 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1055
Registered: July 2009
Senior Member
Hi there Martin,

The first thing I can think of is checking whether you've set the local parameter correctly - are you working on the same machine with the ITE and the Agent? If you're using the embedded agent, what happens if you use a separate agent?

Best regards,
Alex
Re: External sql command executed without effect [message #1187683 is a reply to message #1187554] Fri, 15 November 2013 03:20 Go to previous messageGo to next message
Martin Figel is currently offline Martin Figel
Messages: 4
Registered: November 2013
Junior Member
Hi Alexandra,

thank you very much for your reply! Since I'm using the eclipse Plugin, I'm starting the AUT agent on the same machine manually via eclipse, either via "Connect to Embedded AUT Agent" or "localhost: 6000" (Is that what you mean with separate agent?). Connecting via "localhost: 6000" does only connect if I connected via the "Embedded AUT Agent" before and disconnect. It seems the (embedded?) AUT Agent remains started.
index.php/fa/16735/0/

At the end unfortunately it doesn't make any difference how I start the AUT Agent concerning my db update problem.

The AUT ist started manually via the eclipse plugin button applying a AUT configuration using 'Executable File Name'="C:\Coding\Workspace\MyApp\MyApp.bat" before executing the script.
index.php/fa/16736/0/

The .bat-File looks like this:
java -classpath C:/Coding/Workspace/MyApp/bin;C:/Coding/Workspace/MyApp_Libs/*; com.festo.deva.Main

Could you please further explain what you mean with "set the local parameter", since I didn't apply any local parameters.


Best regards,
Martin
Re: External sql command executed without effect [message #1198124 is a reply to message #1187683] Wed, 20 November 2013 01:47 Go to previous message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1055
Registered: July 2009
Senior Member
Hi,

The local parameter is the LOCAL [Boolean]: true one. It specifies whether the command should be executed on the ITE machine or the agent machine - which in your case is the same one. I'm a bit stumped at the moment as to what the problem could be. Does the AUT require a restart after resetting the database perhaps?

Best regards,
Alex
Previous Topic:Easy changing of hierarchical IDs
Next Topic:Trigger for 'org.eclipse.jubula.client.core.function' extension point
Goto Forum:
  


Current Time: Mon Apr 21 00:48:39 EDT 2014

Powered by FUDForum. Page generated in 0.06470 seconds