Method, device, and medium for verifying backend interface
AssigneeBeijing Youzhuju Network Technology Co., Ltd.
InventorsQingjiang Wang, Chen Chen, Chao Zhang, Jingtian Gu
Life of this patent
Estimating the term…
Abstract
Embodiments of the present disclosure provide a method, device, and medium for verifying a backend interface. The method comprises receiving a request associated with the backend interface. The method further comprising generating a mock response based on the request and a mock rule corresponding to the backend interface, where the mock rule is received through a user interface. The method further comprises obtaining an assertion rule corresponding to the backend interface, where the assertion rule is received through the user interface. In addition, the method further comprises generating a verification result for display based on the mock response and the assertion rule.
Claims20
A method for verifying a backend interface, comprising:
- receiving a request associated with the backend interface;
- generating a mock response based on the request and a mock rule corresponding to the backend interface, the mock rule being received through a user interface;
- obtaining an assertion rule corresponding to the backend interface, the assertion rule being received through the user interface, wherein the assertion rule comprises a data path indicating a path of data to be verified, a verification rule indicating a verification operation, and an expected value;
- and
- generating a verification result for display based on the mock response and the assertion rule,
- wherein generating the verification result for display based on the mock response and the assertion rule comprises:
- applying the verification rule to the data to be verified and the expected value;
- and
- determining whether the data to be verified and the expected value satisfy the verification rule.
An electronic device, comprising:
- a memory and a processor;
- wherein the memory is configured to store one or more computer instructions which, when executed by the processor, cause the processor to:
- receive a request associated with the backend interface;
- generate a mock response based on the request and a mock rule corresponding to the backend interface, the mock rule being received through a user interface;
- obtain an assertion rule corresponding to the backend interface, the assertion rule being received through the user interface, wherein the assertion rule comprises a data path indicating a path of data to be verified, a verification rule indicating a verification operation, and an expected value;
- and
- generate a verification result for display based on the mock response and the assertion rule,
- wherein the instructions causing the processor to generate the verification result for display based on the mock response and the assertion rule comprise instructions causing the processor to:
- apply the verification rule to the data to be verified and the expected value;
- and
- determine whether the data to be verified and the expected value satisfy the verification rule.
A non-transitory computer-readable medium comprising instructions stored thereon which, when executed by a processor, cause the processor to:
- receive a request associated with the backend interface;
- generate a mock response based on the request and a mock rule corresponding to the backend interface, the mock rule being received through a user interface;
- obtain an assertion rule corresponding to the backend interface, the assertion rule being received through the user interface, wherein the assertion rule comprises a data path indicating a path of data to be verified, a verification rule indicating a verification operation, and an expected value;
- and
- generate a verification result for display based on the mock response and the assertion rule,
- wherein the instructions causing the processor to generate the verification result for display based on the mock response and the assertion rule comprise instructions causing the processor to:
- apply the verification rule to the data to be verified and the expected value;
- and
- determine whether the data to be verified and the expected value satisfy the verification rule.
Dependencies are inferred from the claim text.