Renaming test assets

As your test assets increase and become more complex, you might want to rename them. Use the Eclipse Rename function or save the assets under a different name.

Procedure

Use either of the following steps to rename a test asset:

  1. When you use the Eclipse Rename function, the new name is visible in the Test Navigator, but the underlying file system name is not changed. To use the Eclipse Rename function:
    1. In the Test Navigator, right-click the test asset, and then select Rename
    2. Type the new name, and then click Enter Be sure to click Enter, or the file will not be renamed.
  2. When you rename a test asset by saving it under another name, the underlying file system name is changed, but you must perform manual cleanup. To save a test asset under another name:
    1. In the Test Navigator, browse to the test and double-click it. The test asset opens.
    2. Click File > Save As, and save the asset under a different name.
    3. Delete the original asset.

Example

The following table summarizes how renaming an asset affects the other assets in your workspace.
Renamed asset Effect on other assets
Project Do not rename a project. Renaming a project might result in lost or corrupted project assets.
Schedule Renaming a schedule has no affect on other assets, but note that results cannot be renamed.
Test When you use Rename, schedules that contain the old test name will still run correctly. To avoid confusion, manually update the schedule to use the new test name.

After you use Save As, manually update each schedule that uses the renamed test.

Custom code If you rename the custom code class (.java file), then the reference to the class in the custom code action of the test will not work. Typically rename the custom code class in the Resource perspective or the Java™ perspective.

If you change the name of the custom code class in the test editor that implements the custom code action, the modification does not change the corresponding .java file; instead the modification causes the custom code action to refer to a different (and possibly new) custom code class.

Dataset When you use Rename and open a test that contains the dataset, you are prompted to save the changes (in this case, the renamed dataset that the test now uses).

After you use Save As, manually update each test that uses the dataset.

Location When you use Rename, locations (agent computers) are automatically updated in the schedules that use them.

When you use Save As, manually update each schedule that uses the test.

Results You cannot rename results.
Weighted block Renaming a weighted block has no affect on other assets. To rename a weighted block, click the block in the test, and type the new name in the Name field.
Feedback