Difference B/w Test Or Punishment
To my knowledge, we are all being tested now as there is no living prophet amongst us. In the past whole communities were punished as a group when a living prophet was rejected by the community directly after a long period of invitation by the prophet.