Affidavit (a declaration under oath or a solemn declaration) is a testimony in writing. Similar rules apply.