Senders work by changing their resistance as whatever they are measuring changes, so put a multimeter between earth and the sender signal wire, note the resistance at one setting (low petrol or low temperature), then increase the levels (fill the tank and run the car for a while) and measure again. If the resistance has changed, then it is doing something - although no guarantee it is changing correctly - but it's a start.
In my experience, senders rarely stop working - it's always a wiring issue and most often, a bad earth. My temp gauge stopped working for months, spent ages trying to fix it and finally noted some dirt under the screw head that held the earth wire on. I couldn't believe that was the problem (there is the rest of the screw bodv in the thread making metallic contact, no?) but no - cleared the tiny bit of dirt away and voila, gauge working again.