When it is your hands you test using a ohm meter and by moving the float, if the reading change a in a smooth manner as you move the float its probably ok.
In the fuel tank. Fuel tank must be removed to gain access to the sending unit.
Any fuel sending unit I've ever seen is mounted into the fuel tank.
It has both.
Which sending unit? Oil pressure sending unit? Engine temp sending unit? Fuel gauge sending unit?
fuel sending unit is bad.
It's in the gas tank
if its a full size pickup, with a v8, the fuel pressure regulator is in the tank, its part of the sending unit
Here is some info on how to test a fuel sending unit: https://www.fillingstation.com/articles/fuelgaugetesting.htm Here is a video of the process: https://www.youtube.com/watch?v=HJkuEH2aqMU
The fuel level sending unit in the tank is probably at fault.
It is mounted on the top of the fuel sending unit that goes in the TOP of the fuel tank.
The fuel tank has to be removed to gain access to the fuel sending unit. The fuel sending unit and the fuel pump is replaced as a unit.
The sending unit(float) has failed. The sending unit is attached to the fuel pump module in the fuel tank.