To check for a TB infection, your doctor may listen to your lungs using a stethoscope and look for swelling in your lymph nodes. You might even be asked about your symptoms.
One of the most common tests used to diagnose TB is a skin test. In this test, an extract of the TB bacterium called PPD tuberculin is injected into the inside of your forearm. If the skin around the injected area forms a hard and red bump in a couple of days, it is likely that you have contracted tuberculosis. However, this test is not 100% accurate and is known to give a negative reading at times.
There are other diagnostic tests like blood tests, chest X-rays, and sputum tests that can be used to detect TB.
As you already know, TB is caused by bacteria. Certain factors can increase your risk of developing tuberculosis.