Hardness test is one of the main methods of material performance test. With the development of industry, there are more and more demands for in-situ hardness measurement of many pipe products. Conventional hardness measuring instruments cannot meet the in-situ measurement needs of pipe products. Therefore, new measurement methods need to be researched to realize non-destructive measurement of pipe fittings. The method of measuring the hardness of chrome coating on gun barrel by resistance hardness sensor technology and the design of measuring device are discussed.