The invention relates to a method for testing palletizing
robot control software based on Agent, and the method provided by the invention is an
improved method for carrying out
black box testing and
white box testing on the palletizing
robot control software, and belongs to the field of
embedded software testing. The method provided by the invention mainly comprises the following four steps: 1, building an Agent-based BDI (belief-desire-intention) model TC_Agent, and generating a
black box testing case required for testing; 2, judging the implementation situation of the systemic function by using a
black box testing Agent; 3, building a
genetic algorithm-based coverage testing case generation model GA_Agent, and realizing the automatic generation of coverage testing cases through carrying out a series of genetic operations such as code design,
fitness function design, selection,
crossover,
mutation, and the like; and 4, building a
white box testing Agent model, completing the
instrumentation operation of programs through carrying out preprocessing and program
instrumentation on Agent, compiling and running the programs subjected to
instrumentation, then sending the programs to a target
machine, inputting the testing cases generated by the GA_Agent, and analyzing the Agent by using a coverage rate so as to obtain the coverage rates of program statements and branches of a palletizing
robot. The method disclosed by the invention is simple and quick, is strong in commonality, can be applied to different programs, and can be used for greatly improving the efficiency of the
software automation test.