Object testing method, computing device, storage medium and computer program product

Through object testing methods, dynamic selection of test branches is solved, and the cumbersome and complex testing process in the existing technology is improved, and testing efficiency and flexibility are improved.

CN119441040APending Publication Date: 2025-02-14ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411521381.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the front-end development process such as web pages and games, the testing process in the existing technology is cumbersome, requiring multiple interactions with the server, and writing test scripts containing all test branches, resulting in inefficiency in testing.

Method used

Through the object testing method, in response to the test instructions of the initial test interface of the target object, at least two next test interfaces associated with the initial test interface are determined according to the object testing protocol, and the target test interface is determined from these test interfaces according to the preset test rules. , dynamically select test branches to reduce the complexity of test scripts.

Benefits of technology

Improves the flexibility and efficiency of object testing, reduces the complexity of the testing process, does not require writing test scripts containing all test branches, and can quickly adapt to changes in the back-end interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441040A_ABST
    Figure CN119441040A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, in particular to an object testing method, computing equipment, a storage medium and a computer program product. At least two next test interfaces associated with the initial test interface are determined according to an object test protocol, the object test protocol is used for describing a plurality of object test scenes of the target object, the plurality of object test scenes are determined according to the plurality of test interfaces, and the initial test interface and the at least two next test interfaces belong to the plurality of test interfaces; determining a target test interface from the at least two next test interfaces according to a preset test rule; and determining at least two next test interfaces associated with the target test interface according to the object test protocol, and continuing to execute the step of determining the target test interface from the at least two next test interfaces according to the preset test rule so as to test the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to object testing methods, computing devices, storage media, and computer program products. Background Art

[0002] In actual applications, in the front-end development process of web pages, games, etc., after a series of functional development is completed, the developed functions are usually tested to check whether the developed functions meet expectations and development requirements. However, during the testing process, acceptance is usually carried out through interactive methods such as manual clicks. Since most web pages, games, etc. are dynamic, they need to request data exchange with the server interface before they can be fully displayed and used normally. This testing process is very cumbersome and requires multiple interactions with the server. In addition, in order to fully implement the test, the server needs to write a test script containing all test branches for testing. The testing process is relatively complicated, which affects the test efficiency. Therefore, an effective technical solution is urgently needed to solve the above problems. Summary of the invention

[0003] In view of this, an embodiment of the present specification provides an object testing method. One or more embodiments of the present specification also relate to an object testing device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of this specification, there is provided an object testing method, including: In response to a test instruction for an initial test interface corresponding to a target object, determining at least two next test interfaces associated with the initial test interface according to an object test protocol, wherein the object test protocol is used to describe a plurality of object test scenarios of the target object, the plurality of object test scenarios are determined according to a plurality of test interfaces, the initial test interface and the at least two next test interfaces both belonging to the plurality of test interfaces; Determining a target test interface from the at least two next test interfaces according to a preset test rule; At least two next test interfaces associated with the target test interface are determined according to the object test protocol, and the step of determining the target test interface from the at least two next test interfaces according to the preset test rules is continued to test the target object.

[0005] According to a second aspect of an embodiment of this specification, there is provided an object testing device, comprising: A first determination module is configured to respond to a test instruction for an initial test interface corresponding to a target object, and determine at least two next test interfaces associated with the initial test interface according to an object test protocol, wherein the object test protocol is used to describe a plurality of object test scenarios of the target object, the plurality of object test scenarios are determined according to a plurality of test interfaces, the initial test interface and the at least two next test interfaces both belong to the plurality of test interfaces; A second determination module is configured to determine a target test interface from the at least two next test interfaces according to a preset test rule; The third determination module is configured to determine at least two next test interfaces associated with the target test interface according to the object test protocol, and continue to execute the step of determining the target test interface from the at least two next test interfaces according to the preset test rules to test the target object.

[0006] According to a third aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned object testing method are implemented.

[0007] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the computer program / instruction implements the steps of the above-mentioned object testing method when executed by a processor.

[0008] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which implements the steps of the above-mentioned object testing method when executed by a processor.

[0009] One embodiment of the present specification provides an object testing method, comprising: in response to a test instruction for an initial test interface corresponding to a target object, determining at least two next test interfaces associated with the initial test interface according to an object testing protocol, wherein the object testing protocol is used to describe multiple object testing scenarios of the target object, the multiple object testing scenarios are determined according to multiple test interfaces, and the initial test interface and the at least two next test interfaces both belong to the multiple test interfaces; determining a target test interface from the at least two next test interfaces according to preset test rules; determining at least two next test interfaces associated with the target test interface according to the object testing protocol, and continuing to execute the step of determining the target test interface from the at least two next test interfaces according to the preset test rules, so as to test the target object.

