Definitely for fentanyl, it is very likely to contain fentanyl these days. Look up home drug testing kits (obviously not piss test sort of drug tests, but like regents or strips). Not sure what reagents are used to identify opioids but I'm sure there exists something. Fentanyl strips are easily available and if it contains fentanyl it is almost certainly something that is supposed to be heroin and maybe actually contain some, but most heroin these days is fentanyl (in America anyway).