No. We have never had a Judge or the government request a mandamus plaintiff to appear in court. There are many reasons why.
First, mandamus cases do not involve whether an application should be approved or denied. They only concern whether the adjudication process is unreasonably long. The person whose application is delayed typically has nothing to offer on this point – no additional facts or testimony that could help a Judge decide the case. Any relevant information about whether the process is taking too long normally resides with the government.
Second, Judges tend to not allow discovery in mandamus cases. That means they frequently decide these cases without allowing new evidence to be introduced.
Finally, many (if not most) mandamus cases end when the government adjudicates the application, usually before a Judge even gets involved. The prospect of having to defend the delay in court is frequently enough to get the government to do their job and decide your case.
A Judge certainly has the authority to ask a plaintiff to personally appear in court, but that is a very unusual and rare occurrence for a mandamus case that involves an unreasonable immigration delay.