This article explains why an iodine test (starch test) should be performed, how it works and how it is best done.
The color reaction between iodine and glucose chains (dextrins and starch) is used to detect their presence in wort. Aside from producing a wort of desired fermentability it is the goal of mashing to reduce the maximum length of dextrins in the sweet wort to less than 9 glucose molecules for unbranched and less than 60 for branches chains. At this point they don't show a reaction with iodine anymore and the wort or mash is said to be iodine negative . If that is not done and these long glucose chains are carried over into the beer, the beer may develop a so called "starch haze". Despite its name in most cases this haze is not caused by starch but by long dextrines which become less soluble and precipitate in the presence of alcohol. Those dextrines give a red to purple color reaction with iodine 
How does it work?
When glucose chains are sufficiently long they coil up like springs. This coil is supported by weak links between the glucose molecules. These links break down at high temperatures and the glucose chains uncoil, which is why the iodine test only works with cold wort and mash samples.
When the chains are longer than about 9 glucose molecules a triiodide ion (I3-) fits inside the coil (Figure 1). The resulting iodine-dextrin molecule absorbs light, which is the cause of the typical color reaction between iodine and starch. The longer the glucose chains are the more iodine molecules fit into the coils and the more intense the color reaction will be.
The resulting color depends on the length of the glucose chains. Shorter chains (starting at about 9 glucose molecules in unbranched chains and up to 60 glucose molecules in branches chains) give a red color . These dextrines are also called erythrodextrines.  Amylose, which consists of very long glucose chains between occasional branch points and very large dextrines give a dark blue color while amylopectin, which has much more branch points and shorter glucose chains between these branch points, gives a more reddish color in the presence of iodine.
Iodine by itself is very poorly soluble in water. One way to dissolve iodine in water is to add potassium or sodium iodine. Those salts dissolve into potassium or sodium ions and iodine ions. The iodine ion (I-) reacts with the free iodine (I2) to form a triiodide ion (I3-) which is soluble in water and can react with glucose chains.
A solution of iodine and potassium iodine is also called Lugol's iodine and was one of the first uses of iodine as a disinfectant.
Further improvements have lead to the use of other solubilizing agents, which lead to the iodine products that we use today for sanitization and disinfecting purposes (see povidone-iodine, Wikipedia). All those products enable the presence of free iodine in solution and are therefore suitable for an iodine test.
For iodine test purposes in brewing the concentrated iodine solutions are best diluted with ethanol. This is mainly done for keeping the color of the test solution to a light yellow that allows for a better observation of the color reaction. Ethanol works better for diluting iodine than water due to the better solubility of iodine in alcohol.
A simple starch test solution can be made from 1 part Iodophor and 9 parts rubbing alcohol. Those are both ingredients that brewers tend to have at hand. If you don't use Iodophor in your brewing and have none at hand, you may also buy Lugol's iodine and make a starch test solution from 1 part Lugol's iodine and 9 parts rubbing alcohol. Lugol's iodine can be found in many health stores on-line. While iodine's use in Methamphetamine production  has caused iodine sales to be restricted, small amounts can still be bought without any problems . When looking for iodine products at the grocery store or pharmacy make sure not to get a substitute which doesn't actually contain iodine.
A starch test solution made from Lugol's iodine tends to give a clearer reaction with starch than one prepared from Iodophor. This might be because the iodine in Iodophor is released slower compared to the iodine in Lugol's iodine, but both solutions are still equally well suited for starch testing in brewing.
The iodine test solution is best kept in a small eye-dropper bottle clearly labeled "starch test", obviously.
Perfoming an iodine test
So much about the science. In brewing an iodine test is best done on a piece of white chalk or drywall. In my own brewing I use a piece of white sidewalk chalk that I took from the kid's bucket of chalks. There are two main benefits of this practice when compared to iodine testing on a white plate for example. For one thing it takes only a drop of wort and thus eliminates husk or grit pieces. The other reason is that this method lets you see iodine test solution that is affected and iodine test solution that is not affected by the wort sample which removes the uncertainty about where the reddish color came from.
If chalk is not available paper or filter paper may also work as long as it does not contain starch. Some paper contains starch and adding a drop of iodine test solution will reveal that.
To renew the testing surface of the chalk simply cut off a thin layer using a knife or grind off the old samples on a rough wall or pavement.
Alternative starch test methods
Most brewers have been taught to do a starch test on a white dish. The problem with this method is that the mash sample taken may contain husk and grit pieces which can react with iodine and lead to a false reading.
To perform the test, take a sample of wort without husks or pieces of endosperm and place it on a white dish. Then add the starch test solution and observe the color reaction.
Iodine test examples