It's all about the answers!

Ask a question

Scripts pass in RFT but fail in RQM


Brian Cam (63188) | asked Mar 14 '11, 1:40 p.m.
Lots of my RFT scripts do database verifications. Basically, they execute a query in our test SQL Server database and check the results. These scripts run fine in RFT. But they fail when I run them in RQM and they always fail at the database catch block. It looks like it fails to connect to the database. Does anybody knows why? Is there a database setting in RQM I need to set? Thanks in advance.

Brian

5 answers



permanent link
Yaqian Fang (2013223) | answered Mar 15 '11, 1:56 a.m.
Maybe try capture the command received in the RFT adapter console (if you are using the RFT RQM adapter), run the command in a command line prompt and see what it gives you. The classpath etc. is different when u run in RFT directly from run in a command line.

Lots of my RFT scripts do database verifications. Basically, they execute a query in our test SQL Server database and check the results. These scripts run fine in RFT. But they fail when I run them in RQM and they always fail at the database catch block. It looks like it fails to connect to the database. Does anybody knows why? Is there a database setting in RQM I need to set? Thanks in advance.

Brian

permanent link
Brian Cam (63188) | answered Apr 25 '11, 11:22 a.m.
I looked at the executed command and it didn't have the sqljdbc4.jar that I added to Java Build Path in RFT project. How do I add this to RQM so it includes this .jar file for every script?

permanent link
Yaqian Fang (2013223) | answered Apr 26 '11, 6:49 p.m.
I looked at the executed command and it didn't have the sqljdbc4.jar that I added to Java Build Path in RFT project. How do I add this to RQM so it includes this .jar file for every script?


put the path to the jar file in Script Arguments field under Script Arguments section. The path is local to your RFT script.

permanent link
Manish Ranjan (26) | answered Apr 27 '11, 7:43 a.m.
JAZZ DEVELOPER
One way to figure out all the dependency your script is using is to Run process explorer while playback is on From IDE and then the command , you will get the detailed instruction on what all jars (External) it is referencing
Then you can put all that dependency in customization folder and Run .
Ideally you should not run in to any problem

http://technicalshowoff.blogspot.com/2011/04/script-facing-class-not-found-exception.html

Check this for a problem related this and wher to paste the jars
i have tried to explain in a little detailed way,




I looked at the executed command and it didn't have the sqljdbc4.jar that I added to Java Build Path in RFT project. How do I add this to RQM so it includes this .jar file for every script?


put the path to the jar file in Script Arguments field under Script Arguments section. The path is local to your RFT script.

permanent link
Brian Cam (63188) | answered Apr 28 '11, 9:48 a.m.
I prefer the first option because I have too many scripts and don't want to add the Execution Arguments for each of them. I tried both options in your blogspot but could not get them to work. I also added the jar file to the Script Arguments like yfang suggested. This didn't work either. Below is what my command line looks like in the adapter. Any ideas what I'm doing wrong here? All paths are local to the RFT machine.

Executing RFT command "C:\Program Files\IBM\SDP\jdk\jre\bin\java.exe" -Drqm.mode=true -Drqm.task="C:\DOCUME~1\bcam\LOCALS~1\Temp\1\RQMRFTTask2929540519000391864.xml" -jar "C:\Program Files\IBM\SDP\FunctionalTester\bin\rational_ft.jar" -datastore "C:\DOCUME~1\bcam\LOCALS~1\Temp\1\RQMRFTProjects\53a134c3\rftscripts" -projectPath C:\rftscripts\sqljdbc_2.0\enu -rt.log_format xml -iterationcount -1 -rt.bring_up_logviewer false -execmode rqm -execmodeargs download -playback EM.TestScript.Security.Roles.Roles_Delete -jar C:\rftscripts\sqljdbc_2.0\enu\sqljdbc4.jar

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.