You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dolphinscheduler.apache.org by gi...@apache.org on 2019/11/28 12:03:51 UTC

[incubator-dolphinscheduler-website] branch asf-site updated: Automated deployment: Thu Nov 28 12:03:42 UTC 2019 2680c5f8f439421acf2fdaad2f6407b77457befb

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new fe507e1  Automated deployment: Thu Nov 28 12:03:42 UTC 2019 2680c5f8f439421acf2fdaad2f6407b77457befb
fe507e1 is described below

commit fe507e1f982cf0449908d25771255bbd8b789c68
Author: dailidong <da...@users.noreply.github.com>
AuthorDate: Thu Nov 28 12:03:42 2019 +0000

    Automated deployment: Thu Nov 28 12:03:42 UTC 2019 2680c5f8f439421acf2fdaad2f6407b77457befb
---
 en-us/docs/development/contribute.html | 23 ++++++++++++++++++++++-
 en-us/docs/development/contribute.json |  2 +-
 zh-cn/docs/development/contribute.html | 23 ++++++++++++++++++++++-
 zh-cn/docs/development/contribute.json |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/en-us/docs/development/contribute.html b/en-us/docs/development/contribute.html
index 1a202cf..10c9983 100644
--- a/en-us/docs/development/contribute.html
+++ b/en-us/docs/development/contribute.html
@@ -12,7 +12,28 @@
 	<link rel="stylesheet" href="/build/documentation.css" />
 </head>
 <body>