[0010] In the above method, by setting an object test protocol, describing multiple test scenarios of the target object, and in response to a test instruction for the initial test interface corresponding to the target object, at least two next test interfaces associated with the initial test interface are determined according to the object test protocol, and the target test interface is determined from at least two next test interfaces according to a preset test rule, at least two next test interfaces associated with the target test interface are determined according to the object test protocol, and the step of determining the target test interface from at least two next test interfaces according to the preset test rule is continued, thereby realizing the test of the target object. Moreover, during the test process, different test interfaces can be dynamically selected, thereby realizing the dynamic selection of different branches, improving the flexibility of the object test, and there is no need to write a test script containing all test branches, reducing the complexity of the test process, thereby ensuring the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a flow chart of an object testing method provided by an embodiment of this specification; Figure 2 is a schematic diagram of an object test in an object testing method provided by an embodiment of this specification; Figure 3 It is a schematic diagram of data conversion in an object testing method provided by an embodiment of this specification; Figure 4 is a schematic diagram of the structure of an object testing device provided by an embodiment of this specification; Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0012] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0013] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0014] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0015] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0016] First, the terms involved in one or more embodiments of this specification are explained.

[0017] API: Application Programming Interface, is a set of well-defined methods, protocols, and tools for building software applications. In simple terms, API specifies how software components communicate with each other and how to access certain functions or data. API allows different software services to communicate with each other without having to understand the underlying implementation details.

[0018] Front-end: Front-end development focuses on the user interface (UI) and user experience (UX), creating the parts that users can see and interact with. The tools and technologies used by front-end developers are mainly used to build the appearance and behavior of a website or application.

[0019] Backend: Backend development focuses on server-side application logic, data management, and interaction with external systems. Backend developers are usually responsible for handling business logic, database operations, and communication with the frontend or other services.

[0020] JSON: JavaScript Object Notation is a lightweight data exchange format. It is based on a subset of the JavaScript programming language, but has now been designed as a language-independent text format and is widely used to transmit data in various environments. JSON is easy for people to read and write, and it is also easy for machines to parse and generate. JSON can be used to store simple key-value pairs of data, or it can represent complex hierarchical data structures.

[0021] URL: Uniform Resource Locator, is an address format used to identify the location of resources on the Internet. URL provides a standard way to specify the location of network resources, allowing users to access these resources through browsers or other network tools. URL contains all the information needed to access resources, including access protocols, server addresses, paths, and possible query parameters.

[0022] In actual applications, in web front-end development, after completing a series of functional development, developers can often open the browser and manually click to check whether the functions meet their expectations and development needs. However, most web pages are dynamic and require the server API to request data exchange before they can be fully displayed and the functions can be used normally.

[0023] Usually, you can manually write Mock (simulated data) in the source code for testing. For example, you can write a test script or use a Mock platform for testing. In the test of the Mock platform, you need to exhaust all Mock use cases based on a single interface in the platform and require the web front end to switch the original API request address to the Mock platform in a hard-coded manner for complete testing. However, the front-end development needs to switch the API request address in a hard-coded manner in the code, and after the test is completed, the switch needs to be closed in a hard-coded manner. Each switch is often accompanied by code release, and it cannot be used flexibly in the formal environment, which has certain invariants and limitations. Furthermore, the current common division of labor will be developed by two or more different technicians for the front and back ends respectively. The common practice for the front end of the API interface provided by the back end is to read the API document, and the communication bridge between the front and back ends can only rely on such an API document, which is often insufficient for the back-end edge scenarios that the front end understands. The front-end's dependence on the API interface increases with the number of APIs, resulting in an exponential increase in the number of test script scenarios written. In other words, if the front end needs to test all situations of two interfaces, and each interface returns N possible data, then the front-end development needs to write test cases for N*N scenarios to ensure complete coverage. This problem will appear as the number of API interfaces increases. k The complexity of (N to the kth power when exhaustively enumerating scripts for N scenarios and k APIs) is greater than 100%. When the requirements change further and the API changes, the workload of writing the test case code will be further increased. Based on this, an effective technical solution is urgently needed to solve the above problems.

