Odysseus tests Penelope by assuming a disguise when he returns to Ithaca. Athena uses her power to give Odysseus the disguise. He appears to be an old beggar, and this disguise works perfectly. Penelope does not recognize him, and neither do the suitors who are living in the palace.
This test allows Odysseus to see who was loyal to him while he was gone. Back in book 11, Odysseus was warned by Agamemnon that he should be wary of his wife. Agamemnon told Odysseus the story of how his wife was disloyal when he returned from Troy. Odysseus even spends a night sleeping on the floor in Penelope's bedroom while disguised to ensure that she has been loyal while he was gone.
In book 23, Penelope tests Odysseus. When Odysseus was a young man, he built a special marriage bed around an olive tree in Ithaca. This bed is a piece of symbolism throughout the story that represents loyalty. Penelope asks Eurycleia to move this sacred bed towards the end of the story. This symbolizes a shift in loyalty, and Odysseus reacts with rage. Odysseus gets very angry to see Eurycleia moving the sacred bed. This reaction satisfies Penelope, and Odysseus passes the test.