question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Response message containing "false" is considered a failure when parsed by ResultScanner

See original GitHub issue

I have Java Sampler tests which set the SampleResult response message to a server’s text/xml response. This xml contains the string “false” within the body, and is subsequently included when the csv result file is generated, in the responseMessage column.

On parsing the file, it appears that ResultScanner is counting the appearance of “false” in the responseMessage as a test failure, while using failurePattern:'\bfalse\b'.

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/b0c938d0b7c6767bf7b0d1531380e877b1dca4f0/src/main/java/com/lazerycode/jmeter/testrunner/ResultScanner.java#L74

If this is infact an issue, I’d like to submit a PR to resolve this. Would you guys have a preference on a solution? My immediate thought is to deserialize the csv rows to collection of Java objects, then count where success == false. Alternatively, the pattern could be extended to include \b,false,\b but there is still a possibility where some messageResponse may contain the substring ",false,".

Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
martymcflywacommented, Jan 27, 2019

@pmouawad It will be my first time contributing here but i’d certainly like to try! I will go with your suggestion and looking through your example at the moment.

1reaction
pmouawadcommented, Jan 27, 2019

Hello, Thanks for proposal, I confirm issue, which only affects CSV format. I think the most stable way to do it is:

  • detect position of success field based on user.properties
  • get its value and count

This may help:

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Python how should I test if a variable is None, True or False
error reading/parsing stream ( None ). My question is, if I'm not supposed to test against True or False , how should I...
Read more >
Failure Parsing Inbound Synchronous AS2 MDN - IBM
When receiving an inbound AS2 synchronous MDN, the EDIINTPipelineParse service fails with error: "Parsing failure on message"
Read more >
Error Handling - The Rust Programming Language
We want to say why the parsing failed. You should try to emulate this line of reasoning when faced with a choice between...
Read more >
Common API mistakes and how to avoid them - LogRocket Blog
Be stingy with data. When encountering an object to be used in an API response it's far too easy to deliver every property...
Read more >
Response Codes and Error Codes - Mastercard Developers
A true/false indicator stating whether your API request might be successful if you re-sent the API request with the same parameters and data....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found