The application belongs to the technical field of domain models, and particularly relates to an interface
test code generation
system based on
a domain model, which comprises
a domain model management module, an interface contract analysis module,
a domain-interface mapping module, a
test case generation module, a
test data generation module, an assertion generation module, a
code generation module, an execution and feedback module. The application generates test cases and assertions by using domain rules, invariants and state machines, covers business
correctness instead of only interface availability, improves the value of test cases, maps domain behaviors into multiple interface calling sequences, automatically generates pre-step,
dependency graph and cleaning strategy, solves the problem of link arrangement difficulty, generates multiple types of
test data according to domain constraints, is controllable and reproducible, realizes incremental update by comparing models and contract versions, reduces change maintenance cost, supports multi-language / cross-framework reuse, and reuses unified domain semantic assets.