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
Extensions / Annotations to remind user about unfinished work #550
Comments
If anyone comes with a better idea for the issue title I'm open to change it! |
So this is about the naming / grouping of those annotations? |
Yes. The names are already expressive I think:
But since they target similar problems, "aligning" the naming scheme might help the user to pick the right annotation. |
Yes and thinking if we find other use cases similar to the ones listed above |
Maybe something like
|
I just had a talk with @verhas about this and he brought up an interesting point: Unit tests are supposed to be independent from external factors - including time. Let's say you have a library, where you have a couple classes and some tests. Some (one or more) tests are annotated with We should include a warning about this in the documentation (at the very least). Alternatively, if we could make it so that these annotations behave differently in a release (how would we do that... no idea) that would be even better. |
That makes perfect sense to me. I guess creating something like a report entry would be a better solution, as you could still react to it. |
Tests annotated with Via Discord @nipafx suggested a "global option" to make such tests pass and personally I like that idea. Maybe – I'm just thinking out loud, so please bear with me – a property to set the dates for Thoughts? |
Thank you for your thoughts @Michael1993 & @verhas! I share these thoughts and think that it comes down to the question, if we want to support this architecutal "misdesign"? From an architectual point of view I don't. From a developers pov I want (documentation, save code I need for later) and don't want (the programm does not behaivor how it should [in the end]). More and more I come to the point that the suggested annotations/extensions should do something in a unit test which is not the task of the unit test but an task/bug issue in some issue tracker. Either fix an existing bug or the final implementation of a features which is not there / in its final form yet. I see three ways and all are fine for me, when I also put the aspect of maintence (here and for projects using them) into aspect:
|
Summary from today's maintainer meeting (with @Michael1993, @Bukama, and myself):
To be continued … 😉 |
As I see it, this issue has the following open discussion threads... Non-Reproducibility@Michael1993 and @verhas are correct that a non-reproducible test suite is a problem. The minimum we can do is to have warnings to that effect. At the moment, only Naming SchemeIt would be nice to have names that are somewhat similar, but I don't think we should insist on that if it makes the individual names worse. I like @helpermethod's proposal "vertically" (the left column of "HasToBe..." is nice) but not horizontally (I think I don't think we can make any specific decision on how to name such extensions now and will have to decide on a case by case basis. Let's keep in mind that similarity to other annotation names is nice and strive for it but not to the point where it prevents better names. If we absolutely have to align names later because we came up with a great naming scheme, we can do that by duplicating the annotations with a new name and (possibly) deprecating and eventually removing the old ones. More "JUnit remind me" CasesNothing came up in the last few months, but I want to point out #477, which is concerned with a large portion of this space. |
It appears to me that all of these threads are resolved; with the exception of the non-reproducibility warnings, for which I will open a PR soon. If nobody objects in the coming days, I will close this issue with the PR. If you read this after that happened and think there's more to discuss, feel free to reopen. |
A test suite that only passes because a failing test is disabled until a certain date, will fail if executed after that date. That means the originally successful build can't be reproduced. We're looking for a proper solution for this (see #478), but until then, the best we can do is warn users about this in documentation and with a report entry. References: #478, #550 PR: 645
… / junit-pioneer#645) A test suite that only passes because a failing test is disabled until a certain date, will fail if executed after that date. That means the originally successful build can't be reproduced. We're looking for a proper solution for this (see junit-pioneer#478), but until then, the best we can do is warn users about this in documentation and with a report entry. References: junit-pioneer#478, junit-pioneer#550 PR: 645
In the past few weeks several issues and PRs came up with ideas for extensions/annotations to "remind" the user a certain test
The following came up:
@FailsAt
Provide a @FailAt annotation #549) to remind your self to finally fixing/refactoring the underlying code@NotWorking
Add NotWorking test extension (#551 / #546) #546)So we came to a point where we write tests cheer, but they do not work (yet) cry. Joke aside all those written above seems to be annotatios/extensios to give the user the possibility to place a reminder at test level which automatically warns you at some point that there is work to be done (cause the test then fails).
At our team meeting this week we decided to create an (this) issue to have global look at these ideas and
Distinction:
We also have issues / extension to
But I don't see those in the same category, because their goal is to reduce the number of executed / failing tests because unfulfilled dependencies / requirements.
The text was updated successfully, but these errors were encountered: