What witnesses do, under oath.
To bear witness, give evidence as a witness; to make a declaration under oath, for the purpose of establishing a fact in court. (Black's Law Dictionary)
What the witness says when he or she testifies is known as
Testimony, and is used as evidence, as they are under oath when they say it.
Here's an incorrect interpretation of how the word originated: "Back in Rome, a man had to take an oath with one hand on their testicles when they swore to something, as it was a symbol of something they held dear."
No. It sounds like a logial connection, but that isn't where the word originated. There really is a strong link between testicle and testify (as well as attest, testament, contest and other words), but it comes from something else.
From a Q&A Column:
The Latin word for a witness was testis, which derives from an Indo-European word for the number three. That was because the Romans regarded a witness as what we would call a trusted third party, one who stands aside from the dispute and can tell it how it really was. The Romans did also use the word testis in a figurative way to mean testicle. The idea seems to have been that a testicle was a witness to a man's virility. And that's the whole story of the connection
Incidentally, testis sometimes appeared in the form testiculus, a diminutive form; this was converted into English at the end of the fourteenth century first as testicule and then as testicle. The Latin testis, with its plural testes, has continued in medical use to the present day.
There was a reference to holding the testicles in the book of
Genesis, although the King James Version calls it "grasping the thigh." There doesn't seem to be any link between what was written there and what the Romans did.
--Quote taken from http://www.quinion.com/words/qa/qa-swe1.htm
See also By my balls, I do swear for another take on the etemology.