Applying Artificial Intelligence to Optimize the Testing Process