[0024] In this specification, an object testing method is provided. This specification also relates to an object testing apparatus, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0025] See also Figure 1 , Figure 1 A flow chart of an object testing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0026] Step 102: In response to a test instruction for an initial test interface corresponding to a target object, determine at least two next test interfaces associated with the initial test interface according to an object test protocol, wherein the object test protocol is used to describe multiple object test scenarios of the target object, and the multiple object test scenarios are determined based on multiple test interfaces, and the initial test interface and the at least two next test interfaces all belong to the multiple test interfaces.

[0027] Specifically, the object testing method provided in the embodiments of this specification can be applied to the front end.

[0028] Among them, the target object can be understood as the object to be tested, such as a web page, a game, a function developed in the platform, etc. The initial test interface corresponding to the target object can be understood as the test entry of the target object, and the test instruction can be understood as the instruction to test the target object.

[0029] See also Figure 2 , Figure 2 FIG. 1 shows a schematic diagram of an object test in an object testing method provided according to an embodiment of the present specification, such as Figure 2 As shown in (a), in actual applications, the object test scenario may include scenario 1 and scenario 2, and the test interface may include interface A and interface B. During the test process, scenario 1 and scenario 2 may be constructed based on interface A and interface B. For example, after the test entry of the target object enters the test interface, four test cases may be obtained by exhaustively performing permutations and combinations: interface A to scenario 1 and interface B to scenario 1, interface A to scenario 1 and interface B to scenario 2, interface A to scenario 2 and interface B to scenario 1, and interface A to scenario 2 and interface B to scenario 2. However, according to one embodiment of the present specification, as Figure 2 As shown in (b), after entering the test interface at the test entrance of the target object, you can choose to enter interface A to scene 1 or interface A to scene 2 at the first selection branch point. After the selection, you can choose to enter interface B to scene 1 or interface B to scene 2 at the second selection branch point, thus avoiding the complexity and tediousness of the test caused by the aforementioned exhaustive enumeration.

[0030] Among them, the object test scenario can be understood as the test steps for the target object, and the test interface can be understood as the test interface corresponding to the test step. For example, in the process of testing the shopping cart function of the target object for an e-commerce platform, the object test scenario can be a user login scenario. Then a test interface corresponding to the object test scenario may return multiple situations including a successful login test interface (i.e., a successful login branch) and a failed login test interface (i.e., a failed login branch). The successful login test interface and the failed login test interface can also be used as test interfaces in the object test scenario to continue testing the situation after a successful login and the situation after a failed login. The at least two next test interfaces associated with the initial test interface can be understood as the next test interface after the initial test interface. For example, in the process of testing the shopping cart function of the target object for an e-commerce platform, at least two next test interfaces after entering the test entrance are a successful login test interface and a failed login test interface. The object testing protocol is a protocol agreed upon by the front-end and back-end of the target object test. The object testing protocol describes all object testing scenarios of the target object. For example, the object testing scenarios may include user login scenarios, product browsing scenarios, product selection scenarios, adding products to the shopping cart scenarios, modifying the number of products in the shopping cart scenarios, applying coupons or promotional activities scenarios, settlement process scenarios, payment operation scenarios, order confirmation scenarios, etc.

[0031] In actual applications, for multiple object test scenarios and the test interface corresponding to each object test scenario, it is necessary to involve test cases for each object test scenario and its corresponding selection branch, and the test cases of subsequent steps may depend on the results of the previous steps. With the increase of steps and branches, the possible test path combinations grow exponentially. It is necessary to create test cases for each test path combination, resulting in a sharp increase in test cases. It takes a lot of time to execute all test cases, which may lead to an extension of the test cycle. As the number of test cases increases, it is more difficult to manage and maintain test cases. During the testing process, it is more challenging to ensure that all test path combinations are covered, and it is easy to miss key scenarios. Any changes in requirements may affect multiple test cases and need to be re-evaluated and updated.

[0032] Based on this, in response to a test instruction of a test entry of a target object issued by an object tester, at least two next test interfaces after the test entry may be determined according to the object test protocol.

[0033] In addition, when it is determined that there is only one next test interface associated with the initial test interface, the next test interface can be directly entered for testing without selection.

[0034] In practical applications, before responding to the test instruction of the initial test interface corresponding to the target object, the method further includes: Receiving an object test protocol of the target object in a preset format; According to the object test protocol in the preset format, an initial test interface in the preset format is generated and displayed on the test interface of the target object.

