In the fifth chapter of Pirkei Avot we have a number of mishnayot discussing sets of ten:
עשרה נסיונות נתנסה אברהם אבינו
עשרה ניסים נעשו לאבותינו במצריים
עשרה נסיונות ניסו אבותינו את המקום במדבר
עשרה ניסים נעשו בבית המקדש
"Avraham our forefather was tested with ten trials...Ten miracles were performed for our ancestors in Egypt...With ten trials did our ancestors test God in the wilderness ... Ten miracles were performed for our ancestors in the Temple"
Is there any connection between nes נס - miracle and nisayon נסיון - test or trial?
Let's look first at nes. In the Tanach, it means a flag or a flagpole. There is some debate as to whether it ever also means "miracle" biblically. Amos Chacham in Daat Mikra on Shmot 17:16 says it never has that meaning (despite Onkelos and a number of midrashim on that same verse.) Even Shoshan in his Concordance gives Bamidbar 26:10 and Yishayahu 11:10 as meaning mofet מופת - generally translated as "miracle".
However, even with these three verses, the connection to flag is clear. And I think we can see the development of nes from flag to miracle via an understanding of the word as "sign". These aren't just miracles for their own sake - they are trying to show something, to act as a sign. Another word with both meanings in Hebrew is ot אות. Even in Biblical Hebrew, it means both "sign" and "miracle" (with debate between linguists as to which meaning came first.)
According to Klein and others, nes is related to the root נשא - meaning "to lift up". This makes sense for the early meanings of both flag and pole.
As to nisayon - this derives from the root נסה , meaning "to test, to try, to attempt" (in Biblical Hebrew a trial was known as a masa מסה .) Some scholars do not connect נסה and nes (whose root is נסס ) but I find Steinberg's explanation intriguing. He writes that the way we test the weight of an object is to lift it up, and a person's strength is measured by his ability to lift, to bear. From here developed the sense of testing in general.
Because of the similarity of the words, there are a number of attempts to replace the meaning of "test" with "mast" or "flag". For example, in Bereshit 22:1 and Shmot 20:17 it says that God was minase מנסה Avraham and Bnei Yisrael respectively. In both places Rashi, based on midrashim, says that the verb נסה means "to make great". In his commentary on Shmot, the Ramban rejects Rashi's approach. Chavel says that Ramban's opinion is based on a different view of the root of the word נסות. But I think that we can see from the mishnayot quoted above, a bigger problem. For those that say that נסה means "to make great" or "to lift up" - how do they explain Bnei Yisrael's nisyonot of God? Certainly their complaints weren't to make God greater, but rather a test of Him.
However, Jastrow points us to an interesting verse that might help us understand the issue better. He defines נסה as "to put up a sign, ask for a test" and refers us to Yishayahu 7:11, where God is asking Ahaz to test him:
שְׁאַל-לְךָ אוֹת, מֵעִם השם אֱלֹהֶיךָ; הַעְמֵק שְׁאָלָה, אוֹ הַגְבֵּהַּ לְמָעְלָה.
"Ask for a sign (ot) from the Lord your God, anywhere down to Sheol or up to the sky."
And Ahaz replies (7:12):
לֹא-אֶשְׁאַל וְלֹא-אֲנַסֶּה, אֶת-השם.
"I will not ask, and will not test the Lord".
So Ahaz realized that asking for a sign - a nes - is a test - a nisayon. (See the Daat Mikra for further explanation of the motivation of Ahaz.) But perhaps this understanding could apply to Avraham and Bnei Yisrael as well - when God tested them, he was asking for a sign.
So in a way, with their response - particularly Avraham's at the akeidah - they were performing nissim!