They are visually inspected for dents or damage to the bottle itself, to the fibre wrapping or to the threads that hold the valve in, and they are hydro tested. This involves immersing the tank in water, filling it to its test pressure (something like 30% than the normal fill pressure) and measuring how much the tank expands when it is filled and emptied again, by measuring how much water is displaced (yes, tanks do expand under pressure in normal use. Scary, eh?) If it's more than a certain amount, the tank fails. No tank should ever actually rupture under test pressure unless it is severely damaged already (which the visual inspection should have spotted.)