Ak_Ak
February 5, 2015, 2:11pm
1
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:Body OK</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:Body OK</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.
Ak_Ak
February 5, 2015, 3:12pm
3
As you can see, it matches exactly, that’s why I don’t understand
Let’s see…
Request ‘request_0’ failed: bodyString.find.is (BLABLABLA</soap:Envelope> <— OMG, carriage return here!
), but actually found…
Ak_Ak
February 5, 2015, 4:21pm
5
lol 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?
Ak_Ak
February 5, 2015, 6:35pm
7
[…]
.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)?
Ak_Ak
February 9, 2015, 10:03am
9
Thanks for trying to help !!
I still don’t know what’s the problem, but, nevermind, I was able to do without checking response.