Testing on the Toilet

August 7, 2008

A Matter of Black and White The progressive developer knows that in this complex modern world, things aren't always black-and-white, even in testing. Sometimes we know the software won't return the best answer, or even a correct answer, for all input. You may be tempted to write only test cases that your software can pass. After all, we can't have automated tests that fail in even one instance. But, this would miss an opportunity. Speaking of black-and-white, take decoding of two-dimensional barcodes, like QR Codes. From a blurry, skewed, rotated image of a barcode, software has to pick it out, transform it, and decode it:

http ://g oogl e.co m/gw t/n? u=bl ueni le.c om

Even the best software can't always find that barcode. What should tests for such software do? We have some answers, from experience testing such software. We have two groups of black-box tests that verify that images decode correctly: must-have and nice-to-have. Tests verify that the must-have set – the easy images – definitely decode correctly. This is what traditional tests would include, which typically demand a 100% pass rate. But we also see how well we do on the more difficult nice-to-have set. We might verify that 50% of them decode, and fail otherwise. The advantage? We can include tougher test cases in unit tests, instead of avoiding them. We can observe small changes – improvements as well as degradations – in decode accuracy over time. It doubles as a crude quality evaluation framework. Where can this progressive thinking be applied? Maybe when your code... Only needs to be correct in most cases. As here, write tests to verify easy cases work, but also that some hard cases pass too. Needs to be fast. You write unit tests that verify it runs "fast enough" on simple input. How about writing tests that make sure it runs "fast enough" on most of some larger inputs too? Is heuristic. You write unit tests that verify that the answer is “really close” to optimal on simple input, but also that it's “kind of close” on difficult input. By the way, did we mention project ZXing, Google's open-source decoder project? Or that Print Ads is already helping clients place these two-dimensional barcodes in the New York Times? Or that there are other formats like Data Matrix? or that you can put more than just a URL in these barcodes? This is a technology going global, so, time to read up on it.

More information, discussion, and archives: http://googletesting.blogspot.com Copyright © 2007 Google, Inc. Licensed under a Creative Commons Attribution–ShareAlike 2.5 License (http://creativecommons.org/licenses/by-sa/2.5/).

A Matter of Black and White Code

Aug 7, 2008 - changes – improvements as well as degradations – in decode accuracy over time. It doubles as a crude quality evaluation framework.

170KB Sizes 0 Downloads 287 Views

Recommend Documents

A Matter of Black and White Code
Aug 7, 2008 - A Matter of Black and White. The progressive developer knows that in this complex modern world, things aren't always black-and-white, even in testing. Sometimes we know the software won't return the best answer, or even a correct answer

periodic table of elements pdf black and white
periodic table of elements pdf black and white. periodic table of elements pdf black and white. Open. Extract. Open with. Sign In. Main menu. Displaying periodic ...

White matter microstructures underlying mathematical abilities in ...
using ROQS [15], an analysis package developed by the. second two authors ROQS segments white matter structures. on the basis of a user-defined seed voxel ...

White matter microstructures underlying mathematical abilities in ...
Page 1 of 5. White matter microstructures underlying. mathematical abilities in children. Lucia van Eimerena. , Sumit N. Niogib. , Bruce D. McCandlissb. , Ian D. Hollowaya and Daniel Ansaria. a. Numerical Cognition Laboratory, Department of Psycholog

Sparse Bayesian Inference of White Matter Fiber Orientations from ...
taxonomy and comparison. NeuroImage 59 (2012) ... in diffusion mri acquisition and processing in the human connectome project. Neu- roimage 80 (2013) ...

Herding and Contrarianism: A Matter of Preference?
Jul 27, 2017 - for loss aversion provides a better fit to the experimental data, but also that CPT fits the data better than expected utility ...... index data from the Center for Research in Security Prices (CRSP) for the period 1926 to ..... inside

White black .com
and the profit formlook good Yes, I haveachieved this. To makesurethefinancialsystemeasy to understand Yes, this isalso achieved. Stevieray vaughan pdf.BerenstainBears - Season 1.Angel girl h game.98360225568. Dirty pretty things.2002.Newsroom2012 s0

Sparse Bayesian Inference of White Matter Fiber Orientations from ...
proposed dictionary representation and sparsity priors consider the de- pendence between fiber orientations and the spatial redundancy in data representation. Our method exploits the sparsity of fiber orientations, therefore facilitating inference fr

Black Lives Matter Essays.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

Clarifying Black Lives Matter movement in words of its founders.pdf ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Clarifying Black ...