How you delete a test depends on whether it has been completed by any of students. 

You can delete a test from your course and if no student submissions exist, the gradebook item is also deleted.

For tests with submissions, you must confirm that you want to permanently remove the test, all submissions, and grades from your course. Or, hide the test from students to preserve the submissions and the scores in the gradebook. Students can't access hidden tests on the Course Content page or on their grades pages even if you've graded submissions.