Walter Brueggemann notes in his work on Genesis states on Genesis 22:12:
It is not a game with God. God genuinely does not know. And that is settled in verse 12, “Now I know.” There is real development in the plot. The flow of the narrative accomplishes something in the awareness of God. He did not know. Now he knows. The narrative will not be understood if it is taken as a flat event of “testing.” It can only be understood if it is seen to be a genuine movement in the history between Yahweh and Abraham.