bodyString.find.is ERROR

Hi,

I’m trying to check a response body, but I’ve got this error :

15:06:05.957 [WARN ] i.g.h.a.AsyncHandlerActor - Request ‘request_0’ failed: bodyString.find.is(<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>soap:BodyOK</soap:Body></soap:Envelope>
), but actually found <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>soap:BodyOK</soap:Body></soap:Envelope>

But it’s matching !! so what’s the problem ??

Thank you !!
Regards.

Hi,

Are you sure it matches EXACTLY ?
For this check to suceed, it must be exactly the same, including any whitespace.

As you can see, it matches exactly, that’s why I don’t understand :stuck_out_tongue:

Let’s see…

Request ‘request_0’ failed: bodyString.find.is(BLABLABLA</soap:Envelope> <— OMG, carriage return here!
), but actually found…

lol :slight_smile: I noticed this “strange” carriage return in the error file !!
But there is no carriage return in the text file, I’m 100% Sure, I’ve checked this with vi editor, it shows no carriage return !

How do you “read” this file? Do you use Gatling’s RawFileBody?

[…]
.check(bodyString.is(RawFileBody(“oneshot_0000_response.txt”))))
[…]

As I suspected, I can’t reproduce. I’m almost certain the issue is on your side.
Are you sure you don’t have an intermediate process that could be adding such a trailing empty line (for example, some formatting rules for SVN or Git, or some FTP text transfer mode)?

Thanks for trying to help !!

I still don’t know what’s the problem, but, nevermind, I was able to do without checking response.