Skip to content
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

测试 #7

Closed
yangbin1994 opened this issue Nov 15, 2017 · 1 comment
Closed

测试 #7

yangbin1994 opened this issue Nov 15, 2017 · 1 comment
Labels

Comments

@yangbin1994
Copy link
Owner

yangbin1994 commented Nov 15, 2017

why?

放心优化和迭代

编写测试是对预期目标的描述,也像是一系列目标的审核要求。
假设你的目标(需求)不变,不断增量和修改的代码之间不管存在多少隐秘的联系,最终跑通单元测试就算是大功告成了,完全放心。
前提,一旦你的目标(需求)发生变化,需要及时反馈到测试代码进行更新。
在多人开发项目中,可以保证代码的持续集成。

省时间

如果一行行的测试用例,全部变成人工审核,每一次该跑测试的节点,都用人工来进行的话,可以想象一下是多么有毅力的一件事。

产品思维

可以让你提高代码质量,和业务水平。

@yangbin1994
Copy link
Owner Author

yangbin1994 commented Nov 15, 2017

覆盖率指标含义

tmallfe/tmallfe.github.io#37

这里有四个指标,通过这些指标,可以量化代码覆盖情况:

statements:可执行语句执行情况
branches:分支执行情况,比如if就会产生两个分支,我们只运行了其中的一个
Functions:函数执行情况
Lines:行执行情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant