The deponent shall be sworn or affirmed to testify the truth, the whole truth and nothing but the truth, relative to the cause for which the deposition is taken. The deponent shall then be examined by the justice or notary, and may be examined by the parties, and the testimony may be taken in writing or by any recording device, including an electronic device, which will accurately preserve such testimony.
Mass. Gen. Laws ch. 233, § 30