Interface testing method, device, equipment and storage medium
By combining the test sets and testing the joint debugging scenarios, the joint debugging access results are generated, which solves the joint debugging failure caused by inconsistent understanding of front and back-end developers, and improves the efficiency and success rate of joint debugging.
Patent Information
- Application Number
- CN202011372015.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-04-08
AI Technical Summary
During the software development process, front-end and back-end developers have inconsistent understanding of software design, resulting in joint debugging failure. It requires multiple modifications to the design and re-commissioning, which is time-consuming and inefficient.
By combining the information of multiple test sets, a merged test set is generated, and the pre-set joint debugging scenarios are tested before joint debugging, and the operation results are obtained, and then the joint debugging admission results are sent to indicate each operation result.
Generate joint debugging access results before joint debugging, allowing developers to view the operation results of each joint debugging scenario, avoid joint debugging failures caused by different understandings, and reduce the failure rate of joint debugging.
Smart Images

Figure CN112363949B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to an interface testing method, device, equipment, and storage medium. Background Art
[0002] With the improvement of terminal equipment hardware performance and the development of Internet technology, more and more feature-rich software has been developed. At the same time, as the functional complexity of these softwares increases, the workload required to develop these softwares is also large.
[0003] In order to improve the efficiency of software development, there is currently a joint development model. Front-end developers and back-end developers independently develop according to the software design. Front-end personnel carry out front-end interface, static page and other development work according to the software design, and back-end personnel carry out interface development work according to the software design. Finally, the front-end and back-end developers connect and conduct joint debugging. After successful debugging, the software can be launched.
[0004] However, during the joint debugging process, front-end and back-end developers often have different understandings of software design, which leads to joint debugging failure. Both parties need to modify the design multiple times and re-perform joint debugging, making the entire joint debugging process time-consuming and inefficient, thereby prolonging software development time. Summary of the invention
[0005] The embodiments of the present disclosure provide an interface testing method, apparatus, device and storage medium to solve the problem of high failure rate of joint debugging test in the prior art.
[0006] In a first aspect, an embodiment of the present disclosure provides an interface testing method comprising:
[0007] Merging the test sets according to information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario;
[0008] In response to a test instruction for the joint debugging scenario, the joint debugging scenario is run to obtain an operation result corresponding to the joint debugging scenario;
[0009] In response to the admission sending operation for the combined test set, a joint debugging admission result corresponding to the combined test set is sent to the target terminal, and the joint debugging admission result is used to indicate each of the running results.
[0010] In a second aspect, an embodiment of the present disclosure provides an interface testing device, including:
[0011] A merging unit, configured to merge the test sets according to information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario;
[0012] A testing unit, configured to respond to a test instruction for the joint debugging scenario, run the joint debugging scenario, and obtain an operation result corresponding to the joint debugging scenario;
[0013] The sending unit is used to respond to the admission sending operation for the combined test set and send the joint debugging admission result corresponding to the combined test set to the target terminal, wherein the joint debugging admission result is used to indicate each of the running results.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
[0015] The memory stores computer-executable instructions;
[0016] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the interface testing method described in the first aspect and various possible designs of the first aspect.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the interface testing method described in the first aspect and various possible designs of the first aspect is implemented.
[0018] The interface testing method, apparatus, equipment and storage medium provided in this embodiment merge test sets according to the information of multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario; in response to the test instruction for the joint debugging scenario, the joint debugging scenario is run to obtain the running result corresponding to the joint debugging scenario; in response to the access sending operation for the merged test set, the joint debugging access result corresponding to the merged test set is sent to the target terminal, and the joint debugging access result is used to indicate each running result. The interface testing method, apparatus, equipment and storage medium provided in this embodiment can generate the joint debugging access result before the joint debugging, so that before the joint debugging, the running results of each joint debugging scenario can be viewed through the joint debugging access result, avoiding the failure of the joint debugging due to different understanding of the interface, thereby reducing the failure rate of the joint debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1A schematic diagram of a software development process in the prior art;
[0021] Figure 2 Schematic diagram of the interface testing method provided in the embodiment of the present disclosure Figure 1 ;
[0022] Figure 3A A schematic diagram of a first user interface provided in an embodiment of the present disclosure;
[0023] Figure 3B A schematic diagram of a second user interface provided in an embodiment of the present disclosure;
[0024] Figure 3C A schematic diagram of a third user interface provided in an embodiment of the present disclosure;
[0025] Figure 3D A schematic diagram of a fourth user interface provided in an embodiment of the present disclosure;
[0026] Figure 3E A fifth user interface schematic diagram provided for an embodiment of the present disclosure;
[0027] Figure 4 Schematic diagram of the interface testing method provided in the embodiment of the present disclosure Figure 2 ;
[0028] Figure 5A A sixth user interface schematic diagram provided for an embodiment of the present disclosure;
[0029] Figure 5B A seventh user interface schematic diagram provided for an embodiment of the present disclosure;
[0030] Figure 5C An eighth user interface schematic diagram provided for an embodiment of the present disclosure;
[0031] Figure 5D A ninth user interface schematic diagram provided for an embodiment of the present disclosure;
[0032] Figure 6 A structural block diagram of an interface testing device provided in an embodiment of the present disclosure;
[0033] Figure 7 A structural block diagram of another interface testing device provided by an embodiment of the present disclosure;
[0034] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0036] refer to Figure 1 , Figure 1 This is a schematic diagram of a software development process in the prior art. In order to improve the efficiency of software development, the front-end and back-end independent development operation mode is often adopted in the software development process. The front-end developer 11 develops the static pages, front-end interface, etc. of the software according to the software design plan, and the back-end developer 12 develops the software interface according to the software design plan. After the front-end developer 11 and the back-end developer 12 have completed the development, the front-end and back-end are jointly debugged.
[0037] However, joint debugging often fails, requiring adjustments to the development content and re-joint debugging, which results in a long software development cycle. This mismatch is mainly caused by the different understandings of the interface definitions in the software design plan between the front-end developers and the back-end developers.
[0038] In order to solve the above technical problems, in the solution provided by the present invention, joint debugging scenarios for various interfaces are pre-set, and these joint debugging scenarios can be tested to obtain operation results, and then the joint debugging access results indicating these operation results are sent to the target terminal, such as to the terminal device of the front-end developer, so that the front-end developer can understand the runtime status of each interface before the joint debugging, and then when there is a difference in understanding between the front-end developer and the back-end developer, the development content can be adjusted before the joint debugging, thereby reducing the failure rate of the joint debugging.
[0039] refer to Figure 2 , Figure 2 Schematic diagram of the interface testing method provided in the embodiment of the present disclosure Figure 1 The interface test method includes:
[0040] Step 201, merging the test sets according to information of multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario.
[0041] The method provided by the present disclosure may be executed by an electronic device with computing capabilities, such as a server.
[0042] The test set may be pre-set by the developer on the user terminal side. For example, after the back-end developer has developed the interface, he or she may create a test set and import the developed interface into the test set.
[0043] Figure 3A A schematic diagram of a first user interface provided in an embodiment of the present disclosure.
[0044] like Figure 3A As shown, the backend developer's user terminal can display the following Figure 3A The interface shown on the left in FIG. The backend developer can click the button 31 for creating a test set in the interface to create a test set.
[0045] Furthermore, after clicking the test set creation instruction, the user terminal may also display an interface for entering the test set name, such as Figure 3A The user can enter the test set name in the name entry component 32.
[0046] Specifically, the user terminal may send the created test set to the server, so that the server may process the received test set.
[0047] In an optional implementation, an interface test platform may also be provided, and the interface test platform may be provided in a user terminal and a server. For example, the interface test platform may be provided in a terminal device used by a back-end developer, and the interface test platform may also be provided in a server. When a developer creates a test set in the interface test platform provided in the user terminal, the test set may also be synchronized to the interface test platform provided in the server.
[0048] Optionally, the user can also directly create an interface in the interface testing platform and develop the interface in the testing platform. In this way, the user-developed interface can also be synchronized in the interface testing platform.
[0049] In actual application, the test set name can also be standardized. For example, the test set name can be "Requirement_Personal Name". The requirement refers to the task requirement to which the interface belongs, and the personal name refers to the name of the interface developer.
[0050] After creating a test set, you can import the developed interface into the test set.
[0051] Figure 3B A schematic diagram of a second user interface provided in an embodiment of the present disclosure.
[0052] like Figure 3BAs shown, the developer can operate the test set 33 to import the interface. For example, the developer can right-click the test set 33 to trigger the user terminal to display the operable option 34, which may include the option 35 for importing the interface. The user can click the option 35 for importing the interface, so that the user interface displays the interface selection box 36, and the user can operate the interface selection box 36 to select the interface to be imported.
[0053] Optionally, a component for inputting project information may be provided in the interface selection box 36 so that the user can select a project to be tested therein, and the electronic device can display an interface corresponding to the project.
[0054] Specifically, a corresponding joint debugging scenario can be created for each interface.
[0055] Figure 3C A schematic diagram of a third user interface provided in an embodiment of the present disclosure.
[0056] like Figure 3C As shown, the user can operate the interface 37 in the test set 33 to create a joint debugging scenario for the interface 37. For example, the user can click a button 38 for creating an interface joint debugging scenario. The user terminal can respond to this operation and display a scenario name input component 39, in which the user can enter a scenario name to create the joint debugging scenario.
[0057] An interface can have multiple joint debugging scenarios, and the specific number of joint debugging scenarios can be set according to needs.
[0058] In an optional implementation, the front-end developer and the back-end developer may communicate to determine the scenarios that need to be tested, and the back-end developer may create joint debugging scenarios for each interface based on the determined scenarios.
[0059] After each developer has created a test set, these test sets can be synchronized to the server. These test sets can be merged in the server to obtain a merged test set.
[0060] Figure 3D A schematic diagram of a fourth user interface provided in an embodiment of the present disclosure.
[0061] Specifically, it can be displayed on the server as follows Figure 3D The interface shown may display multiple test sets and may also include a button 310 for merging test sets. A user may click the button 310 to trigger the server to merge the test sets.
[0062] Furthermore, the server may merge interfaces in multiple test sets into the same test set to obtain a merged test set. For example, there are a first test set, a second test set, and a third test set, each of which includes several interfaces, and the interfaces of each test set may be placed in one test set.
[0063] In actual application, the test set information may further include requirement information. For example, if the interface in the first test set is designed for a first requirement, the information of the first test set includes the first requirement.
[0064] The test sets can be merged according to the requirement information, and the test sets with the same requirement information can be merged. For example, if the information of the first test set includes the first requirement, the information of the second test set includes the first requirement, the information of the third test set includes the first requirement, and the information of the fourth test set includes the second requirement, then the first test set, the second test set, and the third test set can be merged, but the fourth test set is not merged with the three test sets.
[0065] Step 202, responding to the test instruction for the joint debugging scenario, running the joint debugging scenario to obtain the running result corresponding to the joint debugging scenario.
[0066] Specifically, the combined test set includes multiple interfaces, and each interface has a joint debugging scenario. These joint debugging scenarios can be tested one by one to obtain the running results of each joint debugging scenario.
[0067] Figure 3E A fifth user interface diagram provided for an embodiment of the present disclosure.
[0068] Furthermore, a test button 311 may be provided in the interface. The user may select a joint debugging scenario and click the test button 311, thereby triggering the server to test the joint debugging scenario.
[0069] In actual application, you can also set up a test environment.
[0070] For example, developers can test the interface locally. In this case, the test environment can be set to the local environment, that is, the developer's user terminal is used as the test environment. When testing the joint debugging scenario locally, call the interface in the local environment and run the interface based on the local environment.
[0071] For another example, when testing a joint debugging scenario in a server, the test environment can be set as a joint debugging environment, that is, the server is used as the test environment. When testing the joint debugging scenario in the server, the interface in the joint debugging environment is called and the interface is run based on the joint debugging environment. The interfaces developed by various developers can be deployed in the server in advance.
[0072] After receiving the test instruction for the joint debugging scenario, the server can run the joint debugging scenario and obtain the running result. The above operation can be performed on each joint debugging scenario in the combined test set to obtain the running result of each joint debugging scenario.
[0073] Step 203, in response to the admission sending operation for the combined test set, a joint debugging admission result corresponding to the combined test set is sent to the target terminal, where the joint debugging admission result is used to indicate each operation result.
[0074] Specifically, the server may be operated to perform an admission sending operation. For example, an admission sending button may be set in the display interface, and the user may click the button to send an admission sending operation for the combined test set to the server.
[0075] Furthermore, a target terminal identifier corresponding to the combined test set may be set. When the server receives the admission sending operation for the test set, the server may send the joint debugging admission result corresponding to the combined test set to the target terminal according to the preset target terminal identifier.
[0076] In actual application, the target terminal can be the terminal used by the front-end developer. After the joint debugging access result is sent to the target terminal, the front-end developer can view the running results of each joint debugging scenario in the merged test set through the joint debugging access result.
[0077] Among them, if the front-end developer views the running results of the joint debugging scenario and believes that the running results of the scenario do not meet their needs, they can communicate with the back-end developer to modify the design content. If the front-end developer views the running results of the joint debugging scenario and believes that the running results of the scenario meet their needs, they can conduct joint debugging with the back-end developer. Since the joint debugging scenario has been tested in advance and the front-end developer has a pre-understanding of the running results of each joint debugging scenario, the failure rate of joint debugging can be reduced.
[0078] From the above description, it can be seen that the interface testing method provided in this embodiment merges the test sets according to the information of multiple test sets to obtain a merged test set; wherein, the test set includes an interface, and the interface has a pre-set joint debugging scenario; in response to the test instruction for the joint debugging scenario, the joint debugging scenario is run to obtain the running result corresponding to the joint debugging scenario; in response to the access sending operation for the merged test set, the joint debugging access result corresponding to the merged test set is sent to the target terminal, and the joint debugging access result is used to indicate each running result. The interface testing method provided in this embodiment can generate a joint debugging access result before joint debugging, so that before joint debugging, the running results of each joint debugging scenario can be viewed through the joint debugging access result, avoiding the failure of joint debugging due to different understanding of the interface, thereby reducing the failure rate of joint debugging.
[0079] refer to Figure 4 , Figure 4 Schematic diagram of the interface testing method provided in the embodiment of the present disclosure Figure 2 The interface test method includes:
[0080] Step 401 , merging test sets with the same requirement information to obtain a merged test set, wherein the information of the test set includes the requirement information.
[0081] The method provided by the present disclosure may be executed by an electronic device with computing capabilities, such as a server.
[0082] The test set may contain test information, and the test information may include requirement information.
[0083] Specifically, when the server merges the test sets, it may merge the test sets with the same requirement information, thereby obtaining a merged test set consistent with the requirement information.
[0084] Furthermore, for example, if the information of the first test set and the second test set includes the same requirement information, the first test set and the second test set may be merged to obtain a merged test set corresponding to the requirement information.
[0085] The combined test set includes all interfaces in the first test set and the second test set. For example, if the first test set includes 2 interfaces and the second test set includes 3 interfaces, then the combined test set includes these 5 interfaces.
[0086] In actual application, the name of the test set can include requirement information. For example, when naming the test set, the requirement name can be written into the test set name. When the server merges the test sets, it can read the names of the various test sets, and then identify the target test sets with the same requirement name based on the names. These target test sets can be merged into the same test set, and specifically, the interfaces included in the target test set can be merged into the merged test set.
[0087] The merged test set can be named according to the requirement information. For example, the requirement name can be set as the name of the merged test set. For example, the name of test set 1 is "Requirement 1_Small A", and the name of test set 2 is "Requirement 1_Small B". After merging the test sets, the merged test set "Requirement 1" is obtained.
[0088] Step 402, in response to the operation of setting the operating environment, the operating environment is set as a joint debugging environment.
[0089] There is no limitation on the execution sequence of step 401 and step 402 .
[0090] In which, taking the electronic device as a server as an example, the test environment in the server can be tested, for example, the test environment can be selected as a joint debugging environment. The server can respond to this setting operation, so that the test environment can be set as a joint debugging environment.
[0091] Figure 5A A sixth user interface schematic diagram provided for an embodiment of the present disclosure.
[0092] like Figure 5A As shown, an environment setting component 51 is provided in the interface, and the component may be a selectable component. The user may click on the environment setting component 51 to select the joint debugging environment.
[0093] Step 403, responding to the test instruction of the joint debugging scenario, accessing the joint debugging environment according to the preset information corresponding to the joint debugging environment.
[0094] Specifically, the test instruction may be for one joint debugging scenario or for multiple joint debugging scenarios. For example, the user may select multiple joint debugging scenarios and then click the test button to send the test instructions for the selected joint debugging scenarios to the server.
[0095] Furthermore, after receiving the test instruction, the server may respond to the instruction and access the joint debugging environment according to the preset information corresponding to the joint debugging environment. The preset information corresponding to the joint debugging environment may include, for example, information such as cookies and URLs.
[0096] The preset information is pre-set. After the server receives the test instruction, it can obtain the preset information corresponding to the currently set joint debugging environment and access the joint debugging environment according to the information.
[0097] Step 404: call the interface corresponding to the joint debugging scenario to run the preset parameters corresponding to the joint debugging scenario to obtain the running result.
[0098] After receiving the test instruction, the server may call the interface corresponding to the joint debugging scenario included in the test instruction, and run the preset parameters corresponding to the joint debugging scenario through the interface to obtain the running result.
[0099] Among them, if a test environment is set in advance, the interface corresponding to the joint debugging scenario can be called in the set test environment. For example, if the test environment is set as a joint debugging environment, the interface can be called in the joint debugging scenario and run in the joint debugging scenario.
[0100] In actual application, preset parameters corresponding to each joint debugging scenario are pre-set, and the preset parameters are input parameters when the joint debugging scenario is running. For example, developers can set preset parameters for each joint debugging scenario when testing the joint debugging scenario in the local environment.
[0101] Figure 5B A seventh user interface schematic diagram provided for an embodiment of the present disclosure.
[0102] like Figure 5B As shown, the developer can operate the joint debugging scenario on the user terminal side and set the preset parameters of the joint debugging scenario. For example, the developer can select at least one joint debugging scenario 52 and click the test button 53. The user terminal can display a preset parameter input component 54, in which the user can enter the preset parameters corresponding to each joint debugging scenario.
[0103] Among them, when running a joint debugging scenario, the corresponding interface can be called, and the preset parameters corresponding to the joint debugging scenario can be used as input parameters of the interface. When the interface runs based on the input parameters, the running results can be obtained, and the running results can specifically be output parameters.
[0104] Step 405: compare the running result with the preset expectation corresponding to the joint debugging scenario.
[0105] Specifically, preset expectations for each joint debugging scenario can also be pre-set. After the joint debugging scenario is run, an operation result is obtained, and the operation result can be compared with the preset expectation to determine whether the joint debugging scenario test passes.
[0106] Furthermore, the preset expectation can be set before testing the joint debugging scenario on the user terminal side. For example, before testing the joint debugging scenario in the local environment, the developer can set the preset expectation of the joint debugging scenario, and when testing the interface on the server side, the preset expectation of each joint debugging scenario can be directly applied.
[0107] Figure 5C An eighth user interface schematic diagram provided for an embodiment of the present disclosure.
[0108] like Figure 5C As shown, the developer can operate the joint debugging scenario on the user terminal side and set the preset expectation of the joint debugging scenario. For example, the developer can click on the joint debugging scenario and click the setting button of the preset expectation. The user terminal can display the preset expectation input component 55, in which the user can enter the preset expectation corresponding to the joint debugging scenario.
[0109] Step 406: If the running result is consistent with the preset expectation, it is determined that the joint debugging scenario test has passed.
[0110] In actual application, the server can compare the running results of each joint debugging scenario with the corresponding preset expectations. If the two are consistent, it can be considered that the joint debugging scenario test has passed. Otherwise, it is considered that the test has failed.
[0111] Step 407: After all joint debugging scenarios in the combined test set have passed the test, in response to the admission sending operation for the combined test set, a joint debugging admission result corresponding to the combined test set is sent to the target terminal.
[0112] Among them, after each joint debugging scenario in the combined test set is tested and passed, the server can be operated to send the joint debugging access result to the target terminal.
[0113] In an optional implementation, the page address to which the merged test set belongs may be copied and sent to the target terminal, so that the target terminal user can view the running results of each joint debugging scenario based on the page address.
[0114] Step 408, in response to the locking operation on the joint debugging scenario, the joint debugging scenario is controlled not to be run again.
[0115] Specifically, the joint debugging scenario may be locked so that the server control joint debugging scenario will not be executed again.
[0116] Figure 5D A ninth user interface schematic diagram provided for an embodiment of the present disclosure.
[0117] like Figure 5D As shown, each joint debugging scenario has a lock button 56, which can be clicked to send a lock operation for the joint debugging scenario to the server.
[0118] The locked joint debugging scenario will not be executed again, thus preventing the running data of the joint debugging scenario from being overwritten due to misoperation.
[0119] When the server receives an invalid test instruction for a locked joint debugging scenario, the server refuses to respond to the invalid test instruction. After receiving the invalid test instruction, the server will not access the set test environment, and thus will not call the interface corresponding to the joint debugging scenario, and will not execute the invalid test instruction.
[0120] Corresponding to the interface testing method of the above embodiment, Figure 6 This is a structural block diagram of an interface testing device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 The device includes: a merging unit 61, a testing unit 62 and a sending unit 63.
[0121] The merging unit 61 is used to merge the test sets according to the information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario;
[0122] A testing unit 62, configured to respond to a test instruction for the joint debugging scenario, run the joint debugging scenario, and obtain an operation result corresponding to the joint debugging scenario;
[0123] The sending unit 63 is used to respond to the admission sending operation for the combined test set and send the joint debugging admission result corresponding to the combined test set to the target terminal, where the joint debugging admission result is used to indicate each of the running results.
[0124] Figure 7 This is a structural block diagram of another interface testing device provided in an embodiment of the present disclosure.
[0125] In one embodiment of the present disclosure, the information of the test set includes requirement information, and the merging unit 61 is specifically used to:
[0126] The test sets with the same requirement information are merged to obtain the merged test set.
[0127] In one embodiment of the present disclosure, the name of the test set includes the requirement information;
[0128] The merging unit 61 comprises:
[0129] A determination module 611, configured to determine a target test set including the same requirement information according to the name of the test set;
[0130] The merging module 612 is used to merge the interfaces included in the target test set into the merged test set.
[0131] In one embodiment of the present disclosure, the testing unit 62 is specifically used for:
[0132] In response to the test instruction for the joint debugging scenario, the interface corresponding to the joint debugging scenario is called to run the preset parameters corresponding to the joint debugging scenario to obtain the running result.
[0133] In one embodiment of the present disclosure, the preset parameters are set when the joint debugging scenario is tested on the user terminal side.
[0134] In one embodiment of the present disclosure, a setting unit 64 is further included, which is used to:
[0135] In response to an operation to set a test environment, the test environment is set as a joint debugging environment;
[0136] The testing unit 62 comprises:
[0137] An access module 621, configured to access the joint debugging environment according to preset information corresponding to the joint debugging environment;
[0138] The running module 622 is used to run the joint debugging scenario in the joint debugging environment to obtain the running result corresponding to the joint debugging scenario.
[0139] In one embodiment of the present disclosure, the device further includes a comparison unit 65, which is configured to, after the test unit 62 runs the joint debugging scenario and obtains an operation result corresponding to the joint debugging scenario:
[0140] Comparing the operation result with the preset expectation corresponding to the joint debugging scenario;
[0141] If the running result is consistent with the preset expectation, it is determined that the joint debugging scenario test has passed.
[0142] In one embodiment of the present disclosure, the preset expectation is set before the joint debugging scenario is tested on the user terminal side.
[0143] In one embodiment of the present disclosure, after all the joint debugging scenarios in the combined test set have passed the test, the sending unit 63 executes the step of responding to the access sending operation for the combined test set and sending the joint debugging access result corresponding to the combined test set to the target terminal.
[0144] In one embodiment of the present disclosure, the device further comprises a locking unit 66, which is used to:
[0145] In response to the locking operation on the joint debugging scenario, the joint debugging scenario is controlled not to be run again.
[0146] In one embodiment of the present disclosure, the locking unit 66 is specifically used for:
[0147] When receiving an invalid test instruction for the locked joint debugging scenario, refusing to respond to the invalid test instruction.
[0148] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0149] refer to Figure 8, which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure, and the electronic device 800 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0150] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0151] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0152] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0153] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0154] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0155] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0156] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0157] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0158] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0159] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0160] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0161] In a first aspect, according to one or more embodiments of the present disclosure, there is provided an interface testing method, comprising:
[0162] Merging the test sets according to information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario;
[0163] In response to a test instruction for the joint debugging scenario, the joint debugging scenario is run to obtain an operation result corresponding to the joint debugging scenario;
[0164] In response to the admission sending operation for the combined test set, a joint debugging admission result corresponding to the combined test set is sent to the target terminal, and the joint debugging admission result is used to indicate each of the running results.
[0165] According to one or more embodiments of the present disclosure, the information of the test set includes requirement information, and merging the test sets according to the information of multiple test sets to obtain a merged test set includes:
[0166] The test sets with the same requirement information are merged to obtain the merged test set.
[0167] According to one or more embodiments of the present disclosure, the name of the test set includes the requirement information;
[0168] The merging of the test sets having the same requirement information includes:
[0169] Determine a target test set including the same requirement information according to the name of the test set;
[0170] The interfaces included in the target test set are merged into the merged test set.
[0171] According to one or more embodiments of the present disclosure, in response to a test instruction for the joint debugging scenario, running the joint debugging scenario to obtain an operation result corresponding to the joint debugging scenario includes:
[0172] In response to the test instruction for the joint debugging scenario, the interface corresponding to the joint debugging scenario is called to run the preset parameters corresponding to the joint debugging scenario to obtain the running result.
[0173] According to one or more embodiments of the present disclosure, the preset parameters are set when the joint debugging scenario is tested on the user terminal side.
[0174] According to one or more embodiments of the present disclosure, the present invention further includes:
[0175] In response to an operation to set a test environment, the test environment is set as a joint debugging environment;
[0176] The running of the joint debugging scenario to obtain an operation result corresponding to the joint debugging scenario includes:
[0177] Accessing the joint debugging environment according to preset information corresponding to the joint debugging environment;
[0178] The joint debugging scenario is run in the joint debugging environment to obtain the running result corresponding to the joint debugging scenario.
[0179] According to one or more embodiments of the present disclosure, after running the joint debugging scenario to obtain an operation result corresponding to the joint debugging scenario, the method further includes:
[0180] Comparing the operation result with the preset expectation corresponding to the joint debugging scenario;
[0181] If the running result is consistent with the preset expectation, it is determined that the joint debugging scenario test has passed.
[0182] According to one or more embodiments of the present disclosure, the preset expectation is set before the joint debugging scenario is tested on the user terminal side.
[0183] According to one or more embodiments of the present disclosure, after each of the joint debugging scenarios in the combined test set has passed the test, the step of responding to the access sending operation for the combined test set and sending the joint debugging access result corresponding to the combined test set to the target terminal is executed.
[0184] According to one or more embodiments of the present disclosure, the present invention further includes:
[0185] In response to the locking operation on the joint debugging scenario, the joint debugging scenario is controlled not to be run again.
[0186] According to one or more embodiments of the present disclosure, controlling the joint debugging scenario not to be run again includes:
[0187] When receiving an invalid test instruction for the locked joint debugging scenario, refusing to respond to the invalid test instruction.
[0188] In a second aspect, according to one or more embodiments of the present disclosure, an interface testing device is provided, comprising:
[0189] A merging unit, configured to merge the test sets according to information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario;
[0190] A testing unit, configured to respond to a test instruction for the joint debugging scenario, run the joint debugging scenario, and obtain an operation result corresponding to the joint debugging scenario;
[0191] The sending unit is used to respond to the admission sending operation for the combined test set and send the joint debugging admission result corresponding to the combined test set to the target terminal, wherein the joint debugging admission result is used to indicate each of the running results.
[0192] According to one or more embodiments of the present disclosure, the information of the test set includes requirement information, and the merging unit is specifically used to:
[0193] The test sets with the same requirement information are merged to obtain the merged test set.
[0194] According to one or more embodiments of the present disclosure, the name of the test set includes the requirement information;
[0195] The merging unit comprises:
[0196] A determination module, used to determine a target test set including the same requirement information according to the name of the test set;
[0197] A merging module is used to merge the interfaces included in the target test set into the merged test set.
[0198] According to one or more embodiments of the present disclosure, the testing unit is specifically used for:
[0199] In response to the test instruction for the joint debugging scenario, the interface corresponding to the joint debugging scenario is called to run the preset parameters corresponding to the joint debugging scenario to obtain the running result.
[0200] According to one or more embodiments of the present disclosure, the preset parameters are set when the joint debugging scenario is tested on the user terminal side.
[0201] According to one or more embodiments of the present disclosure, the device further includes a setting unit, configured to:
[0202] In response to an operation to set a test environment, the test environment is set as a joint debugging environment;
[0203] The testing unit comprises:
[0204] An access module, used to access the joint debugging environment according to preset information corresponding to the joint debugging environment;
[0205] The running module is used to run the joint debugging scenario in the joint debugging environment to obtain the running result corresponding to the joint debugging scenario.
[0206] According to one or more embodiments of the present disclosure, the device further includes a comparison unit, which is configured to: after the test unit runs the joint debugging scenario and obtains an operation result corresponding to the joint debugging scenario:
[0207] Comparing the operation result with the preset expectation corresponding to the joint debugging scenario;
[0208] If the running result is consistent with the preset expectation, it is determined that the joint debugging scenario test has passed.
[0209] According to one or more embodiments of the present disclosure, the preset expectation is set before the joint debugging scenario is tested on the user terminal side.
[0210] According to one or more embodiments of the present disclosure, after each of the joint debugging scenarios in the combined test set has passed the test, the sending unit executes the step of responding to the access sending operation for the combined test set and sending the joint debugging access result corresponding to the combined test set to the target terminal.
[0211] According to one or more embodiments of the present disclosure, the device further includes a locking unit, configured to:
[0212] In response to the locking operation on the joint debugging scenario, the joint debugging scenario is controlled not to be run again.
[0213] According to one or more embodiments of the present disclosure, the locking unit is specifically used for:
[0214] When receiving an invalid test instruction for the locked joint debugging scenario, refusing to respond to the invalid test instruction.
[0215] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0216] The memory stores computer-executable instructions;
[0217] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the interface testing method described in the first aspect and various possible designs of the first aspect.
[0218] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the interface testing method described in the first aspect and various possible designs of the first aspect is implemented.
[0219] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0220] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0221] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An interface testing method, characterized in that: include: The test sets are merged according to information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, and the interface has a pre-set joint debugging scenario, and the joint debugging scenario is a scenario of joint debugging of front-end development and back-end development; In response to a test instruction for the joint debugging scenario, the joint debugging scenario is run to obtain an operation result corresponding to the joint debugging scenario; In response to the admission sending operation for the combined test set, sending a joint debugging admission result corresponding to the combined test set to a target terminal, wherein the joint debugging admission result is used to indicate each of the running results; In response to a test instruction for the joint debugging scenario, running the joint debugging scenario to obtain an operation result corresponding to the joint debugging scenario includes: In response to a test instruction for the joint debugging scenario, the interface corresponding to the joint debugging scenario is called to run the preset parameters corresponding to the joint debugging scenario to obtain the running result, where the preset parameters are set when the joint debugging scenario is tested on the user terminal side.
2. The method according to claim 1, characterized in that The information of the test set includes requirement information, and the test sets are merged according to the information of the multiple test sets to obtain a merged test set, including: The test sets with the same requirement information are merged to obtain the merged test set.
3. The method according to claim 2, characterized in that The name of the test set includes the requirement information; The merging of the test sets having the same requirement information includes: Determine a target test set including the same requirement information according to the name of the test set; The interfaces included in the target test set are merged into the merged test set.
4. The method according to any one of claims 1 to 3, characterized in that: Also includes: In response to an operation to set a test environment, the test environment is set as a joint debugging environment; The running of the joint debugging scenario to obtain an operation result corresponding to the joint debugging scenario includes: Accessing the joint debugging environment according to preset information corresponding to the joint debugging environment; The joint debugging scenario is run in the joint debugging environment to obtain the running result corresponding to the joint debugging scenario.
5. The method according to any one of claims 1 to 3, characterized in that: After the running of the joint debugging scenario obtains an operation result corresponding to the joint debugging scenario, the method further includes: Comparing the operation result with the preset expectation corresponding to the joint debugging scenario; If the running result is consistent with the preset expectation, it is determined that the joint debugging scenario test has passed.
6. The method according to claim 5, characterized in that The preset expectation is set before the joint debugging scenario is tested on the user terminal side.
7. The method according to claim 5, characterized in that After all the joint debugging scenarios in the combined test set have passed the test, the step of responding to the admission sending operation for the combined test set and sending the joint debugging admission result corresponding to the combined test set to the target terminal is performed.
8. The method according to any one of claims 1 to 3, characterized in that: Also includes: In response to the locking operation on the joint debugging scenario, the joint debugging scenario is controlled not to be run again.
9. The method according to claim 8, characterized in that The control that the joint debugging scenario will not be run again includes: When receiving an invalid test instruction for the locked joint debugging scenario, refusing to respond to the invalid test instruction.
10. An interface testing device, characterized in that: include: A merging unit, configured to merge the test sets according to information of the multiple test sets to obtain a merged test set; wherein the test set includes an interface, the interface has a pre-set joint debugging scenario, and the joint debugging scenario is a scenario of joint debugging of front-end development and back-end development; A testing unit, configured to respond to a test instruction for the joint debugging scenario, run the joint debugging scenario, and obtain an operation result corresponding to the joint debugging scenario; a sending unit, configured to respond to an admission sending operation for the combined test set and send a joint debugging admission result corresponding to the combined test set to a target terminal, wherein the joint debugging admission result is used to indicate each of the operation results; The testing unit is specifically used to respond to a test instruction for the joint debugging scenario, call the interface corresponding to the joint debugging scenario to run the preset parameters corresponding to the joint debugging scenario, and obtain the running result, wherein the preset parameters are set when the joint debugging scenario is tested on the user terminal side.
11. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the interface testing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the interface testing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Joint debugging test method, device and equipment of system and computer readable storage medium
CN109977012A
Joint debugging method and device, computer equipment and readable storage medium
CN111190596A