Morality test
A morality test was a psychological experiment in which the subject(s)'s reactions were gauged in a scenario where they had to choose between their moral convictions and the well-being of themselves and their companions. The purpose of such experiments was to see if these individuals or their species as a whole merited further cooperation and contact, or in some cases, to see if they were worthy of life by the standards of the race performing the test.
The Organians devised a morality test on lesser species to determine their readiness for contact. (ENT: "Observer Effect")
In 2268, the Vians tested the compassion of the empath Gem by torturing James T. Kirk and Leonard McCoy and seeing if she would use her empathic powers to heal them. This was done in an effort to determine if her species deserved to be rescued from impending doom. She did so and passed their test on behalf of her people. (TOS: "The Empath")
Vendorians loved engaging others in morality tests, according to Lieutenant Steve Levy's conspiracy theories. (LD: "Caves")
In 2381, Levy and Lieutenant junior grade Brad Boimler participated in one such test. While stuck in a cave on Kyron 4, the two discovered a ground vehicle waiting for them. Boimler had noticed that the vehicle only had one seat, suggesting that the nature of the test was to see who would be willing to go out alone into the storm to seek help, leaving the other behind. However, Levy's paranoia led him to destroy the vehicle with his phaser instead. This caused Boimler to snap and yell at Levy in anger and frustration, causing them to initially fail the test. After Levy's continued theories proved to be true, Boimler learned to not yell at him despite his dangerous thoughts, enabling them to ultimately pass the test.
Later that same year, Boimler, along with Beckett Mariner, Sam Rutherford, and D'Vana Tendi were trapped in a cave on Grottonus due to a cave-in. Harassed by a carnivorous moss, the two regaled their fellow crewmates with tales of being trapped in caves, including the previous incident, while trying to figure out how to escape. Each story upset the group, as they ended up working with people they usually wouldn't get along with. The moss revealed itself to be sentient and asked to hear Tendi's story, which she had kept trying to tell, despite being ignored. Tendi's story, about the four being stuck in a turbolift following the rage virus incident, ended up rekindling their friendship and moved the moss to allow the officers to scan it all they wanted and tell more stories, thereby passing another test (unbeknownst to them). (LD: "Caves")