Blood test does not break the fast. It is reported that Prophet Muhammad (peace and blessings be upon him) got cupped while fasting. Therefore, scholars say that as long as cupping does not break the fast, blood test does not break it either.
Sheikh Mohamed El-Moctar El-Shinqiti, director of the Islamic Center of South Plains, Lubbock, Texas, states: Blood test does not nullify one’s fast. There is a difference among scholars whether cupping or bloodletting nullifies the fast or not. It is reported in Al-Bukhari that the Prophet (peace and blessings be upon him) got cupped while fasting, and it is also reported in Sunan An-Nasa’i that he allowed the fasting person to undergo cupping. The hadith in which the Prophet (peace and blessings be upon him) spoke of cupping as an invalidator of fast has been interpreted by scholars as a way of showing mercy for the fasting person and not as an indication of prohibition. Therefore, since cupping does not nullify the fast, blood test would not nullify the fast either.