Postman show 200 and Newman Got 400 bad req

I have Facing Issues in Newman CMD report all my testcase are passed and got 200 status in postman, but failed in newman cli got 400 bad request i added the Environment.json file in the newman but still face this issue
I need Help

Hey @abubakar-khan :wave:t2:

Have you checked the contents of the exported file?

Does it contain both the keys and values?

If the variables were only in the current value, those wouldn’t have been exported.

@danny-dainton Yes h I have Check the contents of exported file.
I create on Collection variable and assign the same value in initial and current and pass these variable in Newman CLI but still not working

Are you able to show or provide more details about those errors?

It’s going to be difficult to know what the issue might be without it.



I have attached the Screenshots

Does the server return any information in the response as to why that request is a 400?

You’re just showing the payload there.

323232
@danny-dainton yes Server has respond
Every time I create a new user, new Email and provide the updated phone, in Postman they response Successfully created and show 200 but in Newman they got 400 and the response of new I have attached

Newman isn’t Postman it’s a separate library that runs Collections so there are going to be many quirky differences between the two.

Where is it getting the data from for those requests? Environment file, Data file?

Is it failing in the first request, the second, all requests?

Have you tried hard coding the data in the payload, does that work with Newman? Is there a separate request that cleans out the data after the run?

We cannot see what’s in front of you so you’ll need to provide a lot more context about what’s happening in front of you.

@danny-dainton The Data is Getting From Environment File.
Yes, it is fail in First and Second Request remaining all the requests got passed
There is no separate request to clean the data after run
Help me out if you have any idea about that