Hashem tested Avraham in order to evaluate the extent of his faith. Before the trial, Hashem did not know whether or not Avraham would be willing to sacrifice his son for God.
Meaning of "נסיון" – Ralbag understand the word to mean "test", a procedure established for purposes of evaluation. Hashem was testing Avraham so as to discern his level of fear and obedience.
Hashem's knowledge – According to Ralbag, Hashem's knowledge is not complete. While He knows all the choices open to man He does not know which man will choose to do. As such, He did not know in advance whether or not Avraham would acquiesce to sacrifice his child upon Hashem's demand.1
עַתָּה יָדַעְתִּי כִּי יְרֵא אֱלֹהִים אַתָּה – Ralbag is able to explain this verse according to its simple sense; only "now" after the fact" did Hashem know how God-fearing Avraham was.
The test – Ralbag asserts that Hashem
How can Hashem command murder?
Avraham's feelings
Can Hashem change His mind?
For Avraham
Avraham, rather than Hashem, was supposed to learn something new from the experience. This position subdivides regarding whether it views the test as beneficial or punitive in nature:
Means to Reward Avraham
Acting on Hashem's directives brought Avraham to new levels of faith, and merited him rewards that he would never have received had Hashem not tested him.
The trial was intended for outsiders so that they appreciate Hashem's choice of Avraham, and understand what is the correct and desired service of Hashem.