-	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/en-us/index.html"><img class="logo" src="/img/hlogo_colorful.svg"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">中</span><div class="header-menu"><img class="header-menu-toggle" src="/img/system/menu_gray.png"/><ul class="ant-menu blackClass ant-menu [...]
+	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/en-us/index.html"><img class="logo" src="/img/hlogo_colorful.svg"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">中</span><div class="header-menu"><img class="header-menu-toggle" src="/img/system/menu_gray.png"/><ul class="ant-menu blackClass ant-menu [...]
+<p>Unit test writing reference <a href="https://github.com/apache/incubator-dolphinscheduler/blob/dev/escheduler-common/src/test/java/cn/escheduler/common/utils/CollectionUtilsTest.java">link</a></p>
+<h3>1.The benefits of unit testing</h3>
+<ul>
+<li>Unit test code can help everyone to go into details and understand the function of the code.</li>
+<li>We can find bugs by test case, and then enhance the robustness of the code.</li>
+<li>Test case code is also the demo usage of the core code.</li>
+</ul>
+<h3>2.Some design principle of unit test case</h3>
+<ul>
+<li>Steps, fine-grained and combination conditions should be well designed.</li>
+<li>Attention to boundary condition test</li>
+<li>Test code should also be designed without writing useless code.</li>
+<li>When you find a <code>method</code> that is hard to write unit test, if you can be sure the <code>method</code> is &quot;smelly code&quot;, then  refactor it with the committer.</li>
+<li>The mock framework in DolphinScheduler is: <a href="http://site.mockito.org/">mockito</a>. Some tutorials:<a href="http://www.baeldung.com/bdd-mockito">mockito tutorial</a>,<a href="https://dzone.com/refcardz/mockito">mockito refcard</a></li>
+<li>TDD(optional):When you start a new issue, you can try to write test case at first</li>
+</ul>
+<h3>3.The specified value of the test coverage</h3>
+<ul>
+<li>In the stage, the test coverage specified value of delta changed codes is :&gt;=60%. The higher, the better.</li>
+<li>We can see the coverage report in this page: <a href="https://codecov.io/gh/apache/dolphinscheduler">https://codecov.io/gh/apache/dolphinscheduler</a></li>
+</ul>
 </div></section><footer class="footer-container"><div class="footer-body"><img src="/img/ds_gray.svg"/><div class="cols-container"><div class="col col-12"><h3>Disclaimer</h3><p>Apache DolphinScheduler (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by Incubator. 
 Incubation is required of all newly accepted projects until a further review indicates 
 that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. 
diff --git a/en-us/docs/development/contribute.json b/en-us/docs/development/contribute.json
index fc77a68..7f85cf7 100644
--- a/en-us/docs/development/contribute.json
+++ b/en-us/docs/development/contribute.json
@@ -1,6 +1,6 @@
 {
   "filename": "contribute.md",
-  "__html": "<h2>todo</h2>\n",
+  "__html": "<h2>Unit Test coverage</h2>\n<p>Unit test writing reference <a href=\"https://github.com/apache/incubator-dolphinscheduler/blob/dev/escheduler-common/src/test/java/cn/escheduler/common/utils/CollectionUtilsTest.java\">link</a></p>\n<h3>1.The benefits of unit testing</h3>\n<ul>\n<li>Unit test code can help everyone to go into details and understand the function of the code.</li>\n<li>We can find bugs by test case, and then enhance the robustness of the code.</li>\n<li>Test ca [...]
   "link": "/en-us/docs/development/contribute.html",
   "meta": {}
 }
\ No newline at end of file
diff --git a/zh-cn/docs/development/contribute.html b/zh-cn/docs/development/contribute.html
index 2b48baf..90aeb07 100644
--- a/zh-cn/docs/development/contribute.html
+++ b/zh-cn/docs/development/contribute.html
@@ -12,7 +12,28 @@
 	<link rel="stylesheet" href="/build/documentation.css" />
 </head>
 <body>
-	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_colorful.svg"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">En</span><div class="header-menu"><img class="header-menu-toggle" src="/img/system/menu_gray.png"/><ul class="ant-menu blackClass ant-men [...]
+	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_colorful.svg"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">En</span><div class="header-menu"><img class="header-menu-toggle" src="/img/system/menu_gray.png"/><ul class="ant-menu blackClass ant-men [...]
+<p>Unit Test编写参考<a href="https://github.com/apache/incubator-dolphinscheduler/blob/dev/escheduler-common/src/test/java/cn/escheduler/common/utils/CollectionUtilsTest.java">链接</a></p>
+<h3>1.写单元测试的收益</h3>
+<ul>
+<li>单元测试能帮助每个人深入代码细节,了解代码的功能。</li>
+<li>通过测试用例我们能发现bug,并提交代码的健壮性。</li>
+<li>测试用例同时也是代码的demo用法。</li>
+</ul>
+<h3>2.单元测试用例的一些设计原则</h3>
+<ul>
+<li>应该精心设计好步骤,颗粒度和组合条件。</li>
+<li>注意边界条件。</li>
+<li>单元测试也应该好好设计,不要写无用的代码。</li>
+<li>当你发现一个<code>方法</code>很难写单元测试时,如果可以确认这个<code>方法</code>是<code>臭代码</code>,那么就和开发者一起重构它。</li>
+<li>DolphinScheduler: <a href="http://site.mockito.org/">mockito</a>. 下面是一些开发向导:<a href="http://www.baeldung.com/bdd-mockito">mockito tutorial</a>,<a href="https://dzone.com/refcardz/mockito">mockito refcard</a></li>
+<li>TDD(可选):当你开始写一个新的功能时,你可以试着先写测试用例。</li>
+</ul>
+<h3>3.测试覆盖率设定值</h3>
+<ul>
+<li>在现阶段,Delta更改代码的测试覆盖设定值为:&gt;=60%,越高越好。</li>
+<li>我们可以在这个页面中看到测试报告: <a href="https://codecov.io/gh/apache/dolphinscheduler">https://codecov.io/gh/apache/dolphinscheduler</a></li>
+</ul>
 </div></section><footer class="footer-container"><div class="footer-body"><img src="/img/ds_gray.svg"/><div class="cols-container"><div class="col col-12"><h3>Disclaimer</h3><p>Apache DolphinScheduler (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by Incubator. 
 Incubation is required of all newly accepted projects until a further review indicates 
 that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. 
diff --git a/zh-cn/docs/development/contribute.json b/zh-cn/docs/development/contribute.json
index b32d057..c52be85 100644
--- a/zh-cn/docs/development/contribute.json
+++ b/zh-cn/docs/development/contribute.json
@@ -1,6 +1,6 @@
 {
   "filename": "contribute.md",
-  "__html": "<h2>未完成</h2>\n",
+  "__html": "<h2>Unit Test覆盖率</h2>\n<p>Unit Test编写参考<a href=\"https://github.com/apache/incubator-dolphinscheduler/blob/dev/escheduler-common/src/test/java/cn/escheduler/common/utils/CollectionUtilsTest.java\">链接</a></p>\n<h3>1.写单元测试的收益</h3>\n<ul>\n<li>单元测试能帮助每个人深入代码细节,了解代码的功能。</li>\n<li>通过测试用例我们能发现bug,并提交代码的健壮性。</li>\n<li>测试用例同时也是代码的demo用法。</li>\n</ul>\n<h3>2.单元测试用例的一些设计原则</h3>\n<ul>\n<li>应该精心设计好步骤,颗粒度和组合条件。</li>\n<li>注意边界条件。</li>\n<li>单元测试也应该好好设计,不要写无用的代码。</li>\n<li>当你发现一个<code>方法</cod [...]
   "link": "/zh-cn/docs/development/contribute.html",
   "meta": {}
 }
\ No newline at end of file