...
Should I care about testing
Now if If you're reading this then I'm assuming you have an interest in unit testing and delivering quality systems. Why have I used the term system and not software? It's because the principle of TDD can be applied to the development of software and infrastructure. But can we apply it to the concepts of design and architecture? That's a little more complex as these artifacts are logical constructs that cannot be executed. Your architecture and designs are made manifest through your software and hardware.
So what about unit tests or to be more accurate applying TDD at different levels within the software. A unit test is a test applied to a unit of code (function, class or object). Applying TDD at a unit level is not the same as applying at a system level. Examples of unit testing tools are JUnit, NUnit, JTiger, TestNG, and Mockito etc. Examples of what I'm calling system level testing tools are fitnesse, Cucumber and Gherkin, Selenium and SpecFlow etc.
So what's the difference between unit testing and system level testing? Consider the following example - you've been tasked with providing the infrastructure for a high speed transportation system (a train).
Current state of tracks
- The current tracks allow for rolling stock to travel at up to 160mph
- The maximum rolling stack length is 12 x 23.9m
- The maximum tonnage of the tracks predefined by the rail standards authority
- The tracks, clips and bolts are of a specific tensile strength
- The switching circuitry operates at the specific capacity