A test or examination (informally, exam or evaluation) is an assessment intended to measure a test-taker's knowledge, skill, aptitude, physical fitness, or classification in many other topics (e.g., beliefs). A test may be administered verbally, on paper, on a computer, or in a predetermined area that requires a test taker to demonstrate or perform a set of skills. Tests vary in style, rigor and requirements.
If a person deliberately did not fast any day of the Month of Ramadhan, he has committed a sinful act and he must that day as Qadha and he must fast two months or feed sixty poor Momineen for not fasting that day.
Exams is not be a valid reason to leave fasting, so, the above rule is applicable.
If fasting is very difficult for a person then he can do it later.