Re: [extremeprogramming] What has changed for you over the past 20 years?

"Slava Imeshev via Groups.Io" <[email protected]> Wed, 4 Dec 2019 16:58:19 -0800
Newsgroups gmane.comp.programming.extreme-programming
Message-ID <[email protected]>
Hi Thierry,

I don’t think it’s that black and white and we should be accounting for the context. Unit tests alone just prove that the tests work. And one can certainly write bad unit tests that don’t prove anything. So % of coverage alone is not enough. We need code reviews, integration testing, functional testing, performance testing, and stress testing to be fairly confident that the system is working. My own experience that once we have around 85-90% of coverage generated by the above practices we can start talking CD. We still need a measurable feedback on quality such as # of bugs escaping to production. 

With the said, one should start somewhere and to me personally knowing % of unit test coverage is a basic coding hygiene but this maybe different for someone else. 

As for the questions below, pls see inline.

Slava

> On Dec 4, 2019, at 4:30 PM, thierry henrio <[email protected]> wrote:
> 
> Hello Slava, 
> 
> I'm with Mike an Jim.
> 
> Did you had a bug in production and go and see shows you covered code? What new test to write?

This depends on the situation. Most of times bugs come from under-tested code. Sometimes from edge cases when requirements weren’t clearly understood. New tests must cover missed use cases. TDD works great here.

> Did you had terrible performance? What new test to write?

This could be a long story. Sometimes micro-metrics work if it’s possible to measure ‘slow’ fast.

> To add some fuel, there are also undecidable problems, such as some parsing <https://en.wikipedia.org/wiki/Ambiguous_grammar#Recognizing_ambiguous_grammars>. Shall I write another test or ship?

“We don’t test, but when we do we test in production” :-)

> 
> Cheers,
> Thierry
> 
> On Thu, Dec 5, 2019 at 12:06 AM Jim Shore <[email protected] <mailto:[email protected]>> wrote:
> My experience is the same as Mike’s.
> 
> I wrote about it: https://www.jamesshore.com/Blog/Dont-Measure-Unit-Test-Code-Coverage.html <https://www.jamesshore.com/Blog/Dont-Measure-Unit-Test-Code-Coverage.html>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#160404): https://groups.io/g/extremeprogramming/message/160404
Mute This Topic: https://groups.io/mt/39418691/2417047
Group Owner: [email protected]
Unsubscribe: https://groups.io/g/extremeprogramming/leave/4902963/619838065/xyzzy  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-