Font Size: a A A

Research On Path-oriented Test Data Generation For Character String

Posted on:2018-04-14Degree:MasterType:Thesis
Country:ChinaCandidate:Y B TangFull Text:PDF
GTID:2348330518496061Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Unit testing has the properties of finding failures earlier, easier, and cheaper. But manual operation of unit testing is inefficient and has high error rate. So, it has important significance to improve the automaticity of unit testing. String is a base type of non-numeric data widely used in software development such as database and network protocol. But different from numeric data, the constraints on string data is nonlinear, it is a hard problem to generate test data for string type.This paper proposed a method for test data generation for character string base on three type atomic functions. This method has two steps:(1) Abstract the constraints caused by string function invocation.three atomic functions to express the string function through analyzing string functions in standard library "string.h". And each atomic function can be explained to a group of constrains.(2) Solve constraints. The step of constraints solving is to search a solution space tree using branch bounding method and get a group of test cases. Different from numeric constraints, the constraints abstracted by atomic function model contains some special atomic symbols. These symbols have a special meaning, so the construct of constraints should be modified when solving constraints.The author has implemented the above idea, and the method mentioned above is prove to be effective to support the string type test data generation in C language program.
Keywords/Search Tags:unit testing, test data generation, character string, atomic function, path-oriented
PDF Full Text Request
Related items