It is well acknowledged that quality of software has a higher priority than the performance and functions of software. One of the ways to get high-quality software is to get more efficient software-testing techniques. Theory and technology of software quality assurance are an important part of software developing methodology and software engineering. Software testing plays a key role in software quality assurance. The purpose of the essay is to search for new software testing method and to solve some problems in testing of object-oriented program. We also try to amend some deficiency in the traditional test method for structured programs. By the idea of program slicing, we can disassemble the source code of a program into several slices following certain rules. Instead of testing the whole program, we can test these slices. We can also guarantee the equivalence of the two ways. Testing on the base of program slicing has several advantages than the one simply using data flow analysis and control flow analysis. The first, because a program equals to the union of its slices, to test all of the slices makes a complete test of the program, and to test each slice which is related to the interested variables is actually a complete test of the requirement test. Then we solve the problem of sufficiency in traditional structured program testing and object-oriented program testing as well. The second, program slicing technique can be applied to the testing of both structured programs and object-oriented ones.
UML (Unified Modeling Language) is a visual modeling language used for specifying, visualizing, constructing,and documenting the artifacts of software systems by various diagrams. It has been widely accepted as a standard modeling language in both academic and industrial areas. UML sequence diagrams are mostly used in specifying system requirements. By representing interactions, which are arranged in time sequence,between the objects in a system,sequence diagrams can construct scenarios indicating the system's functions. A UML statechart diagram is a graph shows the sequences of states that an object or an interaction goes through during its life in response to received stimuli,together with its responses and actions. It's useful in the design stage of system development. This essay discusses the computer-aided transformation from sequence diagrams to statechart diagrams,which can offer strong support for the transfering from requirement analysis to system design in the software development process. With OCL (Object Control Language) semantic constrain,a transform algorithm is provided in the paper. And the differences with the related works are also mentioned.