posted on 2024-07-12, 23:50authored byTsong ChenTsong Chen, Jianqiang Feng, T. H. Tse
We study the effect of applying metamorphic testing to alleviate the oracle problem for numerical programs. We discuss a case study on the testing of a program that solves an elliptic partial differential equation with Dirichlet boundary conditions. We identify a metamorphic relation for the equation and demonstrate the effectiveness of metamorphic testing in identifying the error. The relation identified in the paper should also be applicable to other numerical methods that yield better approximations on the refinement of grid points or step sizes.