regenerate template test codes