Both having an infection, and taking medication for the infection can cause delays in your period. If you have been sexually active, you should take a pregnancy test two weeks after a missed period to make sure that isn't the problem. Here are some more reasons for late and missed periods.
If it hasn't been two weeks since the missed period, you may have tested too early. Depending on when you ovulated during your cycle, it can take that long for enough of the pregnancy hormone to build up to a level that will trigger a positive result. Some of the tests claim they can detect a pregnancy when you are one day late, but there have been LOTS od problems, so do wait until two weeks after. You are probably just late from having an infection, stress, etc., but you wouldn't want to be pregnant and not know about it either, so I would give it enough time and test again.