Change src to file in GITLAB repository

Hello! How do I change src path from a collection.json to find an attached file in my GITLAB repository to run with newman in a pipeline?

Hey @cristiano.coll,

You should be able to use the --working-dir <path> CLI flag to change this.

The way have the collection json file and the FORM.docx looks good to me.

What exactly is not working or what you are trying to achieve?

Thanks for the collaboration. Could you cite an example through a screen?

Hello Vdespa, I will explain in detail my problem. I am exporting my postman collection and sending it to my project repository in GITLAB, when I run my pipelene using newman, I get the return status code 500 for requests containing the included file, was getting the comeback message: This file " after editing the src from my collection to “FORM.docx” passed when returning status code 500.


Let me see if I follow you: when you upload the file FORM.docx you get a 500 status code.

If the file is properly sent to the server, I would look at the response body to see what the server is complaining about. For me this seems like a valid test that failed because the backend is working differently.

Then, directly in the Postman interface the execution is performed successfully.

Got it.

You will need a way to inspect the response from the server.

Are you generating the htmlextra report by any chance?

No, how can I generate?

Add this dependency:

npm install newman-reporter-htmlextra

and add htmlextra to your reporters.

Make sure to publish the newman folder as an artifact.

Thanks for suggesting this @vdespa :heart:

They would also need to include the additional cli arg into the command, to tell newman to use the reporter on the run.

-r htmlextra

Saw you added that but wanted to add the command too :grin:

Thank you, vdespa. I will study this option and give you a feedback.

Thanks dannydainton, I will also check this option.