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

describe content is not used in JUnit reports #4368

Open
Cactusbone opened this issue Feb 4, 2025 · 0 comments
Open

describe content is not used in JUnit reports #4368

Cactusbone opened this issue Feb 4, 2025 · 0 comments

Comments

@Cactusbone
Copy link

Description

Hello !

describe content is not used in JUnit reports

BDD documentation indicates that

You can only use describe to define the name for the test suite.

However, it does not end up in JUnit report.

I wanted to include env name in describe content, to be able to diffentiate tests in CI (Gitlab) reporting tools.
Right now, all generated JUnit xml files contains the same test names, so only one is used in CI.

Setting testsuite name is enough for Gitlab to not merge tests, however tests cannot be differentiated afterward (same suite/name), additionally setting test classname resolve that issue too.

Image

Suggested solution

Use module.describeTitle in main/lib/reporter/reporters/junit.xml.ejs for both testsuite name and testcase classname

Alternatives / Workarounds

Overwriting testsuite name and tests classname allows usable feedback in Gitlab CI.

Additional Information

I have not tested solution outside of Gitlab, so other JUnit parsers may differ.

I can probably provide a PR if required.

Cactusbone added a commit to F4-Group/nightwatch that referenced this issue Feb 5, 2025
Cactusbone added a commit to F4-Group/nightwatch that referenced this issue Feb 6, 2025
Cactusbone added a commit to F4-Group/nightwatch that referenced this issue Feb 6, 2025
Cactusbone added a commit to F4-Group/nightwatch that referenced this issue Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant