jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1849239 - in /jmeter/trunk: src/core/org/apache/jmeter/report/dashboard/ src/core/org/apache/jmeter/report/processor/ xdocs/
Date Tue, 18 Dec 2018 21:26:45 GMT
Author: pmouawad
Date: Tue Dec 18 21:26:45 2018
New Revision: 1849239

URL: http://svn.apache.org/viewvc?rev=1849239&view=rev
Log:
Bug 63016 - Empty HTML report if source csv contains labels with quotes

Also Add toString methods for easier debug
Contributed by UbikLoadPack support
Bugzilla Id: 63016

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java?rev=1849239&r1=1849238&r2=1849239&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java Tue Dec
18 21:26:45 2018
@@ -27,6 +27,7 @@ import org.apache.jmeter.report.processo
 import org.apache.jmeter.report.processor.ResultDataVisitor;
 import org.apache.jmeter.report.processor.ValueResultData;
 
+import org.apache.commons.text.StringEscapeUtils;
 /**
  * The class JsonizerVisitor provides a visitor that can get json-like string
  * from ResultData.
@@ -96,7 +97,7 @@ public class JsonizerVisitor implements
             Object value = valueResult.getValue();
             result = String.valueOf(value);
             if (value instanceof String) {
-                result = '"' + result + '"';
+                result = '"' + StringEscapeUtils.escapeEcmaScript(result.replace('\"', '\''))
+ '"';
             }
         }
         return result;

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java?rev=1849239&r1=1849238&r2=1849239&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java Tue Dec 18
21:26:45 2018
@@ -90,4 +90,16 @@ public class ListResultData implements R
     public Iterator<ResultData> iterator() {
         return items.iterator();
     }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("ListResultData [items=");
+        builder.append(items);
+        builder.append("]");
+        return builder.toString();
+    }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java?rev=1849239&r1=1849238&r2=1849239&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java Tue Dec 18
21:26:45 2018
@@ -87,4 +87,16 @@ public class MapResultData implements Re
     public ResultData removeResult(String name) {
         return map.remove(name);
     }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("MapResultData [map=");
+        builder.append(map);
+        builder.append("]");
+        return builder.toString();
+    }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java?rev=1849239&r1=1849238&r2=1849239&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java Tue Dec
18 21:26:45 2018
@@ -53,4 +53,16 @@ public class ValueResultData implements
         return visitor.visitValueResult(this);
     }
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("ValueResultData [value=");
+        builder.append(value);
+        builder.append("]");
+        return builder.toString();
+    }
+
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1849239&r1=1849238&r2=1849239&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Tue Dec 18 21:26:45 2018
@@ -194,6 +194,7 @@ of previous time slot as a base. Startin
     <li><bug>62781</bug>Web Report / Dashboard : Display All in <code>Response
Time Overview</code> fails.</li>
     <li><bug>62782</bug>Web Report / Dashboard : Remove duplicate/unused
dependencies</li>
     <li><bug>62894</bug>Report / Dashboard : Throughput is in wrong column
which is confusing as unit is millisecond</li>
+    <li><bug>63016</bug>Empty HTML report if source csv contains labels
with quotes. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
 </ul>
 
 <h3>Documentation</h3>



Mime
View raw message