Skip to content

Commit

Permalink
When importing XML formatted jtl files, sub samplers will get renamed
Browse files Browse the repository at this point in the history
Bugzilla Id: 64821
  • Loading branch information
FSchumacher committed Dec 6, 2020
1 parent 6701514 commit a568c86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,11 @@ public void storeSubResult(SampleResult subResult) {
* the {@link SampleResult} to be added
* @param renameSubResults boolean do we rename subResults based on position
*/
private void storeSubResult(SampleResult subResult, boolean renameSubResults) {
public void storeSubResult(SampleResult subResult, boolean renameSubResults) {
if (subResults == null) {
subResults = new ArrayList<>();
}
if(renameSubResults) {
if (renameSubResults) {
subResult.setSampleLabel(getSampleLabel()+"-"+subResultIndex++);
}
subResults.add(subResult);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ protected boolean retrieveItem(HierarchicalStreamReader reader, UnmarshallingCon
if (subItem instanceof AssertionResult) {
res.addAssertionResult((AssertionResult) subItem);
} else if (subItem instanceof SampleResult) {
res.storeSubResult((SampleResult) subItem);
res.storeSubResult((SampleResult) subItem, false);
} else if (nodeName.equals(TAG_RESPONSE_HEADER)) {
res.setResponseHeaders((String) subItem);
} else if (nodeName.equals(TAG_REQUEST_HEADER)) {
Expand Down
1 change: 1 addition & 0 deletions xdocs/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Summary

<h3>Listeners</h3>
<ul>
<li><bug>64821</bug>When importing XML formatted jtl files, sub samplers will get renamed</li>
</ul>

<h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>
Expand Down

0 comments on commit a568c86

Please sign in to comment.