To safely test a washing machine's water inlet valve, the power and water supply must first be turned off. The power can be disconnected by unplugging the washer or by switching off the circuit breaker. The water supply should be turned off and the hoses disconnected from the washer.
The water inlet valve is located at the back of the washer, identifiable by the water hoses connected to it. When the hoses are taken out, point them into a sink or bucket, and turn the water back on to verify the pressure is good and the hoses are not clogged. The filter screens on the hoses and the inlet valve should be examined for debris and cleaned, if needed.
If no debris is present, the next step is to test the solenoids. There are two wires connected to each solenoid, and they should be unplugged at the connector and inspected for corrosion. If the wires are corroded, they should be cleaned or replaced. The wires can be tested for continuity with a multitester set on the ohms setting X1. There are varying readings based on different models, but the valve should indicate some resistance if it is functioning properly. A reading of infinity means the solenoid is defective and needs to be replaced.
If all of these elements are working properly, then the valve itself is malfunctioning. Unless there is simply debris clogging the valve, it needs to be replaced.