Bug 46677 - Copying Test Elements between test plans
Summary: Copying Test Elements between test plans
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.3.2
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
: 52176 (view as bug list)
Depends on:
Reported: 2009-02-09 03:58 UTC by Noel O'Brien
Modified: 2012-11-24 20:35 UTC (History)
2 users (show)

Proposed enhancement as patch to build revision 1196526 of JMeter (6.42 KB, patch)
2011-11-14 12:58 UTC, Roman Bargezi
Details | Diff
Updated patch (7.11 KB, patch)
2012-11-20 22:34 UTC, Philippe Mouawad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noel O'Brien 2009-02-09 03:58:34 UTC
I suggest the following enhancements to JMeter to make test element copying more seamless and more straightforward:

1. Enable test elements to be left in the Workspace between the loading of test plans, this will allow users to copy elements between test plans.

2. Enable drag & drop and copy/paste between separate instances of JMeter.
Comment 1 Philippe Mouawad 2011-11-14 12:50:31 UTC
*** Bug 52176 has been marked as a duplicate of this bug. ***
Comment 2 Roman Bargezi 2011-11-14 12:58:31 UTC
Created attachment 27934 [details]
Proposed enhancement as patch to build revision 1196526 of JMeter

For compatibility the attached patch does not remove or replace the currently
unused interfaces "getCopiedNode", "setCopiedNode" and some of the other
obsolete variables and methods in the class
"org.apache.jmeter.gui.action.Copy". The JMeter team may want to consider this
additional cleanup.

The patch does not address the DnD across instances.
Comment 3 Philippe Mouawad 2011-11-27 19:56:08 UTC
Thanks for patch but:
- It is not working under Mac OSX when using CMD+C/CMD+V (or apple C / apple V) 

while it is working OK with Menu Copy/paste.
In the first case custom DataFlavor is not supported.

Can you check if you have the same behaviour under Windows ?

Another point, it makes hypothesis all JMeterTreeNode userdata are Serializable, not sure it is always the case.
Comment 4 Roman Bargezi 2011-12-07 08:50:30 UTC
True, this also fails for Windows. The reason is that the default transfer handler registered for the Tree component gets called after the Copy action and places its own stuff in the clipboard. I will have to give this implementation some rework. Stay tuned for an update.
Comment 5 Philippe Mouawad 2012-11-20 22:34:27 UTC
Created attachment 29614 [details]
Updated patch

Here is the updated patch.
After fix to 54172 the copy/paste now works OK.

There remains an issue on ModuleController where reference is not pasted correctly.

Patch needs upgrade to JDK6.
Comment 6 Philippe Mouawad 2012-11-22 22:30:27 UTC
I found issue, so now I can commit it, but it requires upgrade to JDK 6.

Are you OK with this ?
What must we do to upgrade ?

Comment 7 Sebb 2012-11-22 23:10:09 UTC
(In reply to comment #6)
> I found issue, so now I can commit it, but it requires upgrade to JDK 6.
> Are you OK with this ?
> What must we do to upgrade ?

Those are questions for the dev list, rather than here.

> Thanks
Comment 8 Philippe Mouawad 2012-11-24 20:35:26 UTC
Date: Sat Nov 24 20:34:40 2012
New Revision: 1413259

URL: http://svn.apache.org/viewvc?rev=1413259&view=rev
Bug 46677 - Copying Test Elements between test plans
Bugzilla Id: 46677

    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterTreeNodeTransferable.java   (with props)
Comment 9 The ASF infrastructure team 2022-09-24 20:37:42 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2199