Ethics, Professional Conduct, and Courtroom Testimony
Ethics is mostly honesty and limits
The tested themes are simple even when the scenarios are not: be truthful about who you are and what you are licensed to do; protect client confidences; decline work that requires illegal conduct no matter what the client offers; and avoid conflicts, including working both sides of a domestic matter or investigating a party your retaining attorney represents. Fees must never be contingent on the content of your testimony - that converts a witness into a hired advocate.
Privilege and the attorney relationship
When retained by a lawyer, your reports and communications may be protected work product. Label them accordingly, send them only to the attorney, and do not discuss the matter with the opposing party or opposing counsel. Do not contact a party you know to be represented by counsel about the subject of that representation.
Testimony
Prepare by rereading your file, not by memorizing a script. Answer the question asked, then stop. "I don't know" and "I don't recall" are complete, professional answers; guessing destroys credibility. Do not argue with counsel, do not volunteer, and do not characterize - describe. Expect foundation questions about your notes and photographs: when taken, by whom, with what device, and whether the image was altered. If you use notes to refresh your memory on the stand, expect to produce them.
Rule of thumb: testify as though the transcript will be read by the judge who decides whether you keep your license.