A character asks that question in Hyperion, by another sci-fi author (Dan Simmons).
The answer he arrived at was that God was not testing Abraham. He was allowing Abraham to test God. When God stayed his hand at the last moment, he knew that he'd met a god worth following.
(I'm not religious myself, but I did find this to be an interesting-enough interpretation to parrot it back to you on a web forum)