Bug 33305 - Visual diff and merge functionality for JMeter scripts
Summary: Visual diff and merge functionality for JMeter scripts
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P1 enhancement with 3 votes (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-31 02:33 UTC by Sonam Chauhan
Modified: 2013-08-25 12:47 UTC (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sonam Chauhan 2005-01-31 02:33:47 UTC
Just an idea: visual diff and merge functionality for JMeter scripts. By this I 
mean:
1. Functionality to visually display differences between two JMX files 
   (For eg:, by the highlighting the differing elements)
2. Functionality to accept or reject specific differences.

This is useful in a multi-developer environment

An average "JMeter developer" generally creates JMXs using the graphical 
interface, not text tools. A straight text diff between two JMX files is quite 
incomprehensible to the average developer. Instead, differences need to be 
diplayed in the same visual interface in which JMXs are created.

Since JMX scripts are XML, and there are tools to compare XML documents (e.g.: 
http://www.xml.com/pub/r/738 ), this should be quite do-able. However, quite 
some work would be required in JMeter to "understand" the XML differences and 
display them visually, and to build the "merge" functionality.
Comment 1 Sonam Chauhan 2009-02-18 19:49:05 UTC
Just wanted to present an alternative approach, that "waters down" this feature request somewhat.

Modern version control tools (e.g., Subversion) have 'pluggable-diff' functionality. Essentially, a 'diff' operation in Subversion can be configured to call arbitrary external diff program - Subversion passes it the paths to two files to diff. Now, Jmeter scripts are XML. Open-source XML diff-ing tools exist (see http://www.manageability.org/blog/stuff/open-source-xml-diff-in-java ) 

So this approach would support diff operation for JMeter scripts using version control software: Subversion Diff on a JMX would call a wrapper that uses XML diff software to output a set of changed, added and deleted XML nodes in the JMX 

The last bit of the puzzle requires JMeter support: 

1. Visual representation of changes in JMeter GUI
Can the JMeter GUI be enhanced to 'outline' elements in different colours. For instance, if a sampler has been added, the sampler is displayed in the test plan with a green Swing bounding box. If a POST parameter in a HTTP sampler was deleted, it is displayed with a red (or 'crossed-out') bounding box. 

This could either be driven by 'color="green"' attribute in the (modified) JMX, or preferably, an independent XSL stylesheet which gives styling hints for elements displayed in JMeter GUI.

2. Support for merging changes 
Can JMeter be enhanced to support copy and paste between JMeter instances?