move test process to lua