Pergunta de entrevista da empresa Microsoft

How do you know the runtime of a program is O(n). Now, how would you test it?