5

I'm new to automation testing and also to RFT tool. I tried record and playback by hard-coded values. Now I want to make my scripts dynamic. Hence I use Excel as an external file to fetch data.

How can I fetch data from Excel into RFT?

3 Answers 3

1

For this first you need to create an excel, in which yo have specified first row as the column/field names like FirstName, LastName, Address and DOB etc. in the first row and values in the subsequent rows of the same sheet. Save this file (better to save as CSV as they are more lighter than Excel and will not decrease performance when you have a number of test cases)

Then you need to Create a test data pool from the File menu and import your created data file. After that associate the same with your test script and your script will start picking data from your data source.

For step-by-step flow of how to use the same, refer the following links

http://www.ibm.com/developerworks/rational/library/06/1024_Tarkar/ http://www.ibm.com/developerworks/rational/library/10/automateintegrationtestswithrationalfunctionaltester/

0

You can use Apache POI to read data from Excel using Java in IBM RFT tool. I am using it to read and write data from/into excel.

Steps 1. Add Apache POI jar in IBM RFT 2. Open the test script and write Java code to read/write data.

1
  • Can you explain with an example? Commented Sep 30, 2016 at 3:42
0

I have used both Apache POI library to read and write data from an Excel Spreadsheet from an RFT test as well as imported from a CSV file into an RFT datapool. Both work good.

There is a good tutorial on Apache POI at http://www.tutorialspoint.com/apache_poi/. It has simple enough APIs to create/open/read/edit Excel spreadsheets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.