Testing of electrical devices