How can I get curl command for test failures in newman?

I know I can use “GENERATE CODE SNIPPETS” to get curl command in postman, but once I convert the postman file to newman, I don’t know how can I get curl request for test failures in newman?
Anyone figured it out?

1 Like

If you use Newman, why would you want to use curl?
If you export your collection(s) you can just the export file as an import to Newman. Newman will return an appropriate status if the test succeeded or failed.

if (`newman run <your test>`) then echo "Test succeeded"; else echo "Test failed";