apache / apache/jmeter

Issue with XML version in JTL files

Open
#4,056 12 comments 0 reactions 0 assignees View on GitHub
os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Andrey Pokhilko** ([Bug 59973](https://bz.apache.org/bugzilla//show_bug.cgi?id=59973&redirect=false)):
When JMeter writes XML JTL files, it uses header with XML version 1.0
declared
(https://github.com/apache/jmeter/blob/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java#L82)

Here's example that I generated with ResultCollector, reproducing the
issue from one of the users:

<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
<sample t="0" it="0" lt="0" ts="1469356444856" s="false" lb="" rc=""
rm=" " tn="" dt="" by="0" ng="0" na="0"/>

</testResults>

If we will use strict XML parser, like http://www.validome.org/validate
or other strict XML reading library, we will get the error for the above
text, because is a character entity, only allowed in XML 1.1.
XStream writer that we use generates XML 1.1 data and there is FAQ entry
for this case: http://x-stream.github.io/faq.html#XML_control_char

It is a bug of writing file body as XML 1.1 while
declaration says 1.0.

Severity: minor
OS: All

Depends on:
* https://github.com/apache/jmeter/issues/3708

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.