Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Problems using executeExternalCommand
Problems using executeExternalCommand [message #1265601] Thu, 06 March 2014 04:55 Go to next message
Anders Forsell is currently offline Anders Forsell
Messages: 120
Registered: July 2009
Senior Member
Hi!

I want to automatically compare two Excel files to verify the output during regression testing.

1. I have created a TC which uses the "ub_appExecuteExternalCommand" . The TC takes two parameters "EXCEL_FILE_1 [String]" and "EXCEL_FILE_2 [String]".

2. The command that I specify for the ub_appExecuteExternalCommand is:
"D:/Program Files/ExcelCompare-0.3.1/bin/excel_cmp.cmd" "=EXCEL_FILE_1" "=EXCEL_FILE_2"

3. The expected exit code is set to 0

4. Then I run the TC with values:
EXCEL_FILE_1 = D:/test/A.xls
EXCEL_FILE_2 = D:/test/B.xls

=> Even though A.xls and B.xls differs the result is OK according to Jubula

If I run the command on the command-line and then check "echo %ERRORLEVEL%", it shows "1", i.e. the exit code is 1.

The only workaround for this is to include everything in the .cmd file and not use parameters to the execute external command, but that is not the solution we want.

Any idea how to solve this?

Regards,

Anders
Re: Problems using executeExternalCommand [message #1265720 is a reply to message #1265601] Thu, 06 March 2014 08:15 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
exit %%ERRORLEVEL%% at the end of the .cmd script
Re: Problems using executeExternalCommand [message #1265795 is a reply to message #1265720] Thu, 06 March 2014 10:16 Go to previous messageGo to next message
Anders Forsell is currently offline Anders Forsell
Messages: 120
Registered: July 2009
Senior Member
Thanks, it worked!
Re: Problems using executeExternalCommand [message #1267919 is a reply to message #1265795] Sun, 09 March 2014 16:19 Go to previous messageGo to next message
Anders Forsell is currently offline Anders Forsell
Messages: 120
Registered: July 2009
Senior Member
I am having problems when the file path EXCEL_FILE_1 or EXCEL_FILE_2 contain spaces.
Then it always fails for some reason...

What could be the problem?
Re: Problems using executeExternalCommand [message #1268444 is a reply to message #1267919] Mon, 10 March 2014 10:07 Go to previous message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1124
Registered: July 2009
Senior Member
Hi,

White spaces being problematic rings a bell. The docs for this are in the reference manual (search for execute external command and then find the second hit).

Hope that helps,
Alex
Previous Topic:Scout testing with Jubula
Next Topic:Create a Birt report with Jubula
Goto Forum:
  


Current Time: Fri Aug 22 09:57:07 EDT 2014

Powered by FUDForum. Page generated in 0.01980 seconds