Unfortunately, there is no way to clear a student's attempt for a test. Canvas was considering adding this feature, but ultimately chose not to (see Delete Quiz Attempts for more information). Canvas doesn't believe in deleting historical information - they tend to err on the side of retaining records just in case you find you need those records later. The workaround for this is to simply give the student an additional attempt on the test. That's basically the same thing as clearing an attempt, except better - you get to retain the record of the student's initial attempt in addition to their second attempt.