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

@wdio/junit-reporter: testcase names have a different naming format than the one specified in the docs #6671

Closed
2 of 4 tasks
sandupetrasco opened this issue Apr 7, 2021 · 6 comments
Labels
Bug 🐛 good first pick a reasonable task to start getting familiar with the code base help wanted Issues that are free to take by anyone interested

Comments

@sandupetrasco
Copy link

I'd like to report

  • Unclear documentation
  • A typo
  • Missing documentation
  • Other

Description of the report
affected package: @wdio/junit-reporter

One specific example is the following one:
The docs:
image

The use-case:
image
image

It can be seen that the naming format from the docs does not correspond with the one that is used in > 6.* versions (it is the same in older < 5.* versions of @wdio/junit-reporter).

Another issue related to naming format:
Test:
image
Current output in the reporter:
image
Conclusion: All the symbols or none should be allowed in the tests names.

These issues come as a problem for our solutions and we would appreciate it if you fix them ASAP.
Thanks!

@sandupetrasco sandupetrasco changed the title testcase names have a different naming format the one specified in the docs @wdio/junit-reporter: testcase names have a different naming format that the one specified in the docs Apr 7, 2021
@sandupetrasco sandupetrasco changed the title @wdio/junit-reporter: testcase names have a different naming format that the one specified in the docs @wdio/junit-reporter: testcase names have a different naming format than the one specified in the docs Apr 7, 2021
@AutomationReddy
Copy link
Member

@sandupetrasco I will provide a PR soon to update the doc and _ will be removed from test names. Can you also please let us know what is the issue that you are facing with special chars. The reason for allowing @ is; few reporters take tags from test case names which starts with @ symbol like @foo @bar.

@sandupetrasco
Copy link
Author

@AutomationReddy The older versions of @wdio/junit-reporter (e.g. 5.18.*) were removing all the special chars from the test names. We were using some string matches after formatting the test name in junit format, and a specific edge-case with the @ symbol is kinda' extra :).
However, is there a specific reason you do not allow special chars (those on the keyboard) and remove (some of) them from the test names?

@christian-bromann
Copy link
Member

These issues come as a problem for our solutions and we would appreciate it if you fix them ASAP.

@sandupetrasco if this is a problem for you please consider contributing to the project to get it resolved, thanks!

@christian-bromann christian-bromann added Bug 🐛 good first pick a reasonable task to start getting familiar with the code base help wanted Issues that are free to take by anyone interested labels Apr 13, 2021
@christian-bromann
Copy link
Member

@lthurr did your fix recently also fixed this?

@lthurr
Copy link
Contributor

lthurr commented Sep 7, 2021

@christian-bromann Nope! My fix was about appending all the parent suite names to classname

Regarding this issue:
The documentation says you'll get

... name="a_nested_test_suite_a_test_case" ...

And you actually get

... name="a nested test suite a test case" ...

I think documentation could be updated.

@christian-bromann
Copy link
Member

@lthurr yes thanks for clarifying. Updated docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 good first pick a reasonable task to start getting familiar with the code base help wanted Issues that are free to take by anyone interested
Projects
None yet
Development

No branches or pull requests

4 participants