When Rabbi Zeira came from Babylonia to Eretz Yisrael, he fasted one hundred fasts so that Rabbi Elazar, son of Rabbi Shimon, would not die during his lifetime, which would have caused the burden of communal matters to fall upon him. He fasted an additional one hundred fasts so that the fire of Gehenna should not affect him. Every thirty days, he would examine himself. He would ignite an oven, climb in, and sit inside it, and the fire would not affect him.
And where are people tested? Reish Lakish said: When they are crossing a bridge. Only when they are crossing a bridge and at no other time? Rather, say: Anything like a bridge, any place where danger is commonplace. Rav would not cross a river in a ferry in which a gentile sat. He said to himself: Perhaps a judgment will be reckoned with him, and I will be caught together with him when he is punished. Whereas, Shmuel would only cross in a ferry if there was a gentile in it. He said: Satan does not have dominion over two nations. Rabbi Yannai would examine the ferry and cross. The Rabbi Yannai acted in accordance with his reasoning stated elsewhere, as he said: A person should never stand in a place of danger saying that God will perform a miracle for them, lest in God does not perform a miracle for them. And, moreover, even if they do perform a miracle for them, they will deduct it from his merits. Rabbi Ḥanin said: What is the verse that alludes to this? When Jacob said: “I am not worthy of all the mercies, and of all the truth, which You have shown unto Your servant” (Genesis 32:11), and he explains: Since You have bestowed upon me so much kindness and truth, my merits have been diminished. Similarly, the Gemara relates that Rabbi Zeira would not go out and walk among the palm trees on a day when there was a southern wind blowing due to the fear that the trees might fall on him. Mar Ukva said: What is the verse that alludes to this? As it says: “When you build a new house, then you shall make a parapet for your roof, that you bring not blood upon your house, if the fallen falls mimenu” (Deuteronomy 22:8). He explains: Mimenu, from him proof must be brought. The school of Rabbi Yishmael taught: What is the meaning of the phrase: If the fallen falls from it? This person was destined to fall from that roof from the six days of Creation, it was ingrained into nature. As, although he did not yet fall, the verse calls him fallen. Nevertheless, the owner of the house is indicted for this, as merit is engendered by means of the innocent and guilt by means of the guilty.
(1) במסה IN MASSAH, when they went forth from Egypt: that they put Him to the test in respect to water, as it is said, (Exodus 17:7) that they asked, “Is the Lord amongst us or not?".
(כה) וכן אין ראוי לאדם להכנס בסכנות בבטחונו על גזרת הבורא וישתה סמי המות או שיסכן בעצמו להלחם עם הארי והחיות הרעות ללא דחק או שישליך עצמו בים או באש והדומה לזה ממה שאין האדם בטוח בהן ויסכן בנפשו. וכבר הזהירנו הכתוב מזה במה שאמר (דברים ו טז) לא תנסו את ה׳ אלהיכם וגו׳ כי איננו נמלט בזה מאחד משני דברים.
(25) Likewise, one should not put themselves in danger while trusting on the decree of the Creator [that they will live to a previously set time], drinking poisonous drink or going to battle lions or other dangerous animals without necessity, or to cast himself into the sea or into fire, or other similar things that a man is not sure of them and puts his life in danger. And the verse has already warned us in saying "You shall not try God" (Devarim 6:16), because either one of two things will happen.
(א) לא תנסו, פי' הסמ"ג שהוא אזהרה שלא יאמר אעשה מצוה ואראה אם אתברך ואם לאו. והנה בפ"ק דר"ה אומר שהאומר הרי סלע זו לצדקה בשביל שיחיה בני ה"ז צדיק גמור, היינו אם אינו עושה דרך נסיון, ועז"א כאשר נסיתם במסה שהיה דרך נסיון, והרמב"ם כתב שבכלל זה ג"כ שלא לנסות הנביא שכבר הוחזק לנביא אמת, שהוא בכלל שיאמין ביקוק ובנביאיו ולא ינסה יותר מדאי, ועז"א:
the explanation of Sefer HaMitzvot Hagadol is that this is a warning against the thing that a person might do, saying, 'I'll do a Mitzvah and see if I'll be blessed or not.' And that piece in Talmud Rosh Hashanah where someone says, "'I will give a Sela of flour to Tzedakah so that my child will live' - such a person is a Tzadik Gamor" that applies only if the person doesn't do this Derekh Nisayon. And the continuation of the verse As they tested in Massah, that was Derekh Nisayon. And Rambam wrote that in this category is also the idea that a prophet should not test, for they are already considered a true prophet, for they are in the classification of those who believe in God and God's prophets and they shouldn't test more than is necessary.
Solomon Schechter, Aspects of Rabbinic Theology: Major Concepts of the Talmud , p. 7
In the whole of rabbinic literature there is not one single instance on record that a rabbi was ever asked by his colleagues to demonstrate the soundness of his doctrine, or the truth of a disputed halakhic case, by performing a miracle. Only once do we hear of a rabbi who had recourse to miracles for the purpose of showing that his conception of a certain halakhah was a right one. And in this solitary instance the majority declined to accept the miraculous intervention as a demonstration of truth and decided against the rabbi who appealed to it. Nor, indeed, were such supernatural gifts claimed by all the rabbis. Not a single miracle is reported, for instance, of the great Hillel, or his colleague Shammai, both of whom exercised such an important influence on rabbinic Judaism. On the other hand, we find that such men as, for instance, Honi ha-Me’aggel, whose prayers were much sought after in time of drought, or Rabbi Hanina ben Dosa, whose prayers were often solicited in cases of illness, left almost no mark on Jewish thought, the former being known only by the wondrous legends circulating about him, the latter being represented in the whole Talmud only by one or two moral sayings.
(כה) וכן אין ראוי לאדם להכנס בסכנות בבטחונו על גזרת הבורא וישתה סמי המות או שיסכן בעצמו להלחם עם הארי והחיות הרעות ללא דחק או שישליך עצמו בים או באש והדומה לזה ממה שאין האדם בטוח בהן ויסכן בנפשו. וכבר הזהירנו הכתוב מזה במה שאמר (דברים ו טז) לא תנסו את ה׳ אלהיכם וגו׳ כי איננו נמלט בזה מאחד משני דברים.
(25) As so too, it is not appropriate for a person to put themselves in danger while trusting on the decree of the Creator [that he will live a set time], drinking poisonous drink or going to battle lions or other dangerous animals without necessity, or to cast himself into the sea or into fire, or other similar things that a man is not sure of them and puts his life in danger. And the verse has already warned us in saying "You shall not try God" (Devarim 6:16), because either one of two things will happen.