Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 113246

Summary: [Functionality, Usability] Problems with Test Navigator, proxies, and renaming
Product: z_Archived Reporter: Mark A. Sibert <sibert>
Component: TPTPAssignee: Jerome Gout <jerome.gout>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 83087    

Description Mark A. Sibert CLA 2005-10-20 11:23:32 EDT
If you have a Performance Test or Performance Schedule contained within a 
folder, and rename that folder, the test/schedule will no longer open using 
the Test Navigator.  Right-clicking the test/schedule does not bring up the 
correct context menus either.  If I bring up the plain-old Eclipse Navigator, 
then double-click the test or schedule, they open fine.

Interestingly, Hyades Test Suites do not show the same behavior...  Test 
Navigator has no problem opening them if the containing folder is renamed.

After some debugging, we discovered that the URI of the test/schedule is not 
being updated when the containing folder is renamed.  (This is in the marker, 
for the proxy stuff...)  We also discovered that the Hyades Test Suite was not 
using a proxy -- it was the actualy asset being loaded.  This was quite a 
surprise, but explained the difference in behavior.

The problem also happens if the project is renamed.  Or if the filename of the 
test/schedule is renamed.  (That has to be done outside of Test Navigator, 
like in the Eclipse Navigator, since TN just changes the 'name' attribute when 
you rename a test/schedule.)

So, it seems to me that Test Navigator needs to update the markers for all 
assets contained within a folder when the folder is renamed.

There is also a larger issue of how to handle inter-asset references.  (For 
example, TestInvocations contained within Schedules store the URI of the test, 
which will be invalid if any part of that URI changes.)  That has implications 
across all products, and not just RPT, so hopefully we can come up with a 
common solution.  Essentially, we need the equivalent of "refactoring" java 
classes for our assets.  (As opposed to simply renaming things.)
Comment 1 Jerome Gout CLA 2006-02-02 04:40:37 EST
Try to reproduce using a recent RPT 7.0 build (20060131_111).
Create a Http performance test in a folder.
Try to open the test -> Editor opens normally.
Close the test editor.
Rename the folder -> the new folder appears (selected and collapsed).
Double click on the test node to open -> Editor opens normally.

As far as test rename is concerned, downstream products are able to control the renaming of their test assets by using the IProxyNodeRenamer interface.
If an element (which should be a proxy node in the test navigator) has inter-asset references, the proxy node renaming framework allows to propagate the change of the element name through all dependencies.

IProxyNodeRenamer.performRename(String newName)

The default implementation of this interface for TPTP proxy nodes is mainly done  in CMNNamedElementProxyNode. In that class the performRename method only rename the EMF object name.
One can imagine a much more complex treatment for specific proxy nodes. 
Comment 2 Paul Slauenwhite CLA 2006-11-16 09:02:57 EST
ACTION: Please verify/close this defect.
Comment 3 Paul Slauenwhite CLA 2007-02-12 12:57:54 EST
Closing by default since not closed by the originator in the 7+ months since being resolved.  

Please reopen if the issue is still present in the latest TPTP release or the resolution is not correct.