“I am pretty sure in RL people do tests to find out what certain stuff are drugs, beside taking a needle and stabbing themselves, like Hal would do. ”
Actually I'd buy from the medical faction (RL pharmacy), but that's beside the point.
In RL, if you want to find out which/what drugs, then you take a certain amount, approximately your typical dose of such drug, and perform chemical tests upon it. Once these processes are complete... you won't be wanting to take said drugs - or medication - for the original intended purposes, I guarantee you.
So if we implement testing, it would in turn destroy the item that you just tested. So while this might help if you got a full crate/batch from somewhere, if you buy 50 "medical" items from Joe Bloggs, there's no way for you to know that one is Bacta, and the one next to it is Ryll. Unless you test each one... and then you're left with none at the end.
If you want to buy from resellers, then you take your chances. Which, actually, is rather like real life. You can buy vicodin from the guy on the street corner, but you've no idea how good it is, whether it's been laced with something, or if he's actually just selling you a tablet that looks the same.
And if you test it... well, again, you just lost your sample.