robotframework / RIDE

Test data editor for Robot Framework
Apache License 2.0
964 stars 379 forks source link

Custom Test Runner works only with exe and batch files in Windows XP #778

Closed yanne closed 9 years ago

yanne commented 9 years ago

Originally submitted to Google Code by c.martin.taylor on 14 Mar 2011

My PC is running Window XP SP3. This is the only platform on which I've tried this. Unzip the attached file to see the simple RF project configuration I was using. I tried to configure MyRunner.py as a custom test runner. When I use RIDE's Runner plugin to run this custom script I get an error dialog like the attached screenshot. When I run MyRunner.py with the same parameters as RIDE's Runner passes to it in a CMD window I get this: C:_DevExperiments_\RobotFramework\RFPythonVariables\MyRunner.py --argumentfile c:\docume~1\a0868050\locals~1\temp\RIDE3yoxja.d\argfile.txt --listener C:\Python26\lib\site-packages\robotide\contrib\testrunner\SocketListener.py:5010 C:_DevExperiments\RobotFramework\RFPythonVariables MyRunner: Called by RIDE MyRunner.main: argv=['--argumentfile', 'c:\docume~1\a0868050\locals~1\temp\RIDE3yoxja.d\argfile.txt', '--listener', 'C:\Python26\lib\site-packages\robotide\contrib\testrunner\SocketListener.py:5010', 'C:_Dev_Experiments_\RobotFramework\RFPythonVariables']

This shows that MyRunner.py runs just fine with these parameters and that the bug must be in how RIDE's Test Runner invokes a custom runner script.

yanne commented 9 years ago

Originally submitted to Google Code by @mkorpela on 16 Mar 2011

For some reason the executor seems to try to run the script as a win32 application.. The script works in Linux.

Work around (for now):

Make a batch file: C:_Dev_Experiments\RobotFramework\RFPythonVariables\runner.bat

with following content: python C:_Dev_Experiments\RobotFramework\RFPythonVariables\MyRunner.py %*

yanne commented 9 years ago

Originally submitted to Google Code by jagadees... on 5 May 2011

Hi ,

I am facing similar kind of problem in Robot IDE framework,when i started executing the testcase using custom script executopn method , it logs some garbage value in logs and Reports before the testsuite name or title.Kindly let me know the work around to remove this garbage ASAP.

Note:

Using Robot Framework & IDE - Version 0.35.1 running on Python 2.7.1 using Robot Framework 2.5.7.

Custom script using Jybot.

@⁠echo off

set sikuli_jar=C:\Program Files\SikuliX\sikuli-script.jar

set CLASSPATH=%sikuli_jar% set JYTHONPATH=%sikuli_jar%/Lib :: This will create a timestamp like yyyy-mm-yy-hh-mm-ss set TIMESTAMP=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%-%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%

jybot --pythonpath=%CUSTOM_LIBRARY_PATH% ^ --outputdir=%EAGLE_HOME%/TestResult/%TimeSTAMP% ^ --loglevel=TRACE ^ %*

Thanks in advance ,

Cheers, Jack

yanne commented 9 years ago

Originally submitted to Google Code by @jussimalinen on 14 Aug 2012

At least with the current 0.47 version, you can run python files directly by specifying python.exe as your custom runner (full path needed, so c:\python27\python.exe or so) and then your file as argument.

Does this workaround work for you?

yanne commented 9 years ago

Originally submitted to Google Code by @mkorpela on 1 Nov 2012

As there is a workaround for this issue, and no comments have been added since putting this issue to Pending state in August, I'm WontFix:in this issue.