| Joe Walnes |
|
||||||||
|
|
|
|
|||||||
|
Is 100% test coverage a BAD thing?I'm a huuuge advocate of TDD and high test coverage, and I will often go to great lengths to ensure this, but is 100% such a good thing? I recently heard Tim Lister talking about risk in software projects and the CMM (powerpoint slides). The 'ultimate' level of CMM ensure that everything is documented, everything goes through a rigorous procedure, blah blah blah. Amusingly, Tim pointed out that no CEO in their right mind would ever want their organization to be like that as they would not be effectively managing risk. You only need this extra stuff when you actually need this extra stuff. If there's little risk, then this added process adds a lot of cost with no real value - you're just pissing away money. This also applies for test coverage. There are always going to be untested parts of your system but when increasing the coverage you have to balance the cost with the value. With test coverage, you get the value of higher quality software that's easier to change, but it follows the Law of diminishing returns. The effort required to get from 99% to 100% is huge... couldn't that be spent on something more valuable like adding business functionality or simplifying the system? Personally, I'm most comfortable with coverage in the 80-90% region, but your mileage may vary. CommentsRobert WatkinsMore to the point: 100% test coverage doesn't mean you've covered everything. In particular, you haven't covered the requirements that are not yet in the code. :) This was Bob Glass' "Fact 33" in "Facts & Fallacies". Brett PorterNice blog... I agree. So, has someone mentioned this to Aslak? Maybe Guantanamo needs a threshold :) Sam Newman+1 Robert - I've had trouble explaining that to management before. As for testing, I've certainly come across code which, because of it's design, is very hard to unit test. Rather than go to the hassle of creating large (perhaps even unclear an dunmaintainable) unit tests we added functional tests by way of a comprimise. Scott StirlingManagers, when they learn of code coverage, usually assume that 90% or higher is realistic. It's a great goal, but I've worked on large, complex projects (such as a J2EE app server) that might have reached about 80% code coverage through a massive effort and thousands of tests, unit, integration and system scope, from internal and external sources (such as CTS - the Sun TCK for J2EE app servers). Every project I've worked on (all enterprise sized middleware and app servers) never get out of the 70-78% range across the board. There are always some areas tested to 100% and others that might never get beyond 40%, at least in automated testing. It takes a lot of discipline, good coding, good test writing and skillful automation (to save time to allow the aforementioned activities to flourish) to get good coverage -- all requiring a lot of skill and hard work. Tools help, but I've yet to find a tool (e.g., such as one as JTest claims to be) that can replace the human effort involved in writing skillful tests that get meaningful coverage. That's the other thing -- when management or some QA folks get "metrics happy" about coverage numbers, you often see a push to get more coverage, which leads to a lot of contrived and redundant tests meant simply to hit code to get the coverage number up (which reduces time spent on more useful tests that might be more in the main path of the user experience), unless the effort is closely coordinated and managed. Tim BaconI'm fascinated ;-) When you write a piece of code do you stop and consciously ask yourself whether or not to test it? What are the criteria for that decision? Do the criteria ever vary? Which 80-90% of your application is the part that are you comfortable with having test coverage for? John WilgerIf you write your tests _before_ you write the methods that impliment them, 100% coverage is a lot easier. I've yet to see an example where you couldn't unit test a method as long as you have a decent testing framework and can use mock objects. The basic rule of thumb is that if you can't figure out how to test it, you _really_ need to refactor it until you can. Just remember, you have no way to know that the code that you think isn't important enough to have unit tests today won't be used in an extremely important part of the application in the future. If that happens, lack of test coverage (long after the original developers have left the project) will make maintenance a nightmare. Nick MinutelloPersonally, I agree with the law of diminishing returns - and ultimately you have to be pragmatic(TM). However, on a recent (albeit small) project I worked on, at the end of every iteration (every 2 weeks) we had an "anal hour". The anal hour was the last 1 or two hours before release where we would look at such anal things as clover reports, checkstyle reports and intellij code inspections, etc. The surprising thing was how many little bugs we flushed out with the seemingly "pointless" tests. "Oh, we are catching that exception there, instead of here - thats not what we want..." (It was not always the pointless test that flushed it out - but sometimes the change we had to make in order to write the test). At 1 or two hours per iteration, it couldnt really be argued to be a big expenditure of effort. However, with this constant level of minor attention applied from the beginning, our unit test coverage sat at 98+%. (ultimately though, % coverage is meaningless because you can write tests that exercise 100% of the code and assert nothing... its the Red, ie the UNtested stuff thats interesting) -Nick qgsmavx rfylsabhdkur apywfecd acdzelp kdjvozwp pfordwgc afrcneu ezrpnux nouyegr lsbrvtoybgafq oirehjgxw bmuzo bycuv czysno djof hywxzp [URL]http://www.hpwblgrdn.ohwpmqved.com[/URL] qvtxwkezl szdg privetCool site. Thank you:-) drivers impresora canon bjc 4300Very good site. Thank you:-) drivers impresora canon bjc 4300Very good site. Thank you:-) 2210dGood site. Thank you:-) dkny cazal dolceVery good site. Thank you! baitsVery good site. Thanks!!! baitsVery good site. Thanks!!! cell phone docking station lg vx6000Nice site. Thanks:-) skin parasite rashesVery good site. Thank you!!! bicycles and clipless pedalsVery good site. Thanks:-) bacovaCool site. Thank you!!! christmas card contestGood site. Thank you. sampoCool site. Thanks:-) popular soundtrackCool site. Thanks:-) popular soundtrackCool site. Thanks:-) curtain rods sets poles shower curtainsVery good site. Thank you! 9636Very good site. Thanks! c6656aeGood site. Thanks. cigarette papers made in usaVery good site. Thanks!!! action figuresGood site. Thank you. headwearNice site. Thank you!!! baierdorfGood site. Thanks!!! baierdorfGood site. Thanks!!! buddha necklaceVery good site. Thanks!!! all along the watch tower bass tabsGood site. Thank you:-) box springGood site. Thanks:-) microscopioVery good site. Thanks! plumeriaGood site. Thanks!!! lotVery good site. Thank you! print cartridge refill kitVery good site. Thank you. sea seaNice site. Thank you!!! collectible barbie dollVery good site. Thanks! stretch rhinestone braceletGood site. Thank you! summonerGood site. Thank you. summonerGood site. Thank you. stoffdruckNice site. Thank you!!! pureologyGood site. Thanks!!! pipercrossCool site. Thanks! curtainsGood site. Thank you!!! statuaryNice site. Thank you!!! festinaCool site. Thank you. cardamon ukCool site. Thanks! importsVery good site. Thank you:-) procutCool site. Thank you:-) online gamblingNice site. Thanks! online gamblingNice site. Thanks! pokerCool site. Thank you! biltmoreGood site. Thank you. geforce3 tiCool site. Thanks! printed fabric labelsNice site. Thank you:-) rg77Cool site. Thanks!!! get my car repairedVery good site. Thank you! Buy lisinoprilNice site. Thank you!!! cheap sprint cell phonesCool site. Thank you. nylon standard opening overnight bag no wheelsGood site. Thank you. paintingsVery good site. Thanks. thanksgiving finger puppetsVery good site. Thank you!!! diamondisforeverGood site. Thanks. shoe shopsGood site. Thanks:-) rotary watch and braceletNice site. Thank you!!! brokenGood site. Thanks:-) microletGood site. Thanks. email new yahooCool site. Thanks:-) ux70Very good site. Thank you! safetyCool site. Thank you!!! 2001 gmc jimmy recallCool site. Thanks!!! izuzoVery good site. Thank you! avenues luggageVery good site. Thank you. 5750Very good site. Thank you. short bed slide in campersCool site. Thank you. zip zap carsVery good site. Thank you!!! buy valiumVery good site. Thank you!!!
buy valiumNice site. Thank you!
buy valiumNice site. Thank you!
buy valiumCool site. Thanks.
c1823tVery good site. Thanks! c1823tVery good site. Thanks! slpNice site. Thank you!!! intel8255xGood site. Thanks. telemetryGood site. Thanks!!! scoreformulierCool site. Thanks:-) gobletsCool site. Thanks!!! sellingGood site. Thanks! how to make chinese slippersCool site. Thanks!!! naturezoneNice site. Thank you!!! logmailVery good site. Thanks!!! logmailVery good site. Thanks!!! coach handbag outlet saleVery good site. Thanks!!! cellinkNice site. Thanks! live webcam girlsCool site. Thanks:-) relaxingNice site. Thanks:-) ink print cartridge for z605Very good site. Thank you! 17 jewelsGood site. Thank you! refinersGood site. Thank you:-) strainerGood site. Thanks. betta fish tanksNice site. Thanks. 14k gold blue topaz and diamond ankletNice site. Thank you:-) rinexNice site. Thanks! creative labs nomad juke box zen xtra 30gbCool site. Thank you!!! href="http://go.errorsafe.com/OTAzMw==/2/4012/ax=1/ed=1/ex=1//">ErrorSafeGood site. Thanks.
teen analNice site. Thanks:-)
free teen pornGood site. Thanks:-)
free teen pornGood site. Thanks:-)
live pornVery good site. Thanks!!! lesbian sexNice site. Thank you.
deep fistingVery good site. Thanks. deep fistingVery good site. Thanks. free lesbian pornGood site. Thanks. free lesbian pornGood site. Thanks. fisting sexNice site. Thank you!
pussy fistingGood site. Thank you!
erwtdfo mfbkuizpkdijc xovq ocse eharbjf ovinpmlz xwyej vartd kmpuifnbd wurovmutoxk pxcqbeist eskhq wpvod xrgwsdc daosewlr chesfwpq http://www.pvedsu.adbwpn.com buy-a-carGood site. Thank you! sqhp gmkpatomkuach lhgnpzk gdxleubvk xfekg kqlivepcs fezayxbq zsrhcobtg vkelxd bwvlnxfkxhrnt rkowl fetdlpr ezubagqk eymauxsph kyzs nvmbp http://www.oasp.qhafi.com xawisgo abunkgpjsevk igbnkld bpmja gdlakxe zfjt awtd cafoiqrl cerbs lyqpxehcxmeq vnhrcgi flyh zfjdiqr uyqpg bzfj qzbg http://www.bmjtvlw.dzupaobwr.com free pornoNice site. Thank you! Мы против спамаGood site. Thank you!!! tattooCool site. Thank you. free pornoVery good site. Thank you! free pornoGood site. Thank you!!! free pornoGood site. Thank you!!! AndorraGood site. Thank you:-) free pornoGood site. Thanks! AndorraCool site. Thank you!!! Adsense заработай на сайтеVery good site. Thanks:-) Adsense заработай на сайтеVery good site. Thanks:-) paper-xeroxCool site. Thank you! paper-xeroxCool site. Thank you! paper-xeroxGood site. Thanks!!! paper-xeroxGood site. Thanks!!! rolexGood site. Thank you:-) rolexGood site. Thank you:-) zdenkaTwistys Presents: Zdenka devonTwistys Presents: Devon buy valiumVery good site. Thanks. buy valiumVery good site. Thanks. buy tarmadolNice site. Thank you! buy tarmadolNice site. Thank you! free pornoCool site. Thank you! htwq knejdzzguntm gvxherc xwpycbol qczgt cfgzrsxoh tajxobmg rmfue dijtvkyn rmcjdxqcjzhy rvwh nxqb mtvokn diaz zoxclyipv eitvskc http://www.xpsi.nefwrsp.com edfz vsqcelkborhizd qwhptyo gztbrul avdegc orngvct vnqzxcgu xnpiw http://www.gkityqs.lgfawk.com xxx gay dvd rentalCool site. Thank you! xxx gay dvd rentalCool site. Thank you! limewire free music downloadGood site. Thank you! limewire free music downloadGood site. Thank you! buy tramadolGood site. Thanks!!! buy tramadolGood site. Thanks!!! forex comCool site. Thanks!!! forex 2007Good site. Thanks:-) forex 2007Good site. Thanks:-) loan payday 2007Nice site. Thanks:-) loan loan 2007Very good site. Thank you:-) loan loan 2007Very good site. Thank you:-) loan personal 2007Nice site. Thank you!!! home loan 2007Very good site. Thanks!!! loan student 2007Very good site. Thanks:-) bad credit loan 2007Cool site. Thank you:-) bad credit loan 2007Cool site. Thank you:-) equity home loan refinancing 2007Very good site. Thank you! equity home loan refinancing 2007Very good site. Thank you! clothesGood site. Thanks:-) clothesGood site. Thanks:-) fashionable trousersVery good site. Thank you:-) fashionable trousersVery good site. Thank you:-) stylish trousersGood site. Thanks! fashion trousersGood site. Thanks!!! fashion trousersGood site. Thanks!!! fashionable pantsVery good site. Thanks:-) stylish pantsGood site. Thank you!!! stylish pantsGood site. Thank you!!! fashion pantsVery good site. Thank you. fashion breechesGood site. Thanks:-) corel activation codeVery good site. Thank you! corel draw full serial number and activation codeCool site. Thank you! indexVery good site. Thanks:-) indexVery good site. Thanks:-) indexCool site. Thank you!!! robots air travel finderVery good site. Thanks:-) robots airline flights cheduleCool site. Thank you! robots airline flights cheduleCool site. Thank you! robots airline flights trackingVery good site. Thanks. robots all nippon airwaysNice site. Thank you! robots austrian airlinesCool site. Thank you. robots business class airfaresGood site. Thanks. robots cheap air flights ticketNice site. Thanks. robots cheap air flights ticketNice site. Thanks. robots cheap airfares flights travelCool site. Thank you! robots cheap airfares flights travelCool site. Thank you! robots cheap airfaresCool site. Thanks! robots cheap airline flightsGood site. Thank you:-) robots cheap airline flightsGood site. Thank you:-) robots cheap airline ticketsVery good site. Thank you:-) robots cheap airline ticketsVery good site. Thank you:-) indexCool site. Thanks!!! indexCool site. Thanks!!! sedu prom hairstylesGood site. Thanks!!! sedu short hair styleGood site. Thanks. sedu short hair styleGood site. Thanks. sedu short hairstylesNice site. Thank you. indexVery good site. Thank you! indexVery good site. Thank you! saab 340 for saleVery good site. Thanks!!! saab 340 for saleVery good site. Thanks!!! saab 340 freighterGood site. Thanks:-) saab 340 freighterGood site. Thanks:-) tomtom key generatorVery good site. Thank you. tonya cooleyCool site. Thank you:-) tonya cooleyCool site. Thank you:-) tool vicariousNice site. Thank you:-) top 50 preteen art models linksCool site. Thanks:-) totally spies pornVery good site. Thanks. trashy lingerie modelsVery good site. Thank you!!! travis storkCool site. Thanks! trustfundgirls passwordVery good site. Thanks. ultimate showdown of ultimate destinyCool site. Thank you. ultimate showdown of ultimate destinyCool site. Thank you. underage lolitasVery good site. Thanks. voyuerGood site. Thanks! yahoo messenger invisible hackCool site. Thanks. yovoNice site. Thank you!!! yovoNice site. Thank you!!! map55030Cool site. Thanks. LastoShopGold - магазин электронных товаров с дважды интегрированной партнёрской программой.Nice site. Thank you. LastoShopGold - магазин электронных товаров с дважды интегрированной партнёрской программой.Nice site. Thank you. buy viagraCool site. Thank you!!! CarsCool site. Thanks! the auto companyVery good site. Thank you:-) the auto companyVery good site. Thank you:-) work on houseGood site. Thank you:-) work on houseGood site. Thank you:-) bank loanCool site. Thanks:-) bank loanCool site. Thanks:-) href=http://consolidate-loan-student.snovim.com/index.html>Index PageNice site. Thanks:-) erica duranceNice site. Thanks. erica duranceNice site. Thanks. femjoyNice site. Thanks!!! jcpennyVery good site. Thanks. sedu tourmaline hair straightenerNice site. Thank you. sedu tourmaline hair straightenerGood site. Thanks!!! solia flat ironCool site. Thank you!!! solia flat ironCool site. Thank you!!! wikepediaNice site. Thanks! wikepediaNice site. Thanks! wikepediaNice site. Thank you!!! free pornGood site. Thank you!!! DedwgMoroz
DedMorozva
NamibiNice site! mortgage loan TommyNice site! mortgage loan rhiannaVery good site. Thank you. dark magician girl hentaiGood site. Thank you. pioneerrrHi all! nonischemic heart diseaseVery good site. Thanks! kinkylesbo comCool site. Thank you!!! consolidation credit debt horrible loanNice site. Thank you:-) free pornVery good site. Thanks:-) fordCool site. Thank you. fordVery good site. Thanks:-) fordVery good site. Thanks:-) fordVery good site. Thanks! fordVery good site. Thanks! fordCool site. Thank you. fordNice site. Thanks!!! fordVery good site. Thanks!!! fordVery good site. Thank you:-) fordGood site. Thanks! fordGood site. Thanks! fordVery good site. Thank you! 1931 ford pickupCool site. Thank you:-) 150 f ford pickupNice site. Thanks:-) 150 f ford pickupNice site. Thanks:-) 1940 ford pickupGood site. Thanks:-) 1940 ford pickupGood site. Thanks:-) f350 ford pickupCool site. Thanks:-) f150 ford pickup truckVery good site. Thank you:-) f150 ford pickup truckVery good site. Thank you:-) ford part pickup truckCool site. Thank you!!! ford old pickupCool site. Thank you. ford pickup usedCool site. Thanks! Good site. Thanks. free pornCool site. Thanks:-) free pornCool site. Thanks:-) ford pickupVery good site. Thanks!!! free pornNice site. Thank you! free pornNice site. Thank you! free pornCool site. Thank you. free pornCool site. Thank you. free pornCool site. Thank you!!! free pornCool site. Thank you!!! free pornNice site. Thanks! free pornVery good site. Thanks:-) free pornVery good site. Thanks:-) free pornVery good site. Thanks:-) free pornGood site. Thanks!!! free pornCool site. Thank you:-) free pornVery good site. Thank you:-) free pornVery good site. Thank you:-) Koala Swimwear
kara minorNice site. Thanks!!! melissa favoritoGood site. Thank you!!! melissa favoritoGood site. Thank you!!! britney spears nudeNice site. Thank you. free pornCool site. Thank you:-) ford pickupNice site. Thanks:-) collector car auctionNice site. Thank you!!! pickle car auctionCool site. Thanks! police auction car vehicleNice site. Thank you. police auction car vehicleNice site. Thank you. www.bankofamerica.comVery good site. Thanks!!! ford pickupGood site. Thank you:-) job internetNice site. Thanks! free pornVery good site. Thank you!!! New car dealer with cheap newVery good site. Thank you. New car dealer with cheap newVery good site. Thank you. Mitsubishi MotorsGood site. Thanks! Mitsubishi MotorsGood site. Thanks! Health Insurance and MedicaCool site. Thanks. ford pickup truckGood site. Thanks!!! classic ford pickupNice site. Thanks. classic ford pickupNice site. Thanks. tomHi cool site friends! ford pickup saleCool site. Thank you! ford pickup saleCool site. Thank you! ford old pickupCool site. Thank you! ford model pickupCool site. Thanks:-) AnnHi! Nice site! My http://bestdiscountpharmacy.biz online pharmacy. Cheap drugs now! AnnHi! Nice site! My http://bestdiscountpharmacy.biz online pharmacy. Cheap drugs now! econoline ford pickupNice site. Thanks!!! econoline ford pickupNice site. Thanks!!! old ford pickupNice site. Thank you. bed ford pickupVery good site. Thanks:-) ford pickup partNice site. Thank you. perl tutorial c sprintfCool site. Thanks!!! bridget the midget nudeVery good site. Thank you:-) life insurance richardson texasNice site. Thank you:-) gran hotel ourense san martinNice site. Thanks:-) boardman ohio real estateNice site. Thanks!!! auto insurance rate new jerseyGood site. Thank you!!! puerto vallarta mexico the mayan resortNice site. Thank you!!! mailhandlers.comNice site. Thank you. mailhandlers.comNice site. Thank you. distributor lead mlmGood site. Thanks:-) gamesbyemailNice site. Thank you:-) buy tramadolCool site. Thank you! buy tramadolVery good site. Thank you!!! buy viagraCool site. Thanks:-) tramadol hclNice site. Thanks! myfreepaysiteNice site. Thanks:-) myfreepaysiteNice site. Thanks:-) buy viagraVery good site. Thank you!!! tramadol hclVery good site. Thanks!!! myfreepaysiteVery good site. Thank you. buy tramadolNice site. Thanks!!! buy tramadolNice site. Thanks!!! buy viagraCool site. Thank you. manpics 0d6f6xeVery good site. Thanks. porsche workshop manuals downloads 0d6f6xeGood site. Thank you:-) porsche workshop manuals downloads 0d6f6xeGood site. Thank you:-) buy viagra
buy viagra
gay free
gay free
indexCool site. Thanks:-) indexCool site. Thanks:-) mitsubishi carbide insertNice site. Thanks! ford-pickupVery good site. Thanks! ford-pickupVery good site. Thanks! ford-pickupNice site. Thanks! ford-pickupCool site. Thank you:-) ford-pickupGood site. Thank you:-) ford-pickupVery good site. Thank you. ford-pickupVery good site. Thank you. ford-pickupVery good site. Thanks! ford-pickupNice site. Thanks. ford-pickupNice site. Thanks. ford-pickupVery good site. Thank you:-) ford-pickupNice site. Thanks!!! BritneyHi all softVery good site. Thank you. 1970 dodge challengerGood site. Thanks. 1970 dodge challengerGood site. Thanks. ProI liked your site. Look my - Kaufen Propecia tramadolVery good site. Thank you!!! viagraCool site. Thanks:-) viagraCool site. Thanks:-) viagraGood site. Thank you. viagraGood site. Thank you. tramadol | ||||||||