from the positioning show in the photo, i would pull the cylinder to do a good job. it looks like a real pain otherwise.
if you can remove the 2 pin plug, you could test the harness, but not the sensor. the sensor should be removed, tested with a magnet, and an ohm meter between the two pins in the plug. its normally open and closes with a magnet that is embedded in the top end of the cylinder rod.
thats what turns the red light on, on the touch panel