A test of character was a situation that would reveal a person's true moral qualities and values.
In 2365, while speaking to Deanna Troi and setting an example, William T. Riker told her that facing death was the ultimate test of character. (TNG: "Shades of Gray")