Wednesday, January 4, 2012

Move Files between Folders RFT

Summary:
In IBM Rational Functional Tester there is a feature to add files directly under the project or under folders. In each folder test scripts, Data pools, Object maps etc can be stored. The folders are to help keep the project suit organized and neat looking. But if ever the need arises to move the files between the folders, it is not as easy as right clicking on them and renaming them. But there is a way to move the files between folders via project explorer.
Note: the following instructions  used in the IBM® Rational® Functional Tester for Java™ as well as  .NET version of Rational Functional Tester.

Add Files under folders
Right click on a folder and select "Add Empty Script".
Dialog "Create an Empty Functional Test Script" appears. [Depending upon the selection the appropriate dialog box appears], the Keep or edit the script name and click button "Next".



Select Script Assets appears. Choose and select the appropriate selections and click button Finish.



And then we have the scripts.

Move Scripts between folders
 To move the scripts or any files between folders, go to Project Explorer view (Go to Menu - Windows >  Show View > Package Explorer). Select the files in the folder that need to be moved. And right click on them - "Refactor > Move" click on Move.


Dialog box - Move appears. Select the folder you wish to move the files, check on "Update fully qualified names in non-Java text files"  and click button 'Preview'


If there is anything to show, a preview will display, showing all the locations where the name has been changed. Else nothing displays. Click button- OK.


Repeat the same steps with the files in the resources. Make sure you use the same resources folder to move the files to, or else the files will get corrupted.



The end result should look similar to the below picture.

                      
Now, go back to the project view. All Files are moved Successfully. Yeah!

Warning :
Never ever try to move the files between folders, via Windows explorer. The files will get corrupted even after they are moved back to the original folder.
As per my observations, moving files is not defect (fail) free. There are circumstance, where the move will fail and corrupt the file. To handle such situation, it is advised to make a copy of the files being moved using the "Export" feature of RFT.

No comments:

Post a Comment