[0035] The preset format can be understood as the data format of the object test protocol. The object test protocol can be, for example, an object test document written and output by the backend.

[0036] Specifically, it can receive an object test protocol in a preset format for the target object sent by the backend, and generate a test entry in a preset format based on the object test protocol in the preset format and display it on the test interface of the target object, so that subsequent object testers can click on the test entry on the test interface to start the test.

[0037] In actual applications, the object test for the target object can be divided into the front-end and the back-end. The front-end can execute the above object test method. For back-end development, since the back-end is very clear about the API interface developed or designed by itself, edge scenarios such as normal or abnormal will be reflected in its logic. Before the back-end delivers the API interface, it often conducts relevant back-end tests to ensure that it meets the delivery standards. At this point, the back-end development delivers the API agreement document (i.e., the object test protocol) after completing the test. The document will describe all API test states or scenarios. For example, the back-end can output it in JSON format, and the front-end development can generate standard front-end API docking code and test branches (i.e., test interfaces) based on such JSON format. Among them, the object test protocol in JSON format can include the interface name field, interface request path, request parameters, and error codes used to indicate the interface return and their corresponding exception descriptions. When the status code is 1, it means success, that is, entering the main process branch (i.e., the branch with subsequent object test scenarios), and the others are data exception branches.

[0038] In summary, by using the object test document output by the backend as the simulation standard for the frontend test, the test interface is simulated according to the object test document, ensuring the accuracy of the simulated interface data. In addition, it can flexibly and dynamically configure project-based test data, supporting object testing such as development, testing, grayscale, and online web page dynamics.

[0039] Similarly, in the process of determining at least two next test interfaces and subsequently determining the target test interface, interface data may be simulated and a test interface may be generated according to the object test protocol, which is not limited in the embodiments of this specification.

[0040] Step 104: Determine a target test interface from the at least two next test interfaces according to a preset test rule.

[0041] The preset test rule can be understood as a test rule for a target object. The target test interface can be understood as one of the test interfaces selected from at least two next test interfaces.

[0042] In specific implementation, the preset test rules include automatic test rules and manual test rules; Before determining the target test interface from the at least two next test interfaces according to the preset test rule, the method further includes: According to the rule tag, determining that the preset test rule is the automatic test rule or the manual test rule; The step of determining the target test interface from the at least two next test interfaces according to the preset test rule includes: determining a target test interface from the at least two next test interfaces according to the automatic test rule; or According to the manual test rule, a target test interface is determined from the at least two next test interfaces.

[0043] Among them, the rule mark can be understood as the URL address bar mark. The automatic test rule can be understood as the rule that automatically selects the target test interface to implement the test of the target object after responding to the test instruction of the tester. The manual test rule can be understood as the rule that the tester manually selects the target test interface to implement the test of the target object after responding to the test instruction of the tester.

[0044] Based on this, it is possible to determine whether to start the front-end interface simulation test according to the URL address bar mark. If so, the preset test rule is determined to be a manual test rule. If not, the preset test rule is determined to be an automatic test rule, and the target test interface is determined from at least two next test interfaces based on the automatic test rule or the manual test rule.

[0045] In actual applications, front-end development needs to decide whether to turn on the API Mock test on the web page. In one embodiment of this specification, the switch can be determined by hard coding in the code. In another embodiment of this specification, the information of the API Mock switch can be transmitted through the URL address. The URL address contains a marker field for whether to turn on or off the MOCK. When the field is 1, it means it is turned on. The object tester can add the parameter "__MOCK__=1" in the URL address bar of the web page to enter the manual Mock API test mode (i.e. trigger the manual test rule). When the tester initiates a matching API interface request through the test interface, the pop-up window in the figure below will be triggered. The tester can manually select the branch to be tested according to the pop-up window. When the parameter "__MOCK__=AUTO" is entered in the URL address bar, the automatic test mode is turned on (i.e., the automatic test rule is triggered), and the page will directly return the default marked by the tester in the Mock data as the return data.

[0046] In summary, the front end selects the test interface manually or automatically to test different test branches and achieve more comprehensive coverage of all test scenarios.

[0047] In one embodiment of the present specification, determining the target test interface from the at least two next test interfaces according to the automatic test rule includes: According to the automatic test rule, determining any one of the at least two next test interfaces as the target test interface; or According to the automatic test rule, each of the at least two next test interfaces is sequentially determined as the target test interface.

