Traditional black box test cases are mostly generated by manual methods and are difficult to automate. This is caused by the diversification of software module's input interface. In this paper, an intelligent black box test case automatic generation algorithm referred to as Interface Byte Stream Parsing (IBSP) is proposed. In this algorithm, the input interface of the software module to be tested is firstly abstracted as the number of bytes occupied by the input parameters of the module, and a section of dynamic memory is applied, then a binary sequence is generated in the dynamic memory by using Dynamic Memory Increment (DMI) or Random Sampling (RS) method. Follow that, the type information contained in the interface is inputted through the software module to be tested. The binary sequence is parsed into the input data of the software module to be tested, and the input data is filtered by using the filter conditions. Finally, the test expectations given by the user and the filtered input data constitute the test cases. For improving the performance of the algorithm, a testing experiment is conducted. The experimental result shows that the algorithm facilitates the automatic generation of test cases in software testing, improves the efficiency of test case generation, and has been initially applied.
展开▼