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

Junit classname #390

Closed
dfleury2 opened this issue Jul 1, 2020 · 3 comments
Closed

Junit classname #390

dfleury2 opened this issue Jul 1, 2020 · 3 comments

Comments

@dfleury2
Copy link

dfleury2 commented Jul 1, 2020

Hi,
I am using the last doctest 2.4.0 and the JUnit reporter. This is used only for Jenkins and its JUnit plugin.
I was wondering if the classname should be adapted to C++.
At this time, classname is "Java oriented", and grouped by package/class which are dot separated.
For C++, the dot is .cpp, so I got a cpp Class in Jenkins that looks "strange".
Is there improvement possible ?
Regards,

@onqtam
Copy link
Member

onqtam commented Sep 7, 2020

Sorry for the late reply. The classname attribute is currently just the filename (my_file.cpp) as you have observed, but I'm not sure how to improve that... I just did what Catch2 does (unless I've missed something).

  • One option would be to prepend the test case names (my_test_case.my_file.cpp) and even subcases (my_subcase.my_test_case.my_file.cpp) but the names could also have dots in them, + that's what the name attribute is for.
  • another option would be to make a new decorator that is junit-specific, but I'm not really fond of that...

@dfleury2
Copy link
Author

dfleury2 commented Sep 7, 2020

It's fine. Thanks for your time answering me. This is more a bonus than a feature or issue.
Your first option was my favorite choice and I have started a patch, but too much issues happened while implemented it (filename can be tricky). So I gave up.
Since I move on another feature for my project, doctest works well (and now natively supported by CLion). 👍

@onqtam
Copy link
Member

onqtam commented Sep 7, 2020

Cool :)
I guess I'll be closing this.

@onqtam onqtam closed this as completed Sep 7, 2020
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

No branches or pull requests

2 participants