[0048] Specifically, in the automatic testing mode, any one of the at least two next test interfaces can be determined as the target test interface according to the automatic testing rules to implement targeted testing of the target object, or each of the at least two next test interfaces can be determined as the target test interface in turn to implement comprehensive coverage testing of the target object.

[0049] In another embodiment of the present specification, after determining at least two next test interfaces associated with the initial test interface according to the object test protocol, the method further includes: Displaying the at least two next test interfaces on the test interface of the target object; The step of determining a target test interface from the at least two next test interfaces according to the manual test rule comprises: According to the selection instruction for the at least two next test interfaces in the test interface, the test interface corresponding to the selection instruction in the at least two next test interfaces is determined as the target test interface.

[0050] The test interface corresponding to the click instruction may be understood as one of the test interfaces selected by the object tester from at least two next test interfaces.

[0051] Specifically, at least two next test interfaces can be displayed in the test interface of the target object, and based on the selection instructions of the object tester on at least two next test interfaces in the test interface, the test interface selected by the object tester among the at least two test interfaces can be determined as the target test interface.

[0052] In actual applications, when branch selection is required, a selection pop-up window will pop up on the test interface. Testers can select in the pop-up window according to the test branch they are concerned about. For example, the pop-up window is the "request account and password login" test scenario, and at least two next test interfaces are provided, including: login success interface, illegal account name interface, account banned interface, and incorrect password interface. If the tester wants to test "account banned", just select the interface directly. At this time, the interface selection will simulate the server request to return the interface data of "account banned". If there are other branches under this specific branch after the "account banned" interface (that is, at least two next test interfaces are associated with the target test interface), the above-mentioned similar mode process will trigger the pop-up window (branch selection) again.

[0053] In summary, by manually selecting branches, more boundary test scenarios can be covered, avoiding the tedious work of writing fixed simulation code for each return scenario, and reducing the time and energy investment of front-end developers in interface simulation.

[0054] In practical applications, after determining the target test interface from the at least two next test interfaces according to the preset test rule, the method further includes: According to the object test protocol, simulating the interface data corresponding to the target test interface; A test result corresponding to the target test interface is determined according to the interface data.

[0055] The test result can be understood as whether the interface data corresponding to the target test interface meets the expected result.

[0056] In actual applications, the interface data corresponding to the target test interface can be simulated according to the object test protocol, and the interface data can be returned to the test interface. Based on the interface data, it can be determined whether the interface data meets the expected or development requirements.

[0057] In summary, dynamic simulation technology reduces the workload of updating simulation interfaces due to changes in back-end interfaces, simplifies the test case writing and management process, and can quickly adapt to changes in back-end interfaces and update simulation data in a timely manner.

[0058] In addition, after simulating the interface data corresponding to the target test interface, the method further includes: According to preset conversion rules, data conversion is performed on the interface data corresponding to the target test interface to obtain standardized interface data; Determining the test result corresponding to the target test interface according to the interface data includes: According to the standardized interface data, a test result corresponding to the target test interface is determined.

[0059] In actual applications, the standardized interface data can be in JSON format, which expresses the following information: the entire JSON uses the URL as its object key, and the value is expressed in an array; each item in the array is a test Mock test case. The standardized interface data includes a test case name field, a request parameter field, and an error code representing the error code returned by the interface and its corresponding exception description, where status code 1 represents success, that is, the main process branch, and the others are data exception branches. The use case name field can be used for manual testing so that testers can directly select the data / scenario that the interface will return.

[0060] See also Figure 3 , Figure 3 FIG. 1 shows a schematic diagram of data conversion in an object testing method provided according to an embodiment of the present specification, such as Figure 3 As shown, in order to ensure that the front-end Mock API data does not depend on the back-end Mock API, the back-end Mock API data is converted into the standardized front-end Mock API data, and the front-end standardized Mock API data is used as the front-end part to depend on the front-end part through the API interface layer, forming a basic dependency flip.

[0061] In summary, through data conversion, the front-end's dependence on the back-end is reduced, thereby ensuring the efficiency of front-end object testing.

[0062] Step 106: Determine at least two next test interfaces associated with the target test interface according to the object test protocol, and continue to execute the step of determining the target test interface from the at least two next test interfaces according to the preset test rules to test the target object.

