Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running tests in parallel -what options to specify to view the responses #1712

Closed
kthulsidoss opened this issue Sep 11, 2018 · 4 comments
Closed
Assignees
Labels

Comments

@kthulsidoss
Copy link

Dear PostMan Support , greetings. I have been trying to use the parallel runner to run test parallely .I used the support mentioned here https://github.com/postmanlabs/newman/blob/develop/examples/parallel-collection-runs.js . There is a parallel issue albeit not a similar one here Feature request: Run test in parallel #744.
I need to check the responses that are sent out , what do i specify so that i can check the responses
(BTW i store the response in the environment body) ,here is what i see in the command prompt
C:\npm\node_modules>node parallel-collection-runs.js
Defect74971GetApiDataCombinedUsedByISIN ran successfully.
Defect74971GetApiDataCombinedUsedByISIN ran successfully.
Defect74971GetApiDataCombinedUsedByISIN ran successfully.

Appreciate your quick response as this is needed to verify a critical defect in our product.

@numaanashraf
Copy link
Member

@kthulsidoss Could you try adding console.log(pm.response.text()) in the test script? That should log to the stdout.

@kthulsidoss
Copy link
Author

@numaanashraf sorry no output received
C:\npm\node_modules>node parallel-collection-runs.js
Defect74971GetApiDataCombinedUsedByISIN ran successfully.
Defect74971GetApiDataCombinedUsedByISIN ran successfully.
Defect74971GetApiDataCombinedUsedByISIN ran successfully.

C:\npm\node_modules>

i added the code to the script postman.setEnvironmentVariable("JSONResponse", pm.response.text())

console.log(pm.response.text())

@codenirvana
Copy link
Member

@kthulsidoss You are using Newman as a library, to get console.log in stdout you need to use CLI reporter.

In your newman.run options add reporters: 'cli' to enable CLI reporter.

@codenirvana codenirvana self-assigned this Sep 12, 2018
@kthulsidoss
Copy link
Author

it does work ,thanks all, how ever there is a new issue which i'm reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants