The testimony may be oral or by deposition, taken as in an action at law in the district court.