Mediation is strongly recommended but not typically required. It’s encouraged because most cases that go to mediation end up settling. Keep in mind that if one of the two parties involved requests mediation, the court will usually order it.
Some local courts require it. For instance, Travis County require mediation in situations where the hearing is anticipated to last more than 3 hours. Hays, Williamson and surrounding counties do not have the same rule, however they do still recommend mediation.