Testing varies based on the following: Whether a primary or secondary immunodeficiency is suspected For primary immunodeficiency, which component of the immune system is thought to be deficient Primary Immunodeficiencies These disorders are genetically determined; they may occur alone or as part of a syndrome.