0

I'm trying to generate a html-extra report with newman for postman automation API collection. But only found a way to generate a automation report with only one file. But I have multiple data files to input when executing APIs . So what is the command for that. I was using the following command to execute with a one file

newman run collection_name -d path_of_the_json_file.json -e C:\Users\User\Downloads\DOCUMENT-01.postman_environment.json -r htmlextra

Or can someone please suggest me a tool/library other than newman, to generate a postman automation report which have different external data files for each and every APIs

Erandi Dilshani
  • 335
  • 1
  • 4
  • 11
  • 2
    You can only import a single data file to use within the Collection. The same as it would be through the UI in the Collection Runner. You would need to have all the data in a single file. – Danny Dainton Mar 18 '22 at 11:56
  • @DannyDainton So how to create a single data file with all of the data file details. CSV file or json file? Can you please provide me a guide ' – Erandi Dilshani Mar 18 '22 at 12:27
  • How did you create the file you have now? Does it work? – Danny Dainton Mar 18 '22 at 12:53
  • @DannyDainton I have created separate json files for separate APIs. They are working when executing APIs one by one. But couldn't create a one data file for whole API collection – Erandi Dilshani Mar 21 '22 at 02:19

1 Answers1

0

newman run your_collection_name.json -e your_environment_name.json -n 1 -r html

-n 1 represents no. of iterations. The collection name and environment name would be the ones you exported from the postman. If there is no environment then you can skip the environment syntax started from -e.

This will generate the report for all the APIs in a collection.