God tested Abraham by telling him to sacrafice his son Issac. Since God is omniscient (knows all, knows the end from the beginning) He already knew Abraham would go through with it unless God stopped him. What was the purpose of this test?
MusicmanCA came the closest to what I beleive is the answer to this quandry. The test wasn't to prove something to God, but rather to prove to Abraham the depth of his faith. To an extent it was for Issac as well. Issac knew what was going to happen and was obedient. This was an act of faith from both Abraham and Issac. Thus James is proven right, Faith, without works doesn't have power. The works that accompany faith are not to prove anything to God, but rather, to us. It also foreshadowed that God DID infact sacrafice HIS Son for us. Jesus is the ultimate in the action of faith. Obedient to the cross because of His faith.
There is more of heaven and earth than is dreamt of in your philosphy, Horatio.
Dickens: A Tale of Two Cities