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

[Bug] Assertion error information not showing in Total Requests tab #247

Open
EshtechZ opened this issue Jul 7, 2020 · 7 comments
Open
Labels
state: help-wanted Extra assistance needed type: bug Something isn't working

Comments

@EshtechZ
Copy link

EshtechZ commented Jul 7, 2020

Describe The Problem
After running the collection through the command line and get generate the HTML extra report,
Newman_ReportExtra_Bug
in that case, the Test name and assertion error is not showing in the Total Requests tab (blank data) as it is showing the same as in the Failed Tests tab.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Run the collection having some assertion error.
  2. Open the HTML extra report.
  3. Navigate to the Total requests tab and check failed test reason under Test Info>> Test Failure section. (Test name and Assertion error is missing here, only able to see reason in Failed Tests Tab header -3)

What Are You Seeing
Test Name & Assertion error is not showing in the Total Requests tab, Test information section as it is showing the same as in the Failed Tests tab.
Navigate to the Total requests tab and check failed test reason under Test Info>> Test Failure section. (which is missing here, only able to see reason in Failed Tests Tab header -3)

Screenshots and Gifs
Please find a screenshot that helps you to reach the issue place.

Collection and Environment Files
Sorry, won't be able to provide you but it's easy to reproduce, you can run any collection having to fail test case (any assertion fail like: response code can be different).

Version and Platform Information:

  • Newman Version [5.1.0]
  • Newman-reporter-htmlextra Package Version [Not exactly remember, will check and update the version soon but it could be
    latest as I recently installed it, in the same month.]
  • OS [Windows 7]

Additional Context
All covered in the above description.

  • Are you using the reporter from the command line or with a script? - Command
  • Are you using the default template or a custom version?- htmlextra report.
  • If you are using a custom .hbs file, please include this in the report.
  • Have you made any local changes to the index.js file?

Label
Inside the Total requests tab, it should provide a whole description of pass/fail test cases, if any error comes then it should give at least assertion error message include a reason as it is showing in Failed Tests Tab.

Thanks.

@EshtechZ EshtechZ added the type: bug Something isn't working label Jul 7, 2020
@EshtechZ EshtechZ changed the title Test Name & Assertion error is not showing in Total Requests tab, Test information section as it is showing same as in Failed Tests tab. Test Name & Assertion error is not showing in Total Requests tab (showing blank), Test information section as it is showing same as in Failed Tests tab. Jul 7, 2020
@DannyDainton
Copy link
Owner

DannyDainton commented Jul 7, 2020

Thanks for reporting this @EshtechZ,

It's not something that happens all the time as more and more people would have reported it so far. 😁

I think it's to do with either having a test, in the request, with the same name twice or having a test with the same name at 2 different levels. 🤔

  • Could you check to see where those tests in the collection live? Request, Folder or Collection level?

  • Are there 2 test with the same name? "Status code is 200"

You can see on the test results table that it passed and failed at the same time. It's strange that it shows in the failed tests tab though, as the same information is populating that information in the request page. 🤔

@DannyDainton DannyDainton changed the title Test Name & Assertion error is not showing in Total Requests tab (showing blank), Test information section as it is showing same as in Failed Tests tab. [Big] Assertion error information not showing in Total Requests tab Jul 7, 2020
@DannyDainton DannyDainton changed the title [Big] Assertion error information not showing in Total Requests tab [Bug] Assertion error information not showing in Total Requests tab Jul 7, 2020
@DannyDainton
Copy link
Owner

@EshtechZ Are you able to provide answers to the 2 questions above please?

@DannyDainton
Copy link
Owner

I can confirm that it's what I think it is:

pm.test("Status code is 200", function () {
    pm.response.to.have.status(201);
});

pm.test("Status code is 200", function () {
    pm.response.to.have.status(201);
});

Having 2 tests with the same name would show the issue - Until I fix the problem you would need to ensure that each Test has a unique name, that way it would show the failed message in this view. The Failed Test tab would show the correct message as the data is coming from a different place, that was tricky to use on the individual request level.

@EshtechZ
Copy link
Author

EshtechZ commented Jul 12, 2020 via email

@EshtechZ
Copy link
Author

Hi Danny,

I checked the above scenario and i don't have any duplicate test data or script. Each request has only 1 test script which is fine.

@DannyDainton
Copy link
Owner

I was able to reproduce this with the tests with the same name, didn't really matter if these were in the same script or at different levels.

There's an issue in Newman with the sendRequest() function used in the app, this would create the same test against that request - Do you have anything like that in the request?

@DannyDainton DannyDainton added the state: help-wanted Extra assistance needed label Aug 22, 2020
@anhhanuman
Copy link

I would like to report the same issue @DannyDainton
Look, the failed tests are not displayed

image

About my test cases

pm.expect(companyName).to.eql(expectedCompanyName);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: help-wanted Extra assistance needed type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants