The Chofetz Chaim al Torah says, Chazal teach in bereishis rabbah, "Hashem does not elevate a person to greatness until He first tests him."
Where in bereishis rabbah do chazal say this?
This isn't saying exactly what you've quoted, but it comes very close:
ניסיון אחר ניסיון וגידולין אחר גידולין בשביל לנסותן בעולם, בשביל לגדלן בעולם
The midrash (Beraishis Rabba 55:1) is playing on the word נסה, which means test, but sounds like נס, which means to 'raise up'. Thus, the midrash states that Avraham was being tested in order to be raised up. The implication is that tests are necessary for rising in greatness (for otherwise why would Hashem put His beloved servant through such an ordeal)
It's actually in Shemos Rabbah 2:3