An ANA test is used to detect an autoimmune reaction by measuring the amount and pattern of antibodies in your blood.