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

Newman HTML report error with pm.sendRequest #180

Open
tiaden opened this issue Nov 24, 2017 · 34 comments
Open

Newman HTML report error with pm.sendRequest #180

tiaden opened this issue Nov 24, 2017 · 34 comments
Assignees
Labels
bug Something isn't working product/newman

Comments

@tiaden
Copy link

tiaden commented Nov 24, 2017

Postman for Windows
Version 5.3.2
Win 7 / x64
Newman 3.8.3

  1. Create a Post request in Postman native client
  2. Inside the tests tab of this post request, make a Get request using PM.sendRequests (example below)

// Read if AMT has the posted values
const randomDataRequest = {
url: 'http://{{domain}}/rh/amts/' + jsonData.id,
method: 'GET'
};

pm.sendRequest(randomDataRequest, function(err, res) {
if (err) {
console.log(err);
}
pm.test('Verify that POST values = GET values', function() {
pm.expect(res).to.have.property('code', 200);
pm.expect(res.json()).to.deep.equal(jsonData);
});
});
// Read if AMT has the posted values
const randomDataRequest = {
url: 'http://{{domain}}/rh/amts/' + jsonData.id,
method: 'GET'
};

pm.sendRequest(randomDataRequest, function(err, res) {
if (err) {
console.log(err);
}
pm.test('Verify that POST values = GET values', function() {
pm.expect(res).to.have.property('code', 200);
pm.expect(res.json()).to.deep.equal(jsonData);
});
});

  1. Generate a report using Newman and you will see two requests having a GET request on them instead on one with a POST method

newman-report-issue.docx

@kunagpal kunagpal self-assigned this Nov 25, 2017
@kunagpal
Copy link
Contributor

@zodikadem This is a known issue, as reporters do not support pm.sendRequest just yet. We'll be taking a look at including this in the weeks to come. In the meantime, this issue can be left open for tracking. Thanks for reporting this! 😄

@kunagpal kunagpal reopened this Nov 27, 2017
@tiaden
Copy link
Author

tiaden commented Dec 4, 2017

@kunagpal,
Thank you for the quick reply. I was on vacation, therefore unable to reply.
It was my pleasure to report this. Can we please expect this to be fixed in the next release ? and when that release be ?

@tiaden
Copy link
Author

tiaden commented Jan 5, 2018

@kunagpal,
Any chances to see this fixed soon ?

@kunagpal
Copy link
Contributor

@zodikadem Unfortunately, I can't offer an E.T.A for this at the moment. I'll update this thread when a fix is being worked on. 😞

@tiaden
Copy link
Author

tiaden commented Jan 22, 2018

@kunagpal, thank you for the response. I understand.

@kunagpal kunagpal changed the title Newman report Error Newman HTML report error with pm.sendRequest Jan 30, 2018
@MarcosEllys
Copy link

Hello, unfortunately this bug continue, is there are some date to fix this problem?

@parinapatel
Copy link

parinapatel commented Apr 6, 2018

@kunagpal Is there any workaround for this bug? Or ETA when it will be fixed ?

@arninio123
Copy link

@kunagpal Any update yet? :)

@MarcosEllys
Copy link

@kunagpal Any update yet?

@tiaden
Copy link
Author

tiaden commented May 17, 2018

@kunagpal, it is been more than 6 months since I reported this issue. Any plans on fixing it ?
if not, please let us know.

@tegomass
Copy link

+1 :D

@MarcosEllys
Copy link

@kunagpal Any update yet?

@zankhanarana9
Copy link

Any update on this?

@musanas
Copy link

musanas commented Aug 20, 2018

+1 for this

@ejerskov
Copy link

+1
Any update?
At the moment my html reports are useless because the pm.sendRequest (for test verification) overrides the original request in the report.

@shamasis
Copy link
Member

shamasis commented Aug 30, 2018

We just moved the reporter out of newman. PR welcome on this https://github.com/postmanlabs/newman-reporter-html

We are also trying to schedule it in the task list.

@ghost
Copy link

ghost commented Sep 6, 2018

Hi,

