The Green Knight tests Gawain in many ways. The first, and most obvious, is the simple challenge he presents of the blow-for-blow exchange with Gawain. When Gawain beheads the Green Knight, he must then present himself for a similar fate the next year. Gawain succeeds in this test by appearing at the designated time and place and submitting willingly to the Green Knight's blow, demonstrating his courage and honor.
The second way that the Green Knight tests Gawain is by taking the form of a lord and giving Gawain shelter in his castle for three nights. While Gawain is at the castle, the Green Knight sends his wife to seduce him. She comes to his bedchamber and offers herself to him. However, he refuses her, only allowing a kiss between them. Here again, he passes the Green Knight's test and demonstrates his loyalty and fealty to his host.
The third part of the test is the bargain the lord strikes up with Gawain during his stay. The lord will go out hunting while Gawain stays in the castle, and at the end of each day, they will exchange their daily earnings. Each day, when the lord's wife kisses Gawain, he kisses the lord as well, repaying what he has earned and showing his honesty. However, on the last day, the lord's wife also gives him a green girdle, which she says will prevent anyone who wears it from being killed. Fearing for his life in his upcoming encounter with the Green Knight, Gawain takes it and does not return it to the lord as part of his earnings. This selfishness is the only way in which he fails the Green Knight's test, and it earns him a nick on his neck in his final meeting with the Green Knight.