Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Execute External Command not working correctly(Problems with spaces in path)
Execute External Command not working correctly [message #891776] Mon, 25 June 2012 21:07 Go to next message
Oscar Trejo-Soria is currently offline Oscar Trejo-Soria
Messages: 21
Registered: June 2012
Junior Member
Hi,

I was trying to run simple perl file by using "ub_app_executeExternalCommand". My perl has the following usage:
copy_file.pl file

If copy_files is able to copy the file successfully, it will return 0. Otherwise, it will return -1.

The parameters I was using for my test case were the following:

COMMAND: "C:\\scripts\\copy_file.pl" "={DEFAULT_PATH}"
where DEFAULT_PATH=C:\\Training Programs\\myProg\\eclipse\\plugins\\log.txt
EXPECTED_EXIT_CODE: 0
BOOLEAN: true
TIMEOUT_IN_MILLISECS: 10000

When I ran my testcase, executeExternalCommand failed. According the properties on the Functional Test Execution, the Error Details of "ub_app_executeExternalCommand" says that the Actual Value is 1.

After trying to find an answer to my problem, I found that if I modify the name of "Training Programs" directory to "Training_Programs" and of course changing my DEFAULT_PATH variable, Jubula is able to successfully complete the test case.

So my question would be: Is Jubula able to distinguish spaces in paths or did I make a mistake in my first attempt?
Re: Execute External Command not working correctly [message #892126 is a reply to message #891776] Wed, 27 June 2012 07:28 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1155
Registered: July 2009
Senior Member
Hi,

There is information on whitespaces in external commands in the reference manual. Follow this link then search for "execute external command" the second hit is the action and parameter description.

HTH,
Alex
Re: Execute External Command not working correctly [message #892230 is a reply to message #892126] Wed, 27 June 2012 13:09 Go to previous messageGo to next message
Oscar Trejo-Soria is currently offline Oscar Trejo-Soria
Messages: 21
Registered: June 2012
Junior Member
Hi Alex,

That is what I exactly did as explained in Reference Manual, but I did not have luck. That is why I was asking if there is something wrong what I wrote. Any suggestions.

Thanks in advance.
Re: Execute External Command not working correctly [message #892418 is a reply to message #892230] Thu, 28 June 2012 07:53 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1155
Registered: July 2009
Senior Member
Are you working on Windows? If so, there is this line in the documentation I linked above "Windows cmd.exe can only accept quotes in either the parameter or the command." That could explain the behaviour.

HTH,
Alex
Re: Execute External Command not working correctly [message #893104 is a reply to message #892418] Mon, 02 July 2012 16:07 Go to previous messageGo to next message
Oscar Trejo-Soria is currently offline Oscar Trejo-Soria
Messages: 21
Registered: June 2012
Junior Member
Yes, I am using Windows, but here is the thing. If I do not put the quotes in both command and parameter, my command will not work. That is why I was asking.
Re: Execute External Command not working correctly [message #893245 is a reply to message #893104] Tue, 03 July 2012 10:38 Go to previous message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1155
Registered: July 2009
Senior Member
If there's a discrepancy between the documentation and the behaviour, then please enter a bug for it following these guidelines.

Thanks,
Alex
Previous Topic:Removing Parameters from a referenced Test Case with parameters already set in Test Suite
Next Topic:Regular expression is failing in latest Jubula
Goto Forum:
  


Current Time: Thu Oct 23 18:06:59 GMT 2014

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

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