search function in test script