To solve the Oracle problem of methods sequence in object-oriented software testing, a method of metamorphic relations constructing for object-oriented software testing based on algebraic specification was proposed. Firstly, metamorphic relations constructing criteria for object-oriented testing was defined based on the characteristics of object-oriented software program. Then metamorphic relations were constructed based on GFT algorithm (Generating a Finite Number of Test Case). Finally the metamorphic relations were improved according to these criteria. The improved method was verified through constructing IntStrack class and SavAcc class metamorphic relations. The experiment results show that the metamorphic relations redundancy is decreased significantly. So the new method has a low metamorphic relations redundancy and improves the efficiency of software testing.
展开▼