You should google it because everything varies depending upon your location. In the U.S you can just head into a decent headshop in the city and get all your testing needs. They will help you narrow down what you are trying to accomplish. A test will only tell you if it has the aforementioned pharmaceutical in it (MDMA, cathinones etc.) However it wouldn't distinguish between what is actual MDMA and what other byproducts exists within. A professional lab test would be the most thorough testing to do in hopes of harm reduction. If you want to know if it has MDMA just get a test that I've found in headshops. If you want to know purity you have to explore other avenues. Who knows if they have created a purity test available for the popular rave drugs. It has been a while since I was apart of that scene.