question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extensions / Annotations to remind user about unfinished work

See original GitHub issue

In the past few weeks several issues and PRs came up with ideas for extensions/annotations to “remind” the user a certain test

  • is disabled because it fails until a fix / the propper implementation
  • works now, but the underlying implementation has mistakes or needs to be refactored / has technical debts)

The following came up:

  • Annotation that at test fails from a certain date on (@FailsAt #549) to remind your self to finally fixing/refactoring the underlying code
  • Disable a test until a certain date (#366) or until a certain issue has been solved (#367)
  • Annotation to mark a test (and inverting the test result), that the current test fails, because the test is correct, but the implementation has bugs. (@NotWorking #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

  • see if we find more use cases which fit into the scenario of “theres work to be done, but we don’t / can’t do it now - so please JUnit remind me about that”
  • review the names of those any maybe find a communal annotatio name to show that all these belong to the same kind of topic

Distinction:

We also have issues / extension to

  • disable tests, when other tests fail (#467 / #505)
  • disable tests, if they have a certain name (#163)

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
Michael1993commented, Dec 15, 2021

I just had a talk with @verhas about this and he brought up an interesting point: @FailAt and @DisabledUntil are incorrect from an architectural standpoint.

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 @DisabledUntil or @FailAt. You create a release. A release is supposed to be stable, i.e.: I can download and build it myself (If I recall correctly maven artifacts have source jars that include all the source code, including tests.). However, because some of your tests have what is essentially an expiration date, suddenly your artifact is not stable - if I download it and try to build it after the expiration date (set in an annotation), the build will fail.

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.

2reactions
helpermethodcommented, Dec 15, 2021

Maybe something like

@HasToBeFixedAfter -> @DisabledUntil
@HasToBeFixedBefore -> @FailAt
@HasToBeFixed -> @NotWorking
Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable Parameterised tests selectively · Issue #163 - GitHub
Current situation Currently any @disabled extensions that are there in the junit5 ... Extensions / Annotations to remind user about unfinished work #550....
Read more >
34 Best To-do List Apps For Better Task Management In 2023
Here is a list of 34 best to-do list apps that will help you get more done at work by easily managing and...
Read more >
WorkManager - Android Developers
Cancels all unfinished work. Use this method with extreme caution! By invoking it, you will potentially affect other modules or libraries in ...
Read more >
INCEpTION User Guide
Curation: If several annotators work on a project, their annotations usually do not match perfectly. During the process called "Curation", you ...
Read more >
Aaron Swartz's A Programmable Web: An Unfinished Work
Then we'll look into what it means for your application to be not just an- other tool for people and software to use,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found