Testing and recording the performance of the agent