RQM Command Line Adapter - Using Perl on windows
I have managed to get the RQM CLA configured and am able to associate with a test script.
Problem I have is when I try and execute a basic Perl script:
C:\Perl\bin\Perl.exe C:\read_write.pl
I see the error:
Created Commandline Adapter
Cannot run program "C:\Perl\bin\Perl.exe C:\read_write.pl": CreateProcess error=2, The system cannot find the
file specified
Am I missing something simple here, I can run the above from a windows command prompt
|
3 answers
Hi Paul,
The command-line adapter should inherit what ever environment variables are available in the shell from which you started the adapter. Please the full path to Perl when defining the script in RQM UI. When editing the script in RQM, select the option that says use resource local to the test machine and use the select adapter button, to specify the directory containing perl. Another option would be to add the directory containing Perl to the System PATH environment variable in which case all processes should see it. Thanks, Deepa |
Hi Deepa,
I have the exact same problem. I'm using Windows 7 on test machine and have C:\Perl and C:\Perl\bin in the %Path% variable. Executing the command on CMD works, it doesn't matter if I use just "perl PATH_TO_PERL_SCRIPT" or "C:\Perl\perl.exe PATH_TO_PERL_SCRIPT" or "C:\Perl\perl PATH_TO_PERL_SCRIPT".
The version of Command Line Adapter is 4.0.3
I don't know how to handle it... I need to run tests on windows machines and I need to use perl for the test framework.
Is there an other requirement which I'm not compliant with at the moment? The logfile looks like:
15:40:24,479 [main] INFO com.ibm.rqm.adapter.commandline - Adapter is reconnecting. Using saved configuration information from Config2.ini
15:40:24,881 [main] INFO com.ibm.rqm.adapter.library - Successfully created an HTTP client
15:40:25,432 [main] INFO com.ibm.rqm.adapter.library - The adapter is now connected
15:40:31,496 [main] INFO com.ibm.rqm.adapter.commandline - Created Commandline Adapter
15:41:15,025 [Thread-2] ERROR com.ibm.rqm.adapter.commandline - Cannot run program "C:\Perl\bin\perl.exe C:\workspaces\arbeit\PE5\test-case-toolkit\RQMTCSynchronizer\startRQMCommandLineAdapterScript.pl": CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "C:\Perl\bin\perl C:\workspaces\arbeit\PE5\test-case-toolkit\RQMTCSynchronizer\startRQMCommandLineAdapterScript.pl": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at com.ibm.rqm.adapter.commandline.CommandLineAdapter.startProcess(CommandLineAdapter.java:384)
at com.ibm.rqm.adapter.commandline.CommandLineAdapter.runTest(CommandLineAdapter.java:194)
at com.ibm.rqm.adapter.commandline.CommandLineExecutionThread.run(CommandLineExecutionThread.java:351)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 4 more
Comments
Konrad O.
commented Jan 13 '14, 12:00 p.m.
I tried to workaround that using a bat script which looks like the following, but the errorlevel is always 0 while execution using adapter. On cmd it works.
With that script the execution of perl script works, but without the right exitcode the reporting is not useful...
workaround.bat:
perl.exe C:\workspaces\arbeit\PE5\test-case-toolkit\RQMTCSynchronizer\startRQMCommandLineAdapterScript.pl -overwrite force
exit %errorlevel%
|
Okay, I found it, it was my fault.
I just typed in the following on test script in RQM:
Command: perl PATH/TO/SCRIPT
Arguments: -overwrite force
This causes errors, when I changed that in this way it worked:
Command: perl
Arguments: PATH/TO/SCRIPT -overwrite force
I hope that solves the problem of Paul, too.
But it is still interesting why the first way worked on linux...
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.