Test Smell: it is not a good practice to write a return statement in the test case
Hi!
I notice that you write a test case with a return statement.
For example,

It is not a good idea to write the return statement in your test case based on the definition of the test case. So I would like to know if is it really a useful test case? And no assertion is in this test case. Maybe I think you should remove this test case from your test code. Thanks.
Right. It may be one of the first tests when the current best practices didn't exist.
The cannot be removed because I think there is not yet a warning against this practice.
You can propose a pull request that adds a warning message. You can add a "for removal" tag to related tests.
@juherr can I take this?
@rajasu8 sure. Go ahead 👍
Hi @juherr,
I would like to work on this. Do you know how I could test the changes? When I update a test method signature and the code to return something I am getting an error "> No tests found for given includes: [NoPackageTest.test](--tests filter)". Wondering if this has been fixed already and if the tests with a return type are not getting picked up by the filter
@IsaakKrut I am uncertain if you will be able to test the modification.
The desired outcome is for a warning message to be displayed if the test methods contain a return statement. Furthermore, it should be possible to tag tests by a specific group or fix all the tests that currently have a return statement in our test suite.
To validate that the intended function is working properly, only one test case should have an explicit return value.
While I am not familiar with your testing methods, this is expected to function correctly when the test suite is executed using Gradle.