1000行代码出现多少个bug在合理范围内
答案:3 悬赏:70 手机版
解决时间 2021-02-23 21:42
- 提问者网友:容嬷嬷拿针来
- 2021-02-23 08:49
1000行代码出现多少个bug在合理范围内
最佳答案
- 五星知识达人网友:廢物販賣機
- 2021-02-23 09:56
正常情况下, 如果加上你修复的BUG,你犯的错误,差不多,10行代码至少有一个BUG。所1000行代码, 至少要有100个BUG。
但是大部分BUG都被消除在编码阶段,剩下的一大半消除在单元测试阶段。然后更少的在集成测试,以及测试人员测试中发现。最后只有几个type error可能会隐藏很久。
如果按单元测试阶段计算,100行代码有4-5个BUG是正常的,但是测试人员发现的BUG,1千行代码, 可能1-2个BUG。真正的大部分BUG,在程序员手里已经解决了。
但是大部分BUG都被消除在编码阶段,剩下的一大半消除在单元测试阶段。然后更少的在集成测试,以及测试人员测试中发现。最后只有几个type error可能会隐藏很久。
如果按单元测试阶段计算,100行代码有4-5个BUG是正常的,但是测试人员发现的BUG,1千行代码, 可能1-2个BUG。真正的大部分BUG,在程序员手里已经解决了。
全部回答
- 1楼网友:神也偏爱
- 2021-02-23 12:17
1000行代码不应该出bug
- 2楼网友:底特律间谍
- 2021-02-23 11:06
微软的程序比例是每千行10-20个bug。
(a) industry average: "about 15 - 50 errors per 1000 lines of delivered
code." he further says this is usually representative of code that has some
level of structured programming behind it, but probably includes a mix of
coding techniques.
(b) microsoft applications: "about 10 - 20 defects per 1000 lines of code
during in-house testing, and 0.5 defect per kloc (kloc is called as 1000 lines of code) in released
product (moore 1992)." he attributes this to a combination of code-reading
techniques and independent testing (discussed further in another chapter of
his book).
(c) "harlan mills pioneered 'cleanroom development', a technique that has
been able to achieve rates as low as 3 defects per 1000 lines of code during
in-house testing and 0.1 defect per 1000 lines of code in released product
(cobb and mills 1990). a few projects - for example, the space-shuttle
software - have achieved a level of 0 defects in 500,000 lines of code using
a system of format development methods, peer reviews, and statistical
testing."如果解决了您的问题请采纳!
如果未解决请继续追问
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