Estimated total yield of tests up to 1980: 510 megatons (418 atmospheric) [2]
It's hard to find good numbers on the total yield of all nuclear tests to date, but the ballpark figure is 10% of current stockpiles. This is actually somewhat comforting. We've all heard scary stories saying that we have enough nuclear weapons to destroy the world dozens of times over, but the truth is we've detonated 10% of the total current stockpile in the course of weapon testing with barely any noticeable impact. Yes, it will indeed suck much worse if nuclear bombs ever target populated areas, but the planet will likely recover and live on.
[1] http://www.nuclearfiles.org/menu/key-issues/nuclear-weapons/...
[2]http://www.nuclearfiles.org/menu/key-issues/nuclear-weapons/...