newman execution is failing #398
Unanswered
shubhambajad
asked this question in
Q&A
Replies: 1 comment
-
The reason Newman fails, is because the Postman test itself crashes. What you could do, is add a try catch, which will handle the fatal error, something like this (this is pseudo code, so you might to need to tweak it a bit).
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team
I am executing my all test script via newman but for one of the api one of my assertion is failing with below error
Unexpected token '<' at 2:1
<!doctype html>
^
at assertion:1 in test-script
Reason is we are getting a response in below format
<!doctype html>
<title>Not Found</title>Not Found
The requested resource was not found on this server.
and we are validating that,
pm.test('Check error message when Id is not sent', function(){pm.expect(pm.response.json().id).to.include('This field may not be blank.');});
so, scripts is getting aborted so can we do some configuration in portman file so that execution should not get fail
I have added "abortOnFailure": false but still facing a same issue
Beta Was this translation helpful? Give feedback.
All reactions