I know that there are discussions about how the war in Japan would have ended if the US hadn't dropped the nukes on them, I've heard that it would save a lot of lives, and also that it would end a lot of lives, so I don't really feel like I know enough to weigh in on that discussion :/
But it is reasonable to assume that less starvation from a slightly earlier end of the war compensated for the higher lethality of nuclear bombs.
A potential land invasion (with lots of death Americans) is also often cited to "justify" the nukes, but I'd be careful with that argument because it is unclear that it would've been necessary (in a no-nuke timeline). The US post-war strategic bombing survey said on this: "it is the Survey's opinion that certainly prior to 31 December 1945, and in all probability prior to 1 November 1945, Japan would have surrendered even if the atomic bombs had not been dropped, even if Russia had not entered the war, and even if no invasion had been planned or contemplated."
Nuclear power also arguably saved lots of lives by avoiding fossil emissions/air pollution (probably significantly more than were killed in Hiroshima, Nagasaki and all nuclear accidents combined; https://www.giss.nasa.gov/pubs/abs/kh05000e.html estimates ~2M).
Personally, I'll gladly take a small risk of global nuclear war over a larger risk increase for a conventional WW3, but this might be a matter of taste...
Nuclear power doesn't rely on nuclear weapons. Sure, the chicago pile came out of the manhattan project, but nazi germany had already been experimenting with nuclear power, and Fermi had split the atom too. He didnt necessarily recognise what he had done correctly, but work into nuclear research was going on at the time, and I think nuclear power would have been invented without nuclear weapons
[0]: Truman didn’t order Hiroshima, and didn’t even know about Nagasaki. He did stop them after that.
The Emperor only changed its mind after the first atomic bomb drop on Hiroshima. The Big Six did not accept the American terns (Big Six wanted no invasion, wanted Japan to try its own war criminals, and wanted the Emperor to lead the country and answer to no-one). The Emperor gad to tell the council of Big Six that he already made up his mind to accept unconditional surrender and that he was going to tell Japan the very next day. Some military officers stormed the place trying to steal the radio recording of the Emperor. Army Minister Anami committed suicide because he could not bear to hear the radio address [2]
Japan military was geared to fight to the end on the main islands and dropping the atomic bombs was necessary to stop them. Dropping the bombs saved American lives, and maybe even some Japanese ones.
[0] https://en.wikipedia.org/wiki/Bombing_of_Tokyo#Operation_Mee...
[1] https://www.history.navy.mil/about-us/leadership/director/di...
But it should be clear that, while Truman delegated authority for picking up targets and dropping the bomb to military and State department, Truman along with the rest of his administration Sec of State Byrnes, Sec of War Stimson, Chief of Staff Gen. Marshall already decided the atomic bomb will be dropped on Japan. When Sec of State Byrnes explicitly warned the Japanese about "prompt and utter destruction" he meant exactly that. [0]
Dropping the bomb was done with Truman's approval.
My first guess would be that the scientists involved would look for creative ways to test while minimizing that risk. test underground or under water (if that would make a difference), test in space (when possible), test smaller yields, etc.
Humans go to extreme lengths to create world ending weapons, and we still do it despite this danger. Even if the danger is slightly less acute, we're developing biological weapons and dangerous pathogens that if release accidentally would still have a realistic chance to wipe out humanity.