Please note that this is not HTML reporter issue. This is also the case e.g. for junit reporter (tested on 4.10). Here is what I get in junit report:

  <testsuite name="by funding token / user / Add ACH token" id="2b9e6822-a526-4f69-bad8-517ed5646ede" tests="1" failures="0" errors="0" time="0.933">
    <testcase name="FS044 Get fee for ACH token (user) - Response is ok" time="0.933"/>
  </testsuite>
  <testsuite/>
  <testsuite name="by funding token / authorized user / Add credit card token" id="f7b9fe8d-0113-4dfd-afc0-a0d2634e5835" tests="1" failures="0" errors="0" time="0.854">
    <testcase name="FS047 Get fee for Credit card token (authorized user) - Response is ok" time="0.854"/>
  </testsuite>

Because of this empty testsuite xunit plugin in Jenkins fails to generate trend.

So I would consider this as a high priority item on reporters.

P.S. Should we close #1671 and #1631 as duplicates of this one?

@JohnnyBarry
Copy link

+1
Any update?
We are also having this issue with both HTML and Junit reporters.

@shamasis
Copy link
Member

@codenirvana @kunagpal - this issue is manifesting in various forms in all reporters. Let’s consolidate them in one issue, close the rest and schedule a fix.

@TingYu-Lee
Copy link

I still hava same problem about sendRequest() & HTML-reporter
in Newman v4.4.1

@prshntsingh2010
Copy link

I am still facing this issue.

@LalithVigneshS
Copy link

+1

@RobHalperin
Copy link

I ran into this issue today as well. Hoping this gets a resolution.

Also, in anyone else facing this challenge has found an alternative Reporting solution that is free, please let me know. This is very frustrating.

@Shivansh2407
Copy link

Can I work on this @zodikadem ?? I would love to fix this as a GSoC Participant

@tiaden
Copy link
Author

tiaden commented Feb 25, 2020

Sure @Shivansh2407 it's yours !

@codenirvana codenirvana transferred this issue from postmanlabs/newman May 3, 2020
@DannyDainton
Copy link
Collaborator

DannyDainton commented Jun 29, 2020

Hey @shamasis / @codenirvana

Are we going to tackle this issue with sendRequest() soon, it's impacting the output on all the reporters and I would love to see it finally solved :D

I'm crossing the HTML Reporter streams here but here a basic output from htmlextra, which I'm guessing would be the same for this one:

Screenshot 2020-06-29 at 16 09 09

Screenshot 2020-06-29 at 16 09 29

The main request is a POST and within that is the GET - In the report, it's outputting the details of the GET, which was the sendRequest() rather than what was added to the main URL request. :( It's also doubling up on the tests too 😢

@DannyDainton
Copy link
Collaborator

@codenirvana Could we transfer this issue to the Newman repo?

@RCarlosx
Copy link

RCarlosx commented Oct 4, 2020

Any update about this?

@tarasbulbiak
Copy link

Hi guys! This issue was opened more than 3 years ago, is there any updates about the fix?
Thanks)

@eya62
Copy link

eya62 commented Feb 15, 2021

Hello,
I am still facing same issue.
I am using pm.sendrequest within a test collection.
When using Newman, it is retuning the requests in pre-requests instead of the main Requests.

Any fixes or alternative workarounds for this issue please?!

@vbisbest
Copy link

I am actually seeing the main request twice instead of pre-request/main request. How many more years until this is resolved?

rproman added a commit to rproman/Restful-Booker that referenced this issue Mar 15, 2022
Changes to be committed: newman_run.bat

Note: There are existing issues with newman not able to report test results/runs correctly if there is a pm.SendRequest() call in the collection scripts.

postmanlabs/newman-reporter-html#180 (comment)
@saiudayakella
Copy link

@shamasis @shubhbhargav @codenirvana - Any plans to fix this reporter issue? This is blocking us to consume the stats present in the report

Below ticket is also related
DannyDainton/newman-reporter-htmlextra#241

@DannyDainton DannyDainton added bug Something isn't working product/newman labels Jul 20, 2022
@akyoldas
Copy link

akyoldas commented Feb 1, 2024

Hey, is there any update on this? This bug is affecting newman outputs very badly!

@FahadRS
Copy link

FahadRS commented Feb 26, 2024

Is there any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product/newman
Projects
None yet
Development

No branches or pull requests