It's all about the answers!

Ask a question

Unable to execute RFT scripts from RQM


Rajesh Avanthi (10815145173) | asked Jan 08 '15, 12:33 a.m.
We have a RFT script (ExecutionDriver.java) which in-turn calls multiple other scripts within it.
The script execution works fine from RFT.

We have imported the RFT script (ExecutionDriver.java) into RQM. Also imported multiple scripts which are being called by the primary script (ExecutionDriver.java) into RQM and they appear in different TestPlans and TestCases.
However when we execute the primary script (ExecutionDriver.java) from RQM, it does not execute the rest of the called scripts defined within it, though these called scripts are already imported into RQM and present in different TestCases and Test Plans. Only the primary script / main script (ExecutionDriver.java) executes, skipping the rest called scripts.

Appreciate any inputs on how to address such scenario.  Thanks

2 answers



permanent link
John Nason (2.4k1012) | answered Jan 08 '15, 5:36 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi Rajesh,
Check out comment 5 in Scripts calling other scripts cannot be executed form RQM using RFT adapter (83074)

Hope that helps.
Regards,
John

Comments
Rajesh Avanthi commented Jan 09 '15, 5:10 a.m.

Thanks John.
Sorry My mistake. A slight correction here.

The  main RFT script (ExecutionDriver.java) which inturn calls multiple sub-scripts are already imported into RQM. However the sub-scripts are present under different TestCases and TestSuites.

When the main script is executed, the sub-scripts (which are present in different TestSuites / TestCases) should also execute and output the result file into an excel sheet.
Can this be achieved.??

Please note that if the main script is executed from RFT then the sub-scripts are executed successfully and all the results are getting written into an excel sheet which is present locally on the machine.


permanent link
Ara Masrof (3.2k15) | answered Jan 09 '15, 9:41 a.m.
JAZZ DEVELOPER
  I'm assuming the Parent RFT script looks something like this:

public class Parent extends ParentHelper
{
/**
 * Script Name   : <b>Parent</b>
 * Description   : Functional Test Script
 * Original Host : WinNT Version 6.1  Build 7601 (S)
 */
public void testMain(Object[] args) 
{
startApp("ClassicsJavaA");
// Frame: ClassicsCD
/**
some code
*/
callScript("Child1");

}
}

In this case Child1 is the RFT script being called in the parent script
Child1 does not need to be imported into RQM; from an RQM perspective, its only executing the Parent test script; “callScript("Child1");” is simply function call within the Parent script
Most likely what you are running into is that the script being reference in the callScript(); can not be found, thus it is never executed. You could wrap some error logging code around the callScript(); function to try catch an exception
Do you know how the parent script was imported (i.e. A shared location or a location location)? If it was imported from a shared location, at runtime, its copied to the adapter system in a temp location where it is run; it may be that the running from the temp location causes the callScript(); function to fail to find the script in question

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.