While there are many measurable factors that help determine approximate life expectancy, there is no one test or quiz which can accurately predict how long someone can expect to live. Tests on the Internet are fun and may be fact-based, but they are not scientifically accurate.
These types of quizzes and tests generally measure things like daily habits and where someone lives to create a window of probability regarding life expectancy. While these tests attempt to measure certain things known to have a significant impact on health and longevity, they are far too general to be accurate. Many things contribute to life expectancy; even doctors and scientists cannot predict it accurately.