Scripts pass in RFT but fail in RQM
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
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. |
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?
|
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. |
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. |
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
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.