changed test_script to finish automatically