An unknown solution can be identified by combining the tests for positive and negative ions. Each test is done on a separate small sample of the solution, because a compound contains both a metal ion and a non-metal ion and each must be found.
First, sodium hydroxide gives the metal ion. A blue precipitate shows copper, a green one iron(II), an orange-brown one iron(III) and a white one calcium or zinc. If the white precipitate dissolves in excess sodium hydroxide it is zinc. A flame test can back up calcium, because calcium gives an orange-red flame.
Next, the negative ion is found. Dilute acid tests for carbonate. Acidified silver nitrate tests for chloride, bromide and iodide. Acidified barium chloride tests for sulfate. The silver nitrate and barium chloride are acidified so that carbonate ions cannot give a false white precipitate.
The two results are then put together. A solution that gives a blue precipitate with sodium hydroxide and a white precipitate with acidified barium chloride contains copper ions and sulfate ions, so it is copper(II) sulfate.