Wednesday, January 4, 2012

Rename Folders - RFT

Summary:
In IBM Rational Functional Tester there is a feature to add 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 is ever the need arises to rename the folders, it is not as easy as right clicking on them and renaming them. But there is a way to rename the 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 / Create Folders
Right click on a project and click on "Add Test Folder

Dialog box - Create a Test Folder appears. Add the name you would like to give to this folder and click button Finish.

Under the folder, Recorded scripts, Empty Scripts, Test Object Map, and even folders can be added. As you can see, there is no option for renaming the folder.

Steps to clearly rename the folders without corrupting the files.
Go to Menu - Windows >  Show View > Package Explorer.

Click on the status bar of RFT for Project Explorer.

Package explorer view opens. You can see here, the 'regular Folders' and 'resource.Folders'
Rename Folders


 appears.
You can see the recently created folders in 2 sets, under the main project and under resources. The folders can be renamed from here and the renaming will have to be done twice.

Step ONE
Right click in the folder you wish to rename - "Refactor > Rename".

Click on Rename. Dialog box - Rename Package appears.



to    




Change the name. ( For some reason, RFT throws warning if the first word of the name is in CAPS). Click on 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.



Now, repeat the same steps with the folder under "resources"

 to  


 Folder Renamed. Yeah!

Warning :
Never ever try to rename the folders, via Windows explorer. The files  in it will get corrupted even if they are renamed to the original state.
As per my observations, renaming folders is not defect (fail) free. There are circumstance, where the rename will fail and corrupt the files in it. To handle such situation, it is advised to make a copy of the folders being renamed using the "Export" feature of RFT.

No comments:

Post a Comment