Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capturing error message #48

Open
PratikThorve opened this issue Mar 27, 2024 · 0 comments
Open

Capturing error message #48

PratikThorve opened this issue Mar 27, 2024 · 0 comments

Comments

@PratikThorve
Copy link

Hey the report generated captures the results very well on what failed and what not.
My test have a corresponding error message associated with them , is there a way to capture that as well ? like we do in newman-htmlextra-reported.

Sample test :

pm.test("Validate paymentAttributes is not null", function () {
    const cardNumber = requestData.cardNumber;
    pm.expect(responseData.paymentAttributes.lastFourDigits).to.eql(cardNumber.substring(cardNumber.length-4, cardNumber.length),"Failed validitng lastFourDigits in response");
    pm.expect(responseData.paymentAttributes.binDigits).to.eql(cardNumber.substring(0, 6),"Failed validitng paymentAttributes.binDigits in response");
    pm.expect(responseData.paymentAttributes.binDigits).to.eql(cardNumber.substring(0, 6),"Failed validitng paymentAttributes.binDigits in response");

}

LIke the above test has 3 assertions if anyone of them fails ,it fails the test but its difficult to figure out in the report which assertion failed.
If we capture the error message then that can help.

Same done in newman-htmlextra-reporter
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant