The structure of hardware as well as the design idea of software of the automatic and fault diagnosis system for radar based on PXI and GPIB bus is introduced, then the methods of how to apply the relational Database and expert knowledge to the field of automation testing and fault diagnosis are discussed.