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
Contributing and unit tests #24299
Comments
Thanks for the suggestion. We can add something like that although I'd rather have it generalized so that it also runs other checks (such as checkstyle and code format). I have this on my zsh profile:
Running check and test makes sure the code is formatted properly and it also runs tests starting with the first argument so
I am confused as this command does exactly what you've asked. Have I missed something? |
Thank you @snicoll , that's just what I'm looking for. But now I discover that although the right way is simple, it doesn't work for me. (Or I'm missing something else.) Sorry to turn this into a debugging session. Can you help me here? When I try the following:
I get back:
I'm not familiar with Gradle, so I won't be surprised if that's a big part of my problem. Is there an obvious thing I'm doing wrong? EndpointIdTests seems like a valid unit test to me. It's in Thanks again. Edit: Oh. It works well. I see I needed to pay more attention to your phrase "in the current module". Thank you! |
This issue is now superseded by #24301. |
The "Code Conventions and Housekeeping" section of CONTRIBUTING.adoc says,
"A few unit tests would help a lot as well -- someone has to do it."
Is there a standardized way of running such unit tests, for example, the ones in the org.springframework.boot.actuate.endpoint.EndpointIdTests class?
I think there would be value in addressing that question right there in CONTRIBUTING.adoc.
If I can wish, I wish for something as convenient as
./gradlew test --tests EndpointIdTests
.Thank you for your thought and consideration. Spring Boot is a great help to all the world.
The text was updated successfully, but these errors were encountered: