It's all about the answers!

Ask a question

RQM cannot invoke "cmd.exe" configured application in RFT, while running the script


Sunil Kumar R (1.1k13044) | asked Jun 12 '13, 10:36 a.m.
JAZZ DEVELOPER
edited Jun 12 '13, 10:37 a.m.
 RQM cannot invoke "cmd.exe" configured application in RFT, while running the script?

RQM v4.0.1 and higher
RFT v8.2.1 and higher

An RFT script with the actions as below when executed from RFT eclipse UI, command line, RQM has the behavior given below..

script content...
startApp("cmd_prmt");
sleep(5);
// Window: cmd.exe: Administrator: C:\windows\system32\cmd.exe
administratorCWindowsSystem32C().click();
administratorCWindowsSystem32C().inputKeys("cd /{ENTER}");
administratorCWindowsSystem32C().inputKeys("cd Pro{TAB}");
administratorCWindowsSystem32C().inputKeys("{ENTER}");
administratorCWindowsSystem32C().inputKeys("dir{ENTER}");
administratorCWindowsSystem32C().inputKeys("exit{ENTER}");
behavior...

eclipse UI - works!
command line - works!
RQM UI - does not work {invokes script, fails to start application!! and hence fails}

command : (same as in RFT adapter console, works when invoked directly on RFT adapter machine)
"C:\IBM\RFT\jdk\jre\bin\java.exe" -Drqm.mode=true -Drqm.task="C:\Users\ADMINI~1\AppData\Local\Temp\RQMRFTTask3040109936879455416.xml" -jar "C:\IBM\RFT\FunctionalTester\bin\rational_ft.jar" -datastore "C:\RFTwork\TProject1" -rt.log_format xml  -iterationcount -1 -rt.bring_up_logviewer false  -execmode rqm  -playback cmdPrmt

Why is the "cmd.exe" invoke failing in RQM playback? issue not observed for other applications eg: calc.exe, browser, classicJava..

Accepted answer


permanent link
Deepa Doraswamy (4712) | answered Jun 19 '13, 3:19 a.m.
JAZZ DEVELOPER
There is a technote addressing this issue.
http://www-01.ibm.com/support/docview.wss?uid=swg21585220  -Running an RFT Script From RQM results in the inability to open a command prompt window .

Thanks,
Deepa
Sunil Kumar R selected this answer as the correct answer

Comments
Sunil Kumar R commented Jun 19 '13, 8:35 a.m.
JAZZ DEVELOPER

 Thanks Deepa, that helps..

+ points from RFT perspective

RFT execution through adapter uses command line, so when a cmd is already open it requires additional code to invoke a new command line.

One can verify the same with the steps as below:-
a. Open a command prompt using "Start > Run > cmd".
b. Type "cmd" in the command prompt opened by a. : No action
c. Type "cmd.exe /k start cmd.exe" instead, and it opens a new command prompt.

When RFT script is invoked through RQM adapter similar situation is faced and hence additional code (as shown in the technote above) is needed to help invoke cmd promt.

2 other answers



permanent link
Jing Qian (12632) | answered Jun 17 '13, 4:55 p.m.
JAZZ DEVELOPER
Is there any error message on the console or log?

Comments
Sunil Kumar R commented Jun 18 '13, 8:05 a.m.
JAZZ DEVELOPER

Nope there are no errors.. 


Infact RFT script playback goes ahead without problems (even though the cmd is not opened by the playback)..

08:02:36:766 AM Starting Adapter
08:02:36:956 AM Login to https://clm.jkebanking.net:9443/qm   <Project Area: = JKE Banking (Quality Management)>
08:03:18:715 AM Execution request: C:\RFTwork\TProject1\cmdPrmt received
08:03:18:821 AM Executing RFT command "C:\IBM\RFT\jdk\jre\bin\java.exe"  -Drqm.mode=true -Drqm.task="C:\Users\ADMINI~1\AppData\Local\Temp\RQMRFTTask2662736152400760501.xml" -jar "C:\IBM\RFT\FunctionalTester\bin\rational_ft.jar" -datastore "C:\RFTwork\TProject1" -rt.log_format xml  -iterationcount -1 -rt.bring_up_logviewer false  -execmode rqm  -playback cmdPrmt
08:03:55:793 AM Execution of script cmdPrmt done
 


permanent link
Deepa Doraswamy (4712) | answered Jun 18 '13, 4:30 a.m.
JAZZ DEVELOPER
Hi Sunil,
This seems to be an issue with the RFT script. Looks like you may have to copy the referenced resources to the RFT customization folder. Normally this can be found at C:\ProgramData\IBM\RFT\customization folder however please confirm with RFT Team regarding this.
Thanks,
Deepa

Comments
Sunil Kumar R commented Jun 18 '13, 8:07 a.m.
JAZZ DEVELOPER

Deepa, I have tested with calc.exe as the AUT and this playback works fine through RQM web ui execution..


So the fault seems to be only when "cmd.exe"  is involved as an app..
Yes, I am aware of the customization folder but should the behavior be same for "calc.exe" as an app then?

Best Regards, Sunil

Your answer


Register or to post 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.