We consider the design of self-testers for quantum gates. A self-tester for the gates F 1, . . . , F m is a procedure that, given any gates G1, . . . , Gm, decides with high probability if each Gi is close to F i. This decision has to rely only on measuring in the computational basis the effect of iterating the gates on the classical states. It turns out that instead of individual gates, we can only design procedures for families of gates. To achieve our goal we borrow some elegant ideas of the theory of program testing: we characterize the gate families by specific properties, we develop a theory of robustness for them, and show that they lead to self-testers. In particular we prove that the universal and fault-tolerant set of gates consisting of a Hadamard gate, a c-NOT gate, and a phase rotation gate of angle π/4 is self-testable.