Uncle Bob Says : Acceptance test should be written during the sprint
What happens in the iteration planning meeting? The details are discussed. Who provides the details? Product owner, business analyst but the real details come out from QA. QA are the people who are specifying the way the system ought to behave. In discussion with business analyst and product owner, QA is the one writing down the acceptance criteria, the Definition of DONE. Then QA people start to write acceptance tests, executable and automated that will define DONE for every story. Programmers will know that they are done with the story when the acceptance test for that story passed. Acceptance test should be written during the sprint.