Are there tests which can trace substances? How long is hashish and heroin traceable after use?

There are laboratory tests which can trace substances in a person’s urine. You should contact a microbiological laboratory or visit a hospital which runs tests of this sort.
How long substance use remains traceable depends on the substance used. Cannabis variables are traceable for 2-3 days following occasional use and for up to 4 weeks after regular use. Heroine can be traced for up to 36 hours after the most recent dose.