“G-d did prove [test] Abraham, and said unto him: ‘Abraham’; and he said: ‘Here am I’ [Hineni]. And he said, ‘Take now thy son, thine only son, whom thou lovest, even Isaac, and get thee [lech lecha] into the land of Moriah; and offer him there for a burnt-offering upon one of the mountains which I will tell thee of.’”
– Genesis 22:1-2, JPS 1917 Tanach
As for Abraham’s response, when he was called by H’Shem, “Hineni,” commentary reads, “Such is the answer of the pious: it is an expression of meekness and readiness (Midrash Tanchuma, Vayera 22; sefaria.org). With one word, Abraham demonstrated his commitment to G-d as his servant; so, that in a state of preparedness to obey whatever commanded of him, when told to bring his son, Isaac up as an offering, he did not flinch.
The question may be asked, that if G-d is omniscient (all-knowing), why did he need to test Abraham’s faithfulness towards Him? Nachmanides’ comment, seems to answer this question, that Abraham showed he was willing to “bring forth the matter from the potential into actuality so that he may be rewarded for a good deed, not for a good thought alone” (Nachmanides on Genesis 22:1, sefaria.org).
This is the nature of our lives, that G-d would test the quality of our every breath, were it possible, to see if we are willing to serve Him with our all – that is every ounce and fiber of our being. Yet, the tests that are designed for us, the challenges that are tailor made for each individual, are done so in order to create an opportunity for our strengths to be expressed in actuality, thereby demonstrating the veracity of our positive character traits. Additionally, “G-d trieth the righteous” (Psalms 11:5), in order to increase a sense of righteousness within an individual, so that moral rectitude will permeate his being (Bereishis Rabbah 34).