He should have said no to G-d when asked to kill his son, and he lost communication with G-d and other members after the whole fiasco.
The Ben L'Ashri, the Tzadik of Raanana (Rabbi Yitzchak Huberman HaKohen) cites the Avodas Yisroel of Koshnitz (end of parshas Vayeira) and explains:
וממעט השגת האדם אשר היה לו מקדם כי לולי האדם יהיה ברור וצלול בשעת הנסיון כמקדם לא היה הנסיון נחשב לכלום ובוודאי אין תימ' מי שיודע שעומד לפני מלך גדול ונורא שלא ימרוד בו והוא. רואהו אמנם ענין הנסיון שמסתלק בהירות האדם והרי הוא בא לידי נסיון וכובש יצרו באמנותו ומתחזק לשוב לבוראו אז הוא נקרא עומד בנסיון. ולפי"ז מסתמא כאשר האלהים נסה את אברהם בדבר העקיד' אחר שאמר לו קח נא את בנך מסתמא נסתלק ממנו בהירתו ודביקותו לנסות אותו אם יעמוד בצדקתו כנ"ל. ואפשר שזה כוונת הפסוק וירא את המקו' מרחוק כי הקב"ה נקרא מקום שהוא מקומו של עולם. נרא' לו כאילו הוא מרחוק ולא יכול אברהם אבינו ע"ה להשיג דרך דביקותו כמו בשאר
It seems to me that during a time of trial, when Hashem tests a person
with something, it is likely that, at that moment, Hashem conceals His
holiness and diminishes the person’s perception of Him compared to
what he had before. For if a person were as clear and lucid during the
trial as he was beforehand, the trial would not be considered
significant. Certainly, it would not be surprising if someone who
knows he is standing before a great and awesome King would not rebel
against Him when he sees Him. However, the essence of a trial is that
a person’s clarity is withdrawn, and he faces the test without that
lucidity. When he conquers his inclinations through his faith and
strengthens himself to return to his Creator, only then is he
considered to have stood firm in the trial.
Based on this, it seems likely that when Hashem tested Avraham with
the matter of the Akeidah, after telling him, ‘Take now your son,’ the
clarity and connection that Avraham previously experienced must have
been withdrawn in order to test whether he would still stand in his
righteousness, as explained above.
It is possible that this is the meaning of the verse, ‘He saw the
place from afar.’ Since Hashem is referred to as Makom (the Place, the
One who is the foundation of the world), it appeared to Avraham as if
Hashem was distant, and he could no longer achieve the same level of
connection as in other times.
Based on this, the Ben L'Ashri explains that when Avraham said "hineni" - Here I am - he was saying to G-d that he would still stand strong in the face of a great trial. The Ben L'Ashri says that when Avraham said that he was "here", he was "agreeing", and "the test could proceed". Or in the words of the Shelah HaKodesh (Shenei Luchos HaBris, Torah Shebichsav, Sefer Vayikra, Torah Ohr, Vayikra 22): "Abraham had to personally prepare himself spiritually in order to receive a communication from G–d". Concludes the Ben L'Ashri:
This is the meaning of "And G-d tested Avraham." How could He test him? When Avraham was at such a high spiritual level, completely cleaving to G-d’s will, there would be no challenge in following G-d’s command. Therefore, G-d asked him, "Avraham, are you willing to relinquish your spiritual levels so that I will no longer call you 'Avraham, Avraham,' but only 'Avraham,' as with an ordinary man?" To this, Avraham responded, "Here I am," signifying his agreement. This allowed the test to proceed, and G-d then said, "Take, please, your son…" Understand this well.
The chiddush of the Ben L'Ashri is that Avraham Avinu always followed G-d. If G-d said "a", Avraham would do "a". However, G-d was testing Avraham in order to know whether he would follow Him always, even when Avraham would feel some distance to G-d. This was the ultimate test, by which G-d ultimately knew that Avraham was going to follow Him in all ways, even during times in which G-d would seem more distant from a person. That "distance" is sometimes necessary in order for a person to "shteig" more so to speak.
So no, Avraham did not fail the test. He passed it with flying colours.