I’m thinking that there may be two different main reasons why students fail tests and quizzes. On one side you have the student who, despite a lot of effort, does not understand the material; or he has missed some necessary classes for an unavoidable reason; or the teacher did not teach the material that the test covers; or the test is a bad test. On the other side you have the student who puts as little effort into school work (or certain subjects) as he can get by with. He fails the test because he hasn’t completed homework, paid attention in class, spent time studying, or turns in tests with “don’t know” written in the blanks.
For the first type of student I have no problem with re-doing tests and quizzes. Ideally, you as the teacher will already know this student is struggling and will have addressed the problem before the test.
For the second type of student, unless they can show they desire to raise their test score and are willing to put effort into it, I would not just “give them a second chance”. Too many times it is the teacher (and sometimes the parents) who are trying to make this work and the student is the reluctant receiver who is not learning responsibility.
Tests should show how well the material has been mastered. However, sometimes they also show the lack of responsibility a student has. If a test is retaken, it should not just be a copy of the alternate test in the back of the teacher guide, without the student needing to put effort into pulling up his grade.