I would say it depends on the region where you choose to practice. It probably varies from state to state with the number of homicide cases that you are involved with. The laws here allow your autopsy report to stand as part of the record in all legal proceedings. Sometimes depositions can take the place of courtroom testimony depending on the specifics of the case.
Courtroom testimony usually occurs at the request of the prosecuting attorney in most murder cases to emphasize to the jury using photos to document what the victim suffered and any physical evidence relating to the body (pattern injuries, DNA collected from the body for identification purposes or implicating the defendant). This also allows the defendant's attorney ample opportunity to try to discredit you by attacking your training, credibility, chain of custody, and ethics (the not so fun part of forensics). If the cause and manner of death are contested, then the defendants usually bring in their own expert witnesses to discuss their interpretation of the findings.
I rotated in two different offices, and the pathologists averaged between one and three days per month in the courtroom and 1-3 depositions a month with attorneys in their offices in cases where courtroom testimony was not required. I would imagine that it would be more in larger, urban areas.