The invention belongs to the field of
software testing and defect detection, focuses on reliability
verification of a physical
simulation engine, is suitable for scenes depending on physical
simulation, such as
robot simulation, automatic driving testing, unmanned aerial
vehicle control, education and scientific research, and particularly relates to a variation-based physical simulation engine defect detection method. Potential defects of core modules of
collision detection, mechanical calculation, dynamics and the like are efficiently found through a variation test method. According to the method, a feature
library is constructed through
static library API analysis and AST / IR code analysis,
test code expansion is performed by utilizing a
large model, a test driver adaptive to a specific
data type is generated, a physical semantic constraint
mutation seed is combined, a test is executed through libFuzzer, defect and coverage rate data are analyzed, a use case
selection strategy is optimized, and the
test efficiency is improved. Defects of core modules such as
collision detection and dynamic solution are efficiently detected, and the test pertinence and efficiency are improved.