For contact-less function check of solenoids on valves that are in operation. The magnetic field tester is held near the solenoid and the indicator lamp signals an existing magnetic field in the excited state of an intact solenoid. The magnetic field tester is also suitable for detecting permanent magnets that are not visible (for example, the magnetic piston of a cylinder). The battery is replaceable. The magnetic field tester can be used regardless of the coil voltage and can also be used as a pocket torch.