Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Add option to log out response to command line #50

Closed
YOU54F opened this issue Dec 9, 2019 · 2 comments
Closed

Add option to log out response to command line #50

YOU54F opened this issue Dec 9, 2019 · 2 comments

Comments

@YOU54F
Copy link

YOU54F commented Dec 9, 2019

Adding the ability to output the response when running a test, would be really valuable for debugging purposes

 post(response) {
   console.log(JSON.stringify(response))
}

and the following will allow the output of the response body, which is useful if the output contains useful information

 post(response) {
   console.log(JSON.stringify(response.body))
}

It would be nice if we could pass a command line option when running postman-to-k6 in order to do this, rather than having to add it in manually after the script is generated.

Not sure if this is preferable or useful to others, but thought I would raise it (happy for it to be closed!)

@simskij
Copy link
Contributor

simskij commented Jan 22, 2020

Thank you for the report! 🙏🏼

I agree with you that this would be nifty to have. I'll add it to the feature request list for further prioritizing. If you'd rather like to have a stab at implementing it yourself, I'd be happy to assist you in reviewing it and work towards having it merged.

@simskij
Copy link
Contributor

simskij commented Jun 8, 2020

After some further investigation, this is actually already possible using --http-debug when starting the test run.

@simskij simskij closed this as completed Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants