Updated test script code