Testing sensor?

How do I test a sensor. Is there a way to test a sensor without restarting Hassio?

What I miss is a Developer tool, where I can paste my sensor code, push a button, and see how the sensor behaves?

Because HA/HASS would only load needed components, you can’t add a component on the fly and test it.
What you can do is to add your code to your config, then test the config from the front end interface without restarting HA, if there is an error, it will tell you.
Once you know there are no errors, you can restart HA and see what data your get for your newly added sensor…