You need either a meter or a test lamp and good knowledge of how to use them. And be very careful not to short out the pins while probing in the connectors.
If you have a meter:
-Measure the resistance from the ground pin in the connector to the frame of the truck. It should be well under 1 ohm. Many people will measure the voltage on the ground with no load and assume zero volts means "it's OK" - but that isn't a good test.
-Measure the resistance from the ground pin in the connector on the trailer to the frame on the trailer. It should be well under 1 ohm.
-Check to make sure the ground pin on the trailer side is the same pin as the gound pin on the truck side - I've gotten the pins swapped before by turning the plug around.
-With the trailer connected to the truck and as many running/tail/turn signal lights turned on the trailer, measure the voltage between the trailer frame and truck frame. It should be zero.
If you have a test lamp:
-Ground one side of the lamp to the truck frame, check the brightness of the light when you touch the hot pin, the running light pin, and either left or right turn signal in the truck connector. Then ground the light at the truck connector and touch each pin again - the light should be just as bright. Loss of brightness indicates a poor ground, no lamp at all indicates no ground at all.
-If the trailer battery is connected up to the trailer plug such that there's a hot lead in the trailer plug (normally the case), connect the test lamp between the hot lead and ground on the trailer connector. It should be just as bright as when you connect it across the trailer battery.
-With the trailer connected to the truck and lots of lights on, connect the test lamp between the frame of the trailer and the frame of the truck. Any illumination at all indicates a poor ground.
In many cases the test lamp is actually a better instrument than a meter because it draws some current. Many meters will read a voltage at a connector pin when there is very little current available due to poor connections. Meters are great for testing the PCM, where you don't want to draw any current; but poor at diagnosing trailer lights where you want to put a load on the circuit to make sure it works properly. I'd get a test lamp at the local parts store start and start poking around.
Getting a ground connection is a lot harder than it first seems. Dirt, paint, rust, plastic, all kinds of things get in the way when you're trying to make a good ground. You really need to scrub a good clean spot to get a good connection, especially at a connection to a frame for a ground. Many people will drill a hole and install a wire under a screw - it will work for a little while. And just touching some spot with a probe often does NOT result in a ground. Clean off spot to nice shiny metal to be sure.
Don't give up on it - keep testing until you find it.