Hi Danny,
Thanks for your response. We are using cypress on runtime to generate Auth Code, which store it in file ‘code…json’. And other file ‘testfile.json’ we have to use to provide test data to our collection.
Hence looking for a way how can we run them via newman.
and in our test collection, we need to use the value of ‘auth_code’. Plz let me know if there is any alternative way possible for accessing the value( that is withoiut redirecting it into oauth_code.json). Thanks a lot for your help.
Have you looked at using Newman as a library rather than just running this from the CLI?
You could pass that captured value between Cypress and Newman easier. One you install Newman as a dependency in the project, you can create a script to run the Collection.
Hi Danny,
Tried using approach mentioned by you. But am stuck in how to export the value of ‘cypress_token’ from cypress tool. Dont think cypress supports this feature of setting env variables which can be accessed outside the scope of current test specification file.
I am thinking about this today. My setup is that, all my test cases/data for one endpoint is inside 1 data file. We have multiple endpoints so I also have multiple data files. I am thinking of passing the filenames in the -d option for partial execution.