How does Malcolm test Macduff?
Malcolm tests Macduff by telling Macduff about all of the terrible vices that Malcolm claims to have. Malcolm says that he is more greedy than Macbeth, that he will take advantage of any woman near him, and that he has none of the graces that would be considered necessary for a "good" king.
Malcolm also wants to know whether Macduff has been sent by Macbeth, or whether Macduff is sincere in his desire to have Malcolm claim the throne from Macbeth. Despite all of Malcolm's vices, Macduff still insists that Malcolm return to Scotland, as the throne rightfully belongs to Malcolm. It does hurt Macduff to hear of Malcolm's vices, but he feels that though Scotland may suffer, the heir must be on the throne.
Macduff is ultimately very relieved to hear that Malcolm does not actually have all of these vices, and that Malcolm is willing to return to Scotland, claim the throne from Macbeth, and restore the country to its previous state of order.
Malcolm declares to Macduff that he is wicked because he has excessive lust and greed and in fact has no redeeming qualities to offset these faults. He is testing Macduff's loyalty to Scotland because he does not know Macduff well and is unsure of Macduff's motives for coming to England. Is Macduff there because he seeks some personal gain, or is he interested in the good of the country? By pretending to be more evil than Macbeth, Malcolm discovers that Macduff really is more concerned about the country than he is about anything else. Therefore, Malcolm decides he will return to England with an army to overthrown Macbeth, just as Macduff had hoped.
Malcolm's father, the late King Duncan, had a fatal flaw and that is he was too trusting -- and paid for it with his life and crown. Malcolm is not so trusting -- he pretends to be full of vice to Macduff when Macduff joins him and the English army to gather forces against Macbeth. Malcolm is testing Macduff's loyalty in a way that Duncan should have tested Macbeth's. Malcolm tells Macduff that he has been with many, many women, drank, gambled, lied, swore, and all that fun stuff -- all to gauge the effect his words have on Macduff. When Macduff turns away in sadness from these words, Malcolm has his answer -- Macduff is loyal and the one to recruit to dethrone Macbeth. Malcolm is much more canny than his unfortunate father.
In Act IV, Scene 3, Malcolm tests Macduff by telling him that he, Malcolm, would be a more terrible ruler than Macbeth. He says:
When I shall tread upon the tyrant's head,
Or wear it on my sword, yet my poor country
Shall have more vices than it had before,
More suffer and more sundry ways than ever,
By him that shall succeed...
It is myself I mean; in whom I know
All the particulars of vice so grafted
That, when they shall be open'd, black Macbeth
Will seem as pure as snow, and the poor state
Esteem him as a lamb, being compared
With my confineless harms.
He says these things (and more) to see Macduff's response. Macduff answers by always defending Malcolm and pointing out that Malcolm's "vices" are only those that "normal" people might have, rather than the true evil that motivates Macbeth's actions.