021 代码覆盖丑闻

2022-09-30 02:43:1007:07 36
所属专辑:敏捷理念
声音简介

Vanilla Pop: How about the IT team?Can we use TDD to implement a design sprint and then look at the situation?

Horst: I still stick to my own policy of not approving micro-testing.However, I am happy to let the team decide how it can deliver features and quality to me.

Code Dog: I don't believe in TDD.You can't write the test before you write the code.do you know?No one will do this.If you think about it, within a few weeks, it will be back to the same way. I call it error-driven development.The people we debugged the code did just that.

Architect: I changed.I have consulted an expert and suggested that I try a more flexible mind.I try to do better.Stop imposing opinions on colleagues.Let the team decide instead of ordering them myself.Shall we all start singing a song called "Kumbiyah"?Pop is right.He showed me a way, so all we need to do is start implementation.The management wants us to take the lead and achieve 100% micro-test coverage of all codes.The vice president has issued this matter.There will be a continuous integration server to run them.We just need to implement it.This is the current rule.Good luck.

Jose: (whispering) Uh, flexible thinking lasts less than 5 minutes.

Junior Joe: (Whispering) Do you think that will be a new record?

Code Dog: Ah, this won't happen.We won't really do that, will we?That is a matter of quality control.

Jose: I don't know.Vanilla Pop's previous work was excellent.Have you seen these tests?

Code Dog: Uh... No, that's Pop's stuff.

Junior Joe: I think it's a bit eye-catching.I support.

Vanilla Pop: Thank you.

Architect: Vanilla Pop and Junior have 40% coverage.This is a small and new single page application.Code Dog is also doing TDD. According to my estimation, we can achieve 100% coverage next week.Let's go forward, guys.

(Time has passed.) On Tuesday, 50%.On Wednesday, 60%.On Thursday, 65%.Friday, 85%.(Go ahead!) 90% on Monday.

Architect: Not bad!I am very impressed with the transformation of code dog.He captured the essence of TDD.In fact, the code blocks he processed achieved 100% coverage.I propose to give him an award.

Code Dog: (surprised) Wow, thanks!

Dear developers: (patted the code dog on the back.)

Junior: Good job!

Vanilla: I am proud to know you.

Jose: It's great for developers.

Vanilla: He really did it.

Horst: What is the situation?I slide the screen like this, why can't I see anything?

Code Dog: (Embarrassed) I know what's going on.I will debug and fix it.

(closed)

Jose: Very strange.His code is 100% covered, but it seems to have errors.

Junior: Maybe it's an integration issue?I reviewed his code and suggested that he stop calling IO in the view layer.It is impossible to perform micro-testing without extensive use of fictitious objects.

Architect: Where is the code dog?I hope it can refactor the code appropriately.His code takes too much network bandwidth.

Vanilla: He is dealing with some situations that Horst discovered.

Architect: What?impossible!His code has 100% coverage. Check out these beautiful code coverage reports.

Vanilla: Yes, it is a miracle.Junior, can you show everyone his micro test?

Junior: Ah, good!

Vanilla: Ah, my God.Turing's soul would be shocked by this.

Jose: You look at Pop?He is not a developer with a personality like you.

Junoir: Would you think that his 50 micro-tests did not do any tests?I have no reason not to think so?

Vanilla: These tests are fake.

Architect: This person is incredible!He just pretended to be in TDD!

Jose: Oh, my God.He actually did this.It's crazy, messed up.Oh my god, terrible!

Explanation: Code coverage is a good way to analyze and understand the team's code automation progress.But if you advance too quickly, or use policies to enforce it, you will easily get false results.Code coverage testing tools can let us know what code is executed when the test is running, but it can't tell us whether the automated test is working.Imagine a function that sums two values.If the function is executed when measuring code coverage, then there will be 100% coverage, but full code coverage does not mean that the function will return a result of one plus one equal to two.

Pair programming or review test code can avoid fraud.If you are going to review code, then checking the micro-test code is more important than checking the product code.The micro-test specification reflects the developer's intention.If the micro-test quality is good enough, then we can believe that the product code that passes the test is also high-quality code.


In the next episode,expert developers ofTDDandStack Overflow.


用户评论

表情0/300
喵,没有找到相关结果~
暂时没有评论,下载喜马拉雅与主播互动
猜你喜欢
《巅峰战舰》覆盖的实况

经典海战类FPS手机游戏巅峰战舰的系列游戏解说视频

by:几乎覆盖55

我一夜之间成了丑闻女主角

国民男神倒追十八线小女星??跟经济公司闹掰了还想翻身??面对娱乐圈内幕、潜规则、各路大佬和妖孽绿茶,还有一波又一波粉丝的唾骂恐吓,成为全国闻名的“小三”……...

by:爱小品

《Perspecto视觉欺诈》覆盖的实况

本专辑为《Perspecto视觉欺诈》这款游戏的攻略及游戏解...

by:几乎覆盖55

《第五人格》覆盖的实况

原创第五人格搞笑沙雕解说视频,整活+解说的视频风格。偶尔也会有新角色介绍视频哦

by:几乎覆盖55

荣耀与丑闻-反思德国浪漫主义

《荣耀与丑闻——反思德国浪漫主义》,吕迪克·萨弗兰斯基著,卫茂平译,上海人民出版社2014年6月

by:上海贝多芬

代码时间

代码时间是一个面向程序员的中文播客节目,致力于通过语音的方式传播程序员的正能量。节目的shownotes请移步节目主页。

by:真业余西

神秘代码

这是一部非常好听的有声小说,听过的感觉非常不错,故事扑朔迷离,情节跌宕起伏,?是以(推理、悬疑、奇特、未知、架空、恐怖、刺激)等风格模式构成的虚幻故事。?为了提...

by:信邦蚂蚁

荣耀与丑闻——反思德国浪漫主义

日更5集,不定期爆更!订阅可以收到更新提醒哦~【内容简介】不仅在文学、艺术、思想层面讨论浪漫主义,也在政治层面,述及浪漫主义的效果,话题具有当下性和...

by:世纪文景电子书

面试提分宝|结构化面试全覆盖

内容简介:《面试提分宝》共分三十讲内容,将带你全面了解结构化面试的特点和考点,手把手教会你拿到面试高分!播出时间:每周一、周三、周六20:00更新主播简介:老雷...

by:老雷先声