Testament
Middle English: from Latin testamentum ‘a will’ (from testari ‘testify’), in Christian Latin also translating Greek diathēkē ‘covenant’.
wiktionary
From Middle English, from Old French, from Latin testāmentum(“the publication of a will, a will, testament, in Late Latin one of the divisions of the Bible”), from testor(“I am a witness, testify, attest, make a will”), from testis(“one who attests, a witness”).
etymonline
testament (n.)
late 13c., "last will disposing of property," from Latin testamentum "a last will, publication of a will," from testari "make a will, be witness to," from testis "witness," from PIE *tri-st-i- "third person standing by," from root *tris- "three" (see three) on the notion of "third person, disinterested witness."
Use in reference to the two divisions of the Bible (early 14c.) is from Late Latin vetus testamentum and novum testamentum, loan-translations of Greek palaia diatheke and kaine diatheke. Late Latin testamentum in this case was a confusion of the two meanings of Greek diatheke, which meant both "covenant, dispensation" and "will, testament," and was used in the former sense in the account of the Last Supper (see testimony) but subsequently was interpreted as Christ's "last will."