You need to use some kind of chemistry technique to isolate individual constituents of your sample to be tested. HPLC will serve well for this.
If you are not a trained chemist, don't even bother with this. HPLC rig will cost you tens of thousands, you have no training on how to use, calibrate or maintain it and as such, your results will quite possibly be bunk anyway.
You then need to use some kind of spectroscopic/detection technique to determine what each isolated chemical is. You could use MS or Diode Array Detection, which are common methods, alongside a swathe of other potential detection techniques.
I recommend against GC, since this heats the sample in a way which is not at all similar to any way that we would vaporize material. The resulting degradation of actives (whether cannabinoids or terpenoids) will mean that the content of the sample is irreversibly changed into something other than what they were when you isolated it.
Again, do not try to go and buy this stuff, do not try any of this at home.
You will attract the WRONG attention looking to buy this kind of equipment if you are not a registered laboratory and a qualified chemist.
You might want to consider buying a mydx or something similar which is a ready made consumer solution for basic testing of cannabinoids. It won't be as good as HPLC-DAD/MS but it will not lead to any expensive mistakes, potential danger from use or legal issues.
I understand the theory of these analytical techniques quite well, am a trained scientist and I would not even purchase this kinda stuff! You really need a trained analytical chemist handy to use ensure reliable and valid results.