At present, virtual instrument technology has been widely used in all kinds of tests, measurements and automation fields. Test software is the mainstay of virtual instrument, which plays a key role during the process of implementing test task. In order to meet the flexibility of test items and variability of parameters about industrial testing objects, this paper introduces a modular programming idea by using software of virtual instrument. This idea divides all test items into sub-modules due to different function of test items, so as to recombining some sub-modules to satisfy new requirements of different tests. This method is used in an actual software design for industrial test system, practical application shows that this software design method of modular programming is not only realize the flexibility and generality of automation test system, but also provide a good platform for the secondary development of test program.