When do I do an ovulation test?

Unsure when to start testing, before my fertile period, during it or after it or should I test when my cm is optimal?? Help please this is confusing!