[0063] Among them, the at least two next test interfaces associated with the target test interface can be understood as at least two next test interfaces after the target test interface. For example, if the target test interface is a login failure test interface, then the at least two next test interfaces associated with the target test interface can be a password error interface, an account does not exist interface, and a session timeout interface. Or, for example, if the target test interface is a login success test interface, then after the login success test interface, the browsing product test scene will be entered. The at least two next test interfaces associated with the login success test interface can be a normal product display interface, a product information loading failure interface, and a product has been removed from the shelf interface. By analogy, there can also be a next test interface after the normal product display interface, and this specification embodiment does not limit this. Then, from the login success test interface to the next browsing product test scene is the main process branch.

[0064] Specifically, after determining at least two next test interfaces associated with the target test interface according to the object test protocol, you can continue to determine a new target test interface from at least two next test interfaces according to the preset test rules, and so on, until there is no next test interface after the target test interface, so as to complete the test of the target object.

[0065] In addition, all test interface data can be centrally managed through the interface management platform, and test interface data can be dynamically added or deleted. The interface management platform can also be privately deployed to achieve security isolation and avoid leakage of sensitive information.

[0066] In summary, in the above method, by setting an object test protocol, describing multiple test scenarios of the target object, and in response to the test instruction of the initial test interface corresponding to the target object, at least two next test interfaces associated with the initial test interface are determined according to the object test protocol, and the target test interface is determined from at least two next test interfaces according to the preset test rules, and at least two next test interfaces associated with the target test interface are determined according to the object test protocol, and the step of determining the target test interface from at least two next test interfaces according to the preset test rules is continued, thereby realizing the test of the target object. Moreover, during the test process, different test interfaces can be dynamically selected, thereby realizing the dynamic selection of different branches, improving the flexibility of object testing, and there is no need to write a test script containing all test branches, reducing the complexity of the test process, thereby ensuring test efficiency.

[0067] Corresponding to the above method embodiment, this specification also provides an object testing device embodiment, Figure 4 FIG. 1 is a schematic diagram showing the structure of an object testing device provided by an embodiment of the present specification. Figure 4 As shown, the device comprises: A first determination module 402 is configured to, in response to a test instruction for an initial test interface corresponding to a target object, determine at least two next test interfaces associated with the initial test interface according to an object test protocol, wherein the object test protocol is used to describe a plurality of object test scenarios of the target object, the plurality of object test scenarios are determined according to a plurality of test interfaces, the initial test interface and the at least two next test interfaces both belonging to the plurality of test interfaces; A second determination module 404 is configured to determine a target test interface from the at least two next test interfaces according to a preset test rule; The third determination module 406 is configured to determine at least two next test interfaces associated with the target test interface according to the object test protocol, and continue to execute the step of determining the target test interface from the at least two next test interfaces according to the preset test rules to test the target object.

[0068] In an optional embodiment, the preset test rules include automatic test rules and manual test rules; The second determining module 404 is further configured to: According to the rule tag, determining that the preset test rule is the automatic test rule or the manual test rule; determining a target test interface from the at least two next test interfaces according to the automatic test rule; or According to the manual test rule, a target test interface is determined from the at least two next test interfaces.

[0069] In an optional embodiment, the second determining module 404 is further configured to: According to the automatic test rule, determining any one of the at least two next test interfaces as the target test interface; or According to the automatic test rule, each of the at least two next test interfaces is sequentially determined as the target test interface.

[0070] In an optional embodiment, the second determining module 404 is further configured to: Displaying the at least two next test interfaces on the test interface of the target object; According to the selection instruction for the at least two next test interfaces in the test interface, the test interface corresponding to the selection instruction in the at least two next test interfaces is determined as the target test interface.

[0071] In an optional embodiment, the second determining module 404 is further configured to: According to the object test protocol, simulating the interface data corresponding to the target test interface; A test result corresponding to the target test interface is determined according to the interface data.

[0072] In an optional embodiment, the second determining module 404 is further configured to: According to preset conversion rules, data conversion is performed on the interface data corresponding to the target test interface to obtain standardized interface data; According to the standardized interface data, a test result corresponding to the target test interface is determined.

[0073] In an optional embodiment, the device further includes a communication module configured to: Receiving an object test protocol of the target object in a preset format; According to the object test protocol in the preset format, an initial test interface in the preset format is generated and displayed on the test interface of the target object.

