DrJynx86answered grow question 4 years ago You need to live on a Legal State, that offers such services. California for example.
You can send a sample to the labs, they will ask the right amount if flowers, or hash, or concentrate, etc.
They not only test for cannabinoids such as TCH, CBD, etc, but also for pests, mold, pesticides or chemicals, everything that could be "bad", and they even sometimes are able to certify "for human consumption", some tests are more extensive (and expensive) than others.
Happy smokes!