Learned borrowing from Latin testis, from earlier *terstis ← *tristis, from Proto-Indo-European *tristh₂s (“a third party standing, after the two parties to a contract or dispute”), from *tréyes (“three”) and *steh₂- (“to stand”).
Practice speaking and memorizing "teste" and many other words and sentences in Italian.