You usually test for TB through a sample of your sputum (phlegm) which is coughed into a container and then tested for TB. The results should take around two days to come back. There are other ways to test for TB that are more complex.