There are 8 nations now confirmed to have carried out nuclear testing, these are: the U.S., USSR, U.K., France, China, India, Pakistan, and North Korea.
Some other nations are suspected of carrying out their own tests, but there's no definitive evidence for this; this list includes:
*Israel - had/have a nuclear program with no evidence of testing other than two unverified reports from 1963 & 1966 respectively; worked on France's test program for a time before being removed; also suspected of working with South Africa on a nuclear test in 1979 (the Vela Incident)
*South Africa - had a now long-abandoned nuclear program with no evidence of testing; suspected of working with Israel on the 1979 'Vela Incident'>>8012475
It's unclear, SA did have a nuclear programme that wasn't very technically far advanced when they eventually abandoned it, but they've never admitted to carrying out any nuclear tests.
There's a suspicion that SA worked with Israel on a nuclear test in 1979 (Vela Incident), though the event was never definitively confirmed as a nuclear test despite the double flash of light that was witnessed by satellite which is usually considered a good indicator of a nuclear explosion.
Aside from SA/Israel, other nations were also individually suspected of being responsible for the event though, including the USSR, France, India, and Pakistan, though to this day no nation has taken responsibility for the event.