Why did the nuclear powers so consistently test their nuclear weapons?
Aside from demonstrating the threat, was there any practical purpose to it, especially on the part of the Soviets and the United States?
Nuclear technology is not static, that is to say, as nuclear weapons became more sophisticated and powerful over time, the tests became necessary to gauge their function and make necessary adjustments and improvements in design. As was especially true during the Cold War arms race, increasing the yield of each weapon seemed a goal (almost to the point of absurdity), and the only way to truly measure the explosive yield of a nuclear weapon, and under varying conditions and environments, is to detonate one. The Nevada Nuclear Testing Ground was the preferred site of American tests, while the Soviets often exploded theirs at the Semipalatinsk Site and in the Ukraine and Kazakhstan.
As you pointed out, there was a geopolitical strategy involved in regular arms testing, to prove to an enemy that your nuclear arsenal was being maintained and further development. In part,this was an effective deterrant to nuclear attack, but it was also simply an expression of nationalism. On another less tangible level, I suppose you could argue that in a time where fear of nuclear attack was widespread among the population, regular testing reassured the people that the country was prepared for any attack.