You could run a groovy jsr223 post processor on the sampler with the following
lines
String responseMessage = prev.getResponseMessage()
prev.setResponseMessage(responseMessage.replace("\n", "\\n"))
-----Original Message-----
From: Dmitri T <[email protected]>
Sent: Friday, March 31, 2023 7:59 AM
To: JMeter Users List <[email protected]>; OUFDOU Anas
<[email protected]>
Subject: Re: [JMETER] Log on multiple line in CSV
OUFDOU Anas wrote:
> Hello,
>
> When failure message is multiline the CSV jtl file has a line logged
> on multiline, there is no way to replace "\n" by "\\n" in the jtl file
> to have one request by line ?
> image.png
>
>
> --
> Cordialement,
> -------------
> Anas OUFDOU
As of current JMeter stable version 5.5
<https://www.blazemeter.com/blog/jmeter-5-5> it's not configurable and the only
way to amend this is changing JMeter source code
<https://github.com/apache/jmeter/blob/rel/v5.5/src/components/src/main/java/org/apache/jmeter/assertions/ResponseAssertion.java#L573>,
re-compiling the .jar and replacing the original version of the
ApacheJMeter_components
<https://mvnrepository.com/artifact/org.apache.jmeter/ApacheJMeter_components>
with the amended one.
Alternatively you can set jmeter.save.saveservice.assertion_results
<https://jmeter.apache.org/usermanual/properties_reference.html#results_file_config>
property to *none* and store assertion results in a separate file using a
Listener
<https://jmeter.apache.org/usermanual/properties_reference.html#results_file_config>.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
The information included in this email and any files transmitted with it may
contain information that is confidential and it must not be used by, or its
contents or attachments copied or disclosed to, persons other than the intended
addressee. If you have received this email in error, please notify BJSS. In the
absence of written agreement to the contrary BJSS' relevant standard terms of
contract for any work to be undertaken will apply. Please carry out virus or
such other checks as you consider appropriate in respect of this email. BJSS
does not accept responsibility for any adverse effect upon your system or data
in relation to this email or any files transmitted with it. BJSS Limited, a
company registered in England and Wales (Company Number 2777575), VAT
Registration Number 613295452, Registered Office Address, 1 Whitehall Quay,
Leeds, LS1 4HR