[0074] In summary, in the above-mentioned device, by setting an object test protocol, describing multiple test scenarios of the target object, and in response to the test instruction of the initial test interface corresponding to the target object, at least two next test interfaces associated with the initial test interface are determined according to the object test protocol, and the target test interface is determined from at least two next test interfaces according to the preset test rules, and at least two next test interfaces associated with the target test interface are determined according to the object test protocol, and the step of determining the target test interface from at least two next test interfaces according to the preset test rules is continued, thereby realizing the test of the target object. Moreover, during the test process, different test interfaces can be dynamically selected, thereby realizing the dynamic selection of different branches, improving the flexibility of object testing, and there is no need to write a test script containing all test branches, reducing the complexity of the test process, thereby ensuring test efficiency.

[0075] The above is a schematic scheme of an object testing device of this embodiment. It should be noted that the technical scheme of the object testing device and the technical scheme of the object testing method described above are of the same concept, and the details not described in detail in the technical scheme of the object testing device can be found in the description of the technical scheme of the object testing method described above.

[0076] Figure 5 The structure block diagram of a computing device 500 provided according to an embodiment of the present specification is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0077] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0078] In one embodiment of the present application, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0079] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.

[0080] The processor 520 is used to execute the following computer program / instructions, which implement the steps of the above-mentioned object testing method when executed by the processor.

[0081] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the object testing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object testing method embodiment.

[0082] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned object testing method when executed by a processor.

[0083] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the object testing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object testing method embodiment.

[0084] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned object testing method when executed by a processor.

[0085] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the object testing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be found in the description of the technical scheme of the object testing method described above.

[0086] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0087] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0088] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0089] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0090] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. An object testing method, characterized in that: include: In response to a test instruction for an initial test interface corresponding to a target object, determining at least two next test interfaces associated with the initial test interface according to an object test protocol, wherein the object test protocol is used to describe a plurality of object test scenarios of the target object, the plurality of object test scenarios are determined according to a plurality of test interfaces, the initial test interface and the at least two next test interfaces both belonging to the plurality of test interfaces; Determining a target test interface from the at least two next test interfaces according to a preset test rule; At least two next test interfaces associated with the target test interface are determined according to the object test protocol, and the step of determining the target test interface from the at least two next test interfaces according to the preset test rules is continued to test the target object.

2. The method according to claim 1, characterized in that The preset test rules include automatic test rules and manual test rules; Before determining the target test interface from the at least two next test interfaces according to the preset test rule, the method further includes: According to the rule tag, determining that the preset test rule is the automatic test rule or the manual test rule; The step of determining the target test interface from the at least two next test interfaces according to the preset test rule includes: determining a target test interface from the at least two next test interfaces according to the automatic test rule; or According to the manual test rule, a target test interface is determined from the at least two next test interfaces.

3. The method according to claim 2, characterized in that The step of determining a target test interface from the at least two next test interfaces according to the automatic test rule comprises: According to the automatic test rule, determining any one of the at least two next test interfaces as the target test interface; or According to the automatic test rule, each of the at least two next test interfaces is sequentially determined as the target test interface.

4. The method according to claim 2, characterized in that: After determining at least two next test interfaces associated with the initial test interface according to the object test protocol, the method further includes: Displaying the at least two next test interfaces on the test interface of the target object; The step of determining a target test interface from the at least two next test interfaces according to the manual test rule comprises: According to the selection instruction for the at least two next test interfaces in the test interface, the test interface corresponding to the selection instruction in the at least two next test interfaces is determined as the target test interface.

5. The method according to any one of claims 1 to 4, characterized in that: After determining the target test interface from the at least two next test interfaces according to the preset test rule, the method further includes: According to the object test protocol, simulating the interface data corresponding to the target test interface; A test result corresponding to the target test interface is determined according to the interface data.

6. The method according to claim 5, characterized in that After simulating the interface data corresponding to the target test interface, the method further includes: According to preset conversion rules, data conversion is performed on the interface data corresponding to the target test interface to obtain standardized interface data; Determining the test result corresponding to the target test interface according to the interface data includes: A test result corresponding to the target test interface is determined according to the standardized interface data.

7. The method according to claim 1, characterized in that Before responding to the test instruction of the initial test interface corresponding to the target object, the method further includes: Receiving an object test protocol of the target object in a preset format; According to the object test protocol in the preset format, an initial test interface in the preset format is generated and displayed on the test interface of the target object.

8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. A computer program product, characterized in that The method comprises a computer program / instruction which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.