This depends on how targeted the effect of the antibiotics, e.g. broad spectrum or more selective, and also how long you are taking the antibiotics. If you're on a short course (e.g. under one week) it's best to wait to complete the course and to test a few weeks afterwards. If you plan to perform multiple tests and are interested in seeing what interventions you would benefit from to help your microbiome recover after antibiotics, then we would recommend testing very shortly after completing the course.
If you are taking selective antibiotics regularly (e.g. for acne) then it is recommended to test while taking it as the findings would be useful in identifying which interventions might limit the impact of the antibiotics on your beneficial and commensal flora.