1
votes

I'm getting a very basic text resp failing in jmeter when it appears it should pass. Feels like some whitespace or character encoding issue, but got me stuck - any pointers would be great.

  • Applied to: HTTP sampler
  • Type of assert: Main sample only, text resp
  • Matching: equals

So I ran the sample with the asset disabled, and copied the content of the resp. body into the patterns to test field within the asset. The context should be static, so assumed it would pass.

However, the assert is tripping with: Assertion failure message: Test failed: text expected to equal.

URL testing:- http://c1-orig-qa.adis.ws/c/AutomatedQA2/texttype_plain.xml

1
Please give us the exact assertion string and an example response on which it fails. (did you try to check manually on result tree view?)Dominik Antal
And the html response that you ran this on? Pastebin would work.Dominik Antal
Added both the assert string and the message from the fail in this gist: gist.github.com/6wl/2972efe7607e4c16f2b0#file-gistfile1-txtgregloscombe

1 Answers

0
votes

It's a bad practice to compare full xml as even 2 xmls that differ in whitespace should be equal. Most probably here the issue is whitespace.

I suggest you just compare some texts line: - ok - [CDATA[/c/AutomatedQA2/texttype_plain]]>