I just read a post by Uncle Bob on Stack Overflow and wanted to remember a section on the arrangement of tests. So I posted it here.
Tests should be arranged as follows:
Unit tests provide close to 100% code coverage. They test independent units. They are written by programmers using the programming language of the system.
Component tests cover ~50% of the system. They are written by business analysts and QA. They are written in a language like FitNesse, Selenium, Cucumber, etc. They test whole components, not individual units. They test primarily happy path cases and some highly visible unhappy path cases.
Integration tests cover ~20% of the system. They tests small assemblies of components as opposed to the whole system. Also written in FitNesse/Selenium/Cucumber etc. Written by architects.
System tests cover ~10% of the system. They test the whole system integrated together. Again they are written in FitNesse/Selenium/Cucumber etc. Written by architects.
Exploratory manual tests. (See James Bach) These tests are manual but not scripted. They employ human ingenuity and creativity.
I have been working in the I.T. industry since 1997, although my interest in programming computers can be traced back to Commodore PET BASIC. I've decided to start blogging about my software development experiences again after a break of a couple of years. So, Read On MacDuff (to misquote a popular misquote).