In organic chemistry, the bromine test is a qualitative test for the presence of unsaturation (carbon-to-carbon double or triple bonds), phenols and anilines.
An unknown sample is treated with a small amount of elemental bromine in an organic solvent, being 
as dichloromethane or carbon tetrachloride. Presence of unsaturation and/or phenol or aniline in the sample is shown by disappearance of the deep brown coloration of bromine when it has reacted with the unknown sample. The formation of a brominated phenol (i.e. 2,4,6-tribromophenol) or aniline (i.e. 2,4,6-tribromoaniline)  in form of a white precipitate indicates that the unknown was a phenol or aniline. The more unsaturated an unknown is, the more bromine it reacts with, and the less coloured the solution will appear.
Should the brown colour not disappear, possibly due to the presence of an alkene which doesn't react, or reacts very slowly with, bromine, the potassium permanganate test should be performed, in order to determine the presence or absence of the alkene. The iodine value is a way to determine the presence of unsaturation quantitatively.
The bromine test is a simple qualitative test. Modern spectroscopic methods (e.g. NMR and infrared spectroscopy) are better at determining the structural features and identity of unknown compounds.