A certificate is an official piece of paper that proves you achieved something, or that something is true.
"On the wall, the doctor had a framed certificate showing that she had completed her residency at Massachusetts General Hospital."
"To get a passport, you need to show us an official birth certificate with a raised seal."
Testimony is a formal statement, often made in a court of law, made with a very solemn, sacred or near-sacred promise that it is true.
"He had told his friends he was in New York, but in his testimony before the Grand Jury, he said he had been in Chicago."