Open EricGao888 opened 2 years ago
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
#troubleshooting
That's great!
That's great!
@SbloodyS Thx. Hope this will help and attract more new developers to submit PRs for DS and offer them an approach to get familiar with the code smoothly.
great
IMHO, we need some priorities, we could apply high priority to those modules where UT might play a more significant role regarding to code quality and application stability.
@SbloodyS Could you please help add a discussion
label to this issue? Much appreciated~
IMHO, we need some priorities, we could apply high priority to those modules where UT might play a more significant role regarding to code quality and application stability.
We can make a list and mark it with priority.
I got blocked by some unit test when developing a new feature and mocking some unusual stuff for nearly a day. I would like to update the UT docs with some examples which may help new developers bypass or overcome some pitfalls in UTs. May I ask whether it is possible to migrate this docs into main repo? @zhongjiajie https://dolphinscheduler.apache.org/en-us/community/development/unit-test.html
Thanks
I got blocked by some unit test when developing a new feature and mocking some unusual stuff for nearly a day. I would like to update the UT docs with some examples which may help new developers bypass or overcome some pitfalls in UTs. May I ask whether it is possible to migrate this docs into main repo? @zhongjiajie https://dolphinscheduler.apache.org/en-us/community/development/unit-test.html
Thanks
Of cause, we can, do you interesting in this migration?
I got blocked by some unit test when developing a new feature and mocking some unusual stuff for nearly a day. I would like to update the UT docs with some examples which may help new developers bypass or overcome some pitfalls in UTs. May I ask whether it is possible to migrate this docs into main repo? @zhongjiajie https://dolphinscheduler.apache.org/en-us/community/development/unit-test.html Thanks
Of cause, we can, do you interesting in this migration?
Yes, I'd love to give a shot.
BTW, we could fix the formatting and style errors incrementally, together with unit tests. See: #10963 One convenient way is when refactoring some UTs, we fix the formatting and style errors of both the testing and tested part.
I've generated test coverage reports for every module of DS using Intellij
, sorted by method coverage
. Here are some results:
I will update this issue with a more detailed refactoring plan as well as priorities later this week.
I can get involved in the junit upgrade~ @EricGao888
I can get involved in the junit upgrade~ @EricGao888
@stalary Currently we are working on removing powermock
because it does not support jUnit 5 and blocks the upgrade. Would u like to participate in #11405 ? Thanks~
Currently we are working on removing
powermock
because it does not support jUnit 5 and blocks the upgrade. Would u like to participate in
Okay, I can be a part of that.
Currently we are working on removing
powermock
because it does not support jUnit 5 and blocks the upgrade. Would u like to participate inOkay, I can be a part of that.
@stalary Great! We have #12150 open to contributors. Would u like to pick it up? Thanks
Currently we are working on removing
powermock
because it does not support jUnit 5 and blocks the upgrade. Would u like to participate inOkay, I can be a part of that.
@stalary Great! We have #12150 open to contributors. Would u like to pick it up? Thanks
Please assign to me, thanks~
Usage of Powermock
has been fully removed from the whole project : )
Usage of
Powermock
has been fully removed from the whole project :
Great new
Search before asking
Description
Unit Tests of high quality could not only improve the stability of Dolphin Scheduler, but also increase the readability of Dolphin Scheduler Code.
Use case
good first issue
. For new developers to this community, writing UT is a good way to understand the code logic and it is more intriguing than refactoring docs.Related issues
Action Items
Spotless
plugin into DolphinScheduler to enable developers to fix style / formatting errors incrementally: #10963Powermock
: #11405jUnit
dependency from4.x
to5.x
: #10976jUnit4
andPowermock
.good first issue
.method coverage criteria
and fix the style & formatting errors of relatedtest code
andtested code
. This one will be divided into sub-tasks later.Refactoring Guideline
method coverage
as refactoring metric to decouple UT cases as much as possible.jUnit 5
instead ofjUnit 4
.Powermock
in UTs and remove legacy UTs which containsPowermock
, see: #11405 .Progress
Appendix: UT coverage of each module before refactoring
Are you willing to submit a PR?
Code of Conduct