apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.43k stars 2.11k forks source link

Visual diff and merge functionality for JMeter scripts #1503

Open asfimport opened 19 years ago

asfimport commented 19 years ago

Sonam Chauhan (Bug 33305): 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.

Votes in Bugzilla: 3 OS: All

asfimport commented 15 years ago

Sonam Chauhan (migrated from Bugzilla): 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.

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