Test script refined