In the Star Wars: Episode I - The Phantom Menace.
Before the previous Expanded Universe became Legends, much was known about the Jedi Trials and how exactly they worked. In the time of the Republic, the trials were istered by the Jedi Council and involved five different tests: the Trial of Skill, Trial of Courage, Trial of Flesh, the Trial of the Spirit, and the Trial of Insight. Sometimes, the Council would substitute these for important and critical missions, where the Padawans would prove themselves on the field instead. After ing the test, Padawans would then attend their Knighting ceremony, where their braids would be cut, and they would officially become Jedi Knights.
Star Wars: Every Jedi Who Was Killed By Order 66 (In Canon)
Multiple trials sometimes could be accomplished at the same time if a Padawans demonstrated the five requirements. Padawans were expected to display advanced lightsaber techniques and incredible self-discipline. As a test of their courage, they would be sent out of the Temple to complete solo missions. The Trial of Flesh, meanwhile, required Padawans to experience and overcome physical pain and hardships, or even loss. The last two other tests were less physically-focused. The Trial of the Spirit tested a Padawan against their self-doubts and fears, similar when Master Yoda trained Luke and then told him to enter the cave in Dagobah in The Empire Strikes Back.
Finally, the Trial of Insight ensured that Padawans were ready to face the real world, distinguish truth from lies, and could solve challenging puzzles, demonstrating great insight and intelligence. In times of strife and conflict, the normal Jedi Trials could be byed if the Padawan showed incredible skill, courage, or dedication to the Jedi Order. This was the case for Luke Skywalker, who earned his title without going through the Jedi trials in the Legends universe.
There have been two major examples of Padawans facing trials in the current Star Wars canon: Ahsoka Tano in Star Wars: The Clone Wars and Ezra in Ahsoka refused to be knighted and left the Order. Meanwhile, Ezra was taken to a Jedi temple on the planet of Lothal to test if he could become a Jedi. Inside, he was shown visions and forced to confront his fears and insecurities. As a result of ing, Ezra received a kyber crystal and built his own lightsaber.