I get the agent to do it generally. (I realize this seems incestuous, but its fairly easy to validate the tests are sensible as you add features, because the biggest risk is regressions as the AI does something dumb later.)