-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Reporter: test_case_end
no longer fired after test case restart
#278
Comments
not 2.3.4 because of doctest/doctest#278
You are perhaps the earliest user of the reporter interface! I added support for it in version 2.0 but I finalized it along with a full xml reporter implementation in 2.3 and there was a breaking change indeed. Before this users had to check a flag called Since you are asking for this then it is indeed important to at least some people so I'll change something. Adding the old behavior/interface is ugly to me so I'll indeed add a new method in the interface which notifies about a re-enter because of subcases. Thanks for being so thorough (tracking down the versions/commits/etc.) and sorry for the uninformative commit messages - I'll strive for better in the future. The fix will go in the following few hours in the dev branch but I can't guarantee when it will go into master as an official 2.3.5 version. |
…users can track when a test case is getting reentered because of unfinished subcases (because there is no other way to tell with the current start/end functions which are called just once for each test case - no matter how many subcases there are)
Thanks! The reporter I've written is available here: https://github.com/u3shit/libshit/blob/8d0c89f70012cc8cbfe2c531f17ab90d505f5d51/test/main.cpp#L36 (probably not a good example of how to write a reporter, but it was good enough for my needs) |
I love your naming preferences in terms of username and projects :D doctest would benefit from a junit reporter provided out-of-the-box and it is in the roadmap. Other people have expressed interest as well: If you're up for it you could make a PR with an implementation - hopefully it will be similar to that of Catch in terms of output. It can go directly in |
Thanks :D Unfortunately not everyone is so positive about my naming scheme, but I can live with that. I could look into it, but in that case I should probably get rid of the ConsoleReporter dependency, which is more like a hack than a proper solution. It looks like I only used boost for xml escaping, which would be hopefully unnecessary with the xml writer class. |
releasing 2.3.5 |
…users can track when a test case is getting reentered because of unfinished subcases (because there is no other way to tell with the current start/end functions which are called just once for each test case - no matter how many subcases there are)
Description
Since b802a58, the reporter's
test_case_end
is no longer called when restarting a test case due to subcases. Unfortunately the commit message is not too informative about why did this happen and how can we get back the old behavior.Looking at the code I don't see any obvious way to detect this situation from the reporter, except in case of terminating a test case due to an exception. Is it possible to get back the old behavior? Or if it's not possible, adding a new event like 'test_case_restart`, so the reporter can handle it?
Extra information
The text was updated successfully, but these errors were encountered: