The court wherein such petition is filed shall hear all such testimony as may be offered, either by the petitioner or attorney for the Commonwealth, and after the evidence has been heard shall cause to be made out by the clerk of the court a certificate of the facts proved, and file with the same an opinion, in writing, as to the propriety of granting the relief prayed for.
Va. Code § 19.2-366