The costs of any contest under the provisions of this article must be paid by the party contesting if he fails; otherwise, it must be paid by the plaintiff or out of the estate, or in such proportion by the plaintiff or out of the estate as the court may direct; and for the costs directed to be paid by the plaintiff or defendant, execution may be issued as in other cases; and the costs directed to be paid out of the estate may be collected as other claims against an estate are collected.