It's all about the answers!

Ask a question

RQM and RTF scripts


Eric Briere (411213) | asked Nov 09 '10, 1:42 p.m.
Hi,

I'm new to RQM.

We built a test environment based on scripts using RFT and RTM. The testers can change the scripts behavior by entering some parameters in the RTM script parameter options. So the same script can be reused in different test cases and in different context. For example, the script to compare two baselines would have two parameters which are the source and destination path of the data to compare.

So the question is: How do I allow the test case writer to enter script parameters in the test case in RQM, and how do I retreive these parameters from a RFT script? Any samples would be appreciated.

Thanks

One answer



permanent link
Kurtis Martin (1.4k11) | answered Nov 10 '10, 5:36 p.m.
JAZZ DEVELOPER
I don't have much experience with RFT, but I've used other adapters and found this question interesting so I did a little research. I found that you CAN pass arguments from RQM to the RFT script. When you create a script in RQM and specify the type to be RFT, there is a section at the bottom of the RQM script editor titled "Script Arguments". This is where you specify arguments to be passed to your RFT script.

Here's a page in the RFT InfoCenter that talks about the different argument types:

http://publib.boulder.ibm.com/infocenter/rfthelp/v8r1/topic/com.ibm.rational.test.ft.doc/topics/r_handling_rqm_details.html

In your RFT script you will need to insert either a Java Snippet or Java Method in order to access these argument. They will be passed to the testMain() method of your RFT script, which can be accessed on the "Java" tab of the RFT script editor. More info on RFT Java Snippets is here:

http://publib.boulder.ibm.com/infocenter/rfthelp/v8r1/topic/com.ibm.rational.test.ft.doc/topics/t_insert_java_code.html

RQM doesn't give you the option to specify different arguments at the test case level, instead it is done at the test script level. But there's no reason you can't create multiple RQM test scripts that point to the same underlying RFT script but supplies different arguments. To do this in RQM, go to view test scripts, select the script you are interested in and hit the duplicate button at the top of the list. Or just do "Create Test Script" multiple times. But don't use "Import Test Script" because the import wouldn't import the same script twice.

Additionally, you may try posting this question on the RFT forum as well. That forum is located here:

http://www.ibm.com/developerworks/forums/forum.jspa?forumID=322

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.