Testing long-running scripts