Replacing a membrane switch with a relay for automated testing

I'm not really following your setup. I can see the approach of using a relay to isolate your system under test from the Arduino, and that makes perfect sense. But the bottom diagram you posted doesn't show using a relay, as far as I can work out. Are you actually connecting it directly via that circuit, now? Why have you stopped using the relay?