Use a voltmeter and/or a spare battery to test.
You can find the pin diagrams on-line.
It will take 2 people to test: One to measure, the other to operate turn signals, break pedals, running lights.
On the truck end: take a voltmeter and test for 12Vdc between a pin that represents a function (turn signal, brake, etc..) and the "ground" pin. Also test between the function pin and the truck frame. This checks to see if the "ground" pin at the vehicle is connected to the vehicle frame. You could also use continuity function of your tester to check that ground pin and frame are connected. This ground pin or frame is the return patch of the electricity from the trailer. Some vehicles/trailers don't use this ground pin for the "return" path, they use the trailer frame and the ball hitch as the return path. If this is the case, it is often necessary to scrape the paint off the hitch where it goes into the vehicle receiver to get a good connection if this is the path.
On the trailer end,
Check grounds: Switch meter to continuity or resistance (ohm) reading. Check that "ground" pin and trailer frame are connected. (i.e close to 0 ohms, i.e. electrically the same point the same) if this pin (and not the hitch) is to be the return path.
Check "functions": You can't just take meter and check for continuity between a "function" pin and ground pin (or frame) because you may not be measuring a path through the light, you may just be measuring the short circuit path from a nicked/cut wire to frame. However, if you measure a OPEN circuit from a "function" pin to ground pin (or frame) you most likely have a cut or disconnected wire. (That is: The circuit is not passing through the light).
You can take a large 6 volt battery (like the ones for old flashlights or school experiments) or a 12v car battery with some wires clipped to the terminals. With the negative (-) post of the battery connected to the trailer's ground pin (or frame if this is the return path), then touch the positive (+) post of the battery to the different "function" pins. Your spotter should see the appropriate lights go on when you do this.