Yes you can bench test it... . It does NOT have to be installed on the truck. It is a variable resister... . a rheostat or potentiometer. Use an OHM meter and measure the resistance between two of the contacts. The two end contacts should read about 2000 OHMS. Reading from the center contact to either end should be variable by turning the center pivot, Readings here should vary from at/near zero to the max value of the resistor. As you rotate the center pivot the resistance should vary smooooooothly.
Once installed on the truck use a fine paperclip to make contact with the center electrical contact and measure the voltage with the ignition on(Engine not running). The output from thte TPS should be 1volt +- . 2 volts. ( . 8 to 1. 2) try to adjust to the high side of that. Once that value obtained, open the throttle fully and the voltage should be about 2. 2 to 2. 8 volts higher than the idle setting... .....
The spray with contact cleaner works well most times.
Good luck with the checks.