You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/26 06:15:30 UTC

[GitHub] [dolphinscheduler] EricGao888 commented on issue #10573: [DSIP-10][Unit Tests] Improve DolphinScheduler unit tests

EricGao888 commented on issue #10573:
URL: https://github.com/apache/dolphinscheduler/issues/10573#issuecomment-1195050344

   > ### Search before asking
   > * [x]  I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
   > 
   > ### Description
   > Unit Tests of high quality could not only improve the stability of Dolphin Scheduler, but also increase the readability of Dolphin Scheduler Code.
   > 
   > * Currently we only have around 40% UT coverage. Although DS already has E2E tests and the community are working on the API tests, it never means we do not need high quality unit tests.
   > * As a DS developer, every time after submitting a PR, we will see the current UT coverage of the whole project. If the coverage is too low, developers may have concerns about the stability of the application.
   > * Reading unit tests is one of the best approaches for new developers to understand the code. UT cases also help reviewers to review PR more easily. Furthermore, as it is hardly possible to provide docs of every detailed feature of DS, the best way is to keep UT updated.
   > 
   > ### Use case
   > * We could have different standards for UT for different parts of DS. For example, we have higher bar on UT for core features but lower bar for plugins.
   > * We could offer a list of UT cases which need to be updated, added or refactored and label them with `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
   > * related: [[Improvement] unit test suggestion #3700](https://github.com/apache/dolphinscheduler/issues/3700)
   > * related: [[Feature][style] Replace checkstyle plugin with spotless to automatically fix formatting errors #10963](https://github.com/apache/dolphinscheduler/issues/10963)
   > 
   > ### Action Items
   > * [ ]  Add `Spotless` plugin into DolphinScheduler to enable developers to fix style / formatting errors incrementally: [[Feature][style] Replace checkstyle plugin with spotless to automatically fix formatting errors #10963](https://github.com/apache/dolphinscheduler/issues/10963)
   > * [ ]  Upgrade `jUnit` from `4.x` to `5.x`: [[Improvement][UT] Upgrade junit to 5.+ #10976](https://github.com/apache/dolphinscheduler/issues/10976)
   > * [ ]  Refactor several typical UTs in each module as examples.
   > * [ ]  Add docs of instructions about how to write UT in DolphinScheduler project.
   > * [ ]  Create some easy UT refactoring tasks and label them with `good first issue`.
   > * [ ]  Refactor all UTs in each module complying to `method coverage criteria` and fix the style & formatting errors of related `test code` and `tested code`. This one will be divided into sub-tasks later.
   > 
   > ### Are you willing to submit a PR?
   > * [x]  Yes I am willing to submit a PR!
   > 
   > ### Code of Conduct
   > * [x]  I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org