Replacing a membrane switch with a relay for automated testing

Dragiosis..
Maybe the relay contacts have more bounce than the membrane switch and the circuit's own debounce isn't enough - as others suspect - and warrant "remediation":

http://www.zen22142.zen.co.uk/Design/debounce.htm