Nutritional Analysis can be done a number of ways. A blood test, saliva test, hormone test, stool test, or more sophisticated testing may be used based upon your symptoms, situation, or health problems.
Tests are analyzed from a nutritional perspective, not from a disease perspective. The goal is to find patterns and address them before they turn into pathology or disease conditions like heart disease, diabetes, or cancer.
The word diet in the above title is in quotes because a diet is often thought of something short term. Food is something you eat everyday for your entire life, so it's not a "diet" but a way of taking care of yourself.
You are unique! Just because a particular diet worked for someone else doesn't mean it will work for you.
There are many types of "diets" out there: Paleo, Ketogenic, GAPS, Whole 30, FODMAP, SCD, etc. Your health goals and unique physiology will determine which one is right for you. In addition, it may be modified according to your needs.