An iodine test uses the reaction between starch and iodine to check for the completion of the starch converted in the mash. It is not required to perform such a test, but it is seen as good practice as it would alert the brewer of problems during the mashing process. Reasons for a mash to fail to convert could be improper temperature (faulty thermometer), completely inadequate mash pH or insufficient diastatic power of the malts (large amounts of adjuncts, decoction mashing).
When mixing starch or large chained dextrines and iodine a color reaction will appear. The darker and more intense the color is, the longer the chains and/or higher the concentration of starch is. [Noonan, 1996]:
"Blue-black indicates the presence of native starch (amylose); deep mahagony/red-brown evidences gelatinized starch (amylose fragments and large a-limit dextrins), faint red simple a-limit dextrins. A faint mahagony to violet-reddish reaction denotes a mix of small dextrines. Total mash saccrification (a solution of some small a-limit dextrins with maltotriose, maltose and simple sugars) causes no change in the yellow color of iodine"
 How to perform an iodine test
Let the liquid drip onto the saucer, being careful not to include any solid material such as grain husks, which could give a false positive reading. Then add a drop or two of iodine. If there is still unconverted starch in the mash, the wort will quickly turn dark blue or black.
Iodine is a poison: regardless of the color, do not return the sample to the mash tun.
- [Noonan, 1996] Gregory J. Noonan, New Brewing Lager Beer. Brewers Publications, USA, 1996