Posts

Showing posts with the label software testing

What are unit tests?

here's a great, but kinda technical definition StandardDefinitionOfUnitTest but, here's a more general example and an attempt to illustrate "why code is so crappy" and some of the difficulties in translating requirements and designs into "high quality" software. Let's say we have a screen to enter credit card information. Let's further suppose that one of the requirements is to "Validate the credit card information". Let's then say that "Validate the credit card information" means specifically: card types The software written to perform this validation will have a number of "code" units that likely would translate into functions. One of these functions would likely be "validate length of card number". Note: right now we're saying that "function"=="code unit" to simplify things. Let's walk through what we might do to validate JUST Visa and Mastercard length. We'll write ...