A database comparison-based interface testing method and system, a computer device, and a storage medium. The method comprises: creating a test interface in a user interaction interface by means of a test tool, configuring the test interface with request parameters, the request parameters comprising a request method, a URL address, a port, a server IP, a protocol type, a request information header and a request information body (S101); the test tool parameterizing, in the user interaction interface, the content to be parameterized; designating the type of the parameterized object; determining, by means of the parameterized object, the type to which a parameter value belongs, facilitating parametric value construction during backend processing, thereby generating test cases in various situations (S102); the test tool invoking the test interface, adding an assertion for determining whether the test is successfully performed or not (S103); the test tool executing a test operation, and configuring a configuration file with a database statement and input parameters invoked for asserting a framework (S104); completing a precise assertion by comparing a returned message with a result queried by the database statement configured in the configuration file (S105); the server receiving test data transmitted from a test user terminal, automatically extending according to the parameterized content and the type, and generating, one by one, corresponding test cases by means of parameter value replacement (S106); the server automatically executing the test according to the extended test cases, obtaining results, performing assertion determination on the test results one by one, and storing the test data, the test results, and the determination results in a list (S107). Said method makes a precise assertion from service logic, and implements automatic determination of the service logic, reducing manpower investment in regression testing, and improving testing efficiency.
展开▼