Want to run a specific scenario

Hi,

I have a csv file

When my response Message is failure and my action is “Modify”. I want the postman to run Edit and Discard functionality.

Can someone help me.

Hey @parijosh :wave:

So that we can understand your query precisely, would you please elaborate more on what you are trying to achieve? If you can share specific example here, that would be really helpful :slightly_smiling_face:

Looking forward to hearing back!

I have the below CSV file


Here the failure is due to Key violation which is correct. In this case I want it to perform the Modify(actionVale_ed) whenever there is a Key violation. After that I also want it to perform Discard(discardMessage) when it is “SUCCESS”.

Hope this is clear

Hi @parijosh,

So, you want to use this csv file to run collections and perform testing based on SUCCESS or failure?

If so, then these headers can be used as variables in postman runner, and you can have the pre-request scripts to run only those requests which are valid as per the column from csv file

Hi Pranavdavar

I have he header already in my pre-request script
In collection runner when i run the duplicate record it gives me correct response as "Key Violation. After this i want to discard this record in the same CSV file.

This means that you want to update the same csv file?

If thats so, then you may use google sheets api and integrate in test and perform update operation on data available on google sheet.