Unanswered question

Assertion Failed showing as "runtime error"

Hi,

My assertion fails are showing as a "runtime error", with the response code 200.

Is there any way that when I have an assertion failure in combination with a 200 response code, that it does not appear as an error?

I would not mind showing it as a warning, but not as an error.

Let me know if this is possible.

Thank you

Answers

The 200 just means you got a valid web page, not that it is the correct web page. The assertion, be it a page content validation or part of a correlation, it is telling you something you expect is not present on the page, it could be the test data you are using is wrong or that an earlier request is causing the wrong page to be displayed here. The first thing to do is to find the cause of the issue

I am assuming this is an extraction that failed. First thing to confirm is whether the extractor for this server response is even needed for the script to work properly. If the server response is not the expected and causing an extraction to fail, then you are missing correlation, and might want to find out why that is happening.

If you still don't want the failed assertion to be flagged as an error during runtime you can configure this on the Extractor itself in the Design. In the Variable Extractor Window, there is an error tab, you can disable the option to throw as an assertion error here. See documentation for reference:

https://www.neotys.com/documents/doc/neoload/latest/en/html/#31297.htm#o31299

Hi Keith and Neil,

This is not a variable extraction fail, this is a "validation" fail.

The recorded response had:
{"resultCode":"1","resultDescription":"Success"}

So I added in the Response validation "contain" = Success.

The problem is that sometimes the "Success" does not appear, but I do not want this to appear in the error list.

Let me know, since this is not a variable extraction, if there is any way to remove it from the error list.

The point of validation is to return a result, good or bad. If the response doesn’t contain success then hasn’t the user path failed to do what it was meant to? Instead of using a validation, you could use an extractor and like Keith said, on the error tab say don’t log an error if fail. You could then use an IF statement and based on if the variable extractor has content and if that content is success, log something using JavaScript? logger.info() vs logger.fail()