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

Using JUnit reporter generates the wrong name per test #3230

Open
rion18 opened this issue May 16, 2024 · 0 comments · May be fixed by #3231
Open

Using JUnit reporter generates the wrong name per test #3230

rion18 opened this issue May 16, 2024 · 0 comments · May be fixed by #3231

Comments

@rion18
Copy link

rion18 commented May 16, 2024

Issue

When using newman with the JUnit reporter, it seems that the name for every test is the name of the collection as setup in Postman. This is wrong, as it should reflect the ACTUAL test we're running.

For instance for this file:

  "info": {
    "_postman_id": "123",
    "name": "A test for JUnit reports API",
  },
  "item": [
    {
      "name": "Contract and Integration Tests",
      "item": [
        {
          "name": "Execute an awesome test",
          "event": []
        },
        {
          "name": "Execute another test",
          "event": []
        }
      ]
    }
  ]
}

Expected

I would expect the JUnit report to output TWO tests on the report:

Contract and Integration Tests > Execute an awesome test
Contract and Integration Tests > Execute another test

Current situation

Instead, I get this:

I would expect the JUnit report to output TWO tests on the report:

ATestForJUnitReportsAPI
ATestForJUnitReportsAPI

According to xmlbuilder-js CHANGELOG, they

Renamed attributes property to attribs to prevent name clash with DOM property with the same name.

I'll create a PR to fix this.

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

Successfully merging a pull request may close this issue.

1 participant