checking for existing record and updating test results