Interface testing method, device, equipment, medium and program product

By combining interactive test cases and dynamic test cases in API interface testing, executing in parallel, and using shared data pools and computing resource optimization, the problems of insufficient test coverage and inefficiency are solved, and more efficient and comprehensive testing is achieved.

CN119718947APending Publication Date: 2025-03-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411870103.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is prone to ignore user interaction and business processes in API interface testing, resulting in insufficient test coverage and difficult testing methods to make full use of computing resources, resulting in low efficiency.

Method used

By combining interactive test cases and dynamic test cases, it is executed in parallel on multiple computing nodes, using a shared data pool for data access, and allocating test tasks based on the availability of computing resources.

Benefits of technology

It shortens the API interface test time, improves test coverage and comprehensiveness, makes full use of computing resources, improves test execution efficiency, and saves storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718947A_ABST
    Figure CN119718947A_ABST
Patent Text Reader

Abstract

The invention provides an interface testing method, and relates to the field of distributed computing, the field of artificial intelligence or the field of financial science and technology. The method comprises the steps that in response to an interface test request for a target application, an interaction test case and a dynamic test case are obtained, the interaction test case indicates interaction behavior data of a simulation user and the target application, and the dynamic test case indicates interface behavior data of the target application; executing the interactive test case and the dynamic test case in parallel at a plurality of computing nodes; based on a shared data pool and the execution result of each computing node, an interface test result of the target application is obtained, and the shared data pool is provided for the computing nodes to conduct data access in the parallel execution process. The invention further provides an interface testing device and equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of distributed computing, artificial intelligence or financial technology, and more specifically, to an interface testing method, device, equipment, medium and program product. Background Art

[0002] Based on the rapid development of current software and network services, especially in the context of API (application programming interface) as a key component for interaction between software systems. With the popularity of cloud computing and microservice architecture, API plays an increasingly important role in system design. Therefore, it is crucial to effectively test API to ensure its quality, performance and security.

[0003] For example, you can perform static testing and dynamic testing on an API. Static testing involves checking source code or binary code to find potential errors and vulnerabilities. Dynamic testing involves monitoring the behavior of an API while it is running to find runtime errors or performance issues.

[0004] In the process of implementing the disclosed invention, the inventors found that static and dynamic testing often focuses on the code level, and may ignore the testing of user interactions and business processes, resulting in insufficient test coverage. In addition, some testing methods may not fully utilize computing resources, resulting in low test execution efficiency. Summary of the invention

[0005] In view of the above problems, the present disclosure provides an interface testing method, apparatus, device, medium and program product.

[0006] According to a first aspect of the present disclosure, an interface testing method is provided, comprising: in response to an interface testing request for a target application, obtaining interactive test cases and dynamic test cases, wherein the interactive test cases indicate interactive behavior data between a simulated user and the target application, and the dynamic test cases indicate interface behavior data of the target application; executing the interactive test cases and the dynamic test cases in parallel on multiple computing nodes; and obtaining interface testing results for the target application based on a shared data pool and the execution results of each computing node, wherein the shared data pool is provided to the multiple computing nodes for data access during the parallel execution process.

[0007] According to an embodiment of the present disclosure, the obtaining of interactive test cases and dynamic test cases includes: splitting the interactive test cases into N first subsets, and splitting the dynamic test cases into M second subsets; dividing all subsets into Y test tasks according to the dependency relationship between any two subsets of the N first subsets and the M second subsets, wherein the dependency relationship indicates the execution timing conditions or data interaction conditions followed during the parallel execution process, and N, M and Y are integers greater than or equal to 1 respectively.

[0008] According to an embodiment of the present disclosure, before dividing all subsets into Y test tasks, the method also includes: clustering the N first subsets and the M second subsets to obtain at least one clustering cluster; when each clustering cluster contains at least two subsets, obtaining the dependency relationship between any two of the subsets.

[0009] According to an embodiment of the present disclosure, before multiple computing nodes execute the interactive test cases and the dynamic test cases in parallel, the method also includes: evaluating the computing resources required for each of the Y test tasks; and allocating each test task to a corresponding computing node based on the available computing resources of each of the multiple computing nodes.

[0010] According to an embodiment of the present disclosure, allocating each test task to a corresponding computing node according to the respective available computing resources of the multiple computing nodes includes: obtaining the execution time and required computing resources of each test task; and allocating each test task to a corresponding computing node according to the respective available computing resources of the multiple computing nodes at different times.

[0011] According to an embodiment of the present disclosure, executing the interactive test cases and the dynamic test cases in parallel on multiple computing nodes includes: executing the Y test tasks in parallel on the multiple computing nodes to access data to the shared data pool.

[0012] According to an embodiment of the present disclosure, obtaining the interface test result of the target application based on the shared data pool and the execution result of each computing node includes: obtaining the test log in the parallel execution process from the shared data pool; and analyzing the test log and the execution result to obtain the interface test result.

[0013] Another aspect of an embodiment of the present disclosure provides an interface testing device, characterized in that the device includes: a use case acquisition module, used to obtain interactive test cases and dynamic test cases in response to an interface test request for a target application, wherein the interactive test cases indicate interactive behavior data between a simulated user and the target application, and the dynamic test cases indicate interface behavior data of the target application; a parallel execution module, used to execute the interactive test cases and the dynamic test cases in parallel on multiple computing nodes; a test result module, used to obtain interface test results for the target application based on a shared data pool and the execution results of each computing node, wherein the shared data pool is provided to the multiple computing nodes for data access during the parallel execution process.

[0014] Another aspect of an embodiment of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method described above.

[0015] Another aspect of an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor executes the method as described above.

[0016] Another aspect of an embodiment of the present disclosure provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0017] One or more of the above embodiments have the following beneficial effects: by combining interactive test cases with dynamic test cases, the time for testing the interface of the target application can be shortened by executing in parallel, simulating user interaction behavior and interface behavior can improve the coverage and comprehensiveness of the test, and can make full use of computing resources to improve the efficiency of test execution. It can also provide a data foundation for parallel execution of multiple computing nodes in the form of a shared data pool, closely combining interactive test cases with dynamic test cases in the data dimension, and can save storage resources and reduce the complexity of the test environment by reusing shared data. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0019] Figure 1 The application scenario diagram of the interface test according to the embodiment of the present disclosure is schematically shown;

[0020] Figure 2 A flowchart of an interface testing method according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 3 A flowchart of obtaining a test case according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 4 The following schematically shows an architecture diagram for allocating test tasks according to an embodiment of the present disclosure;

[0023] Figure 5 A structural block diagram of an interface testing device according to an embodiment of the present disclosure is schematically shown; and

[0024] Figure 6 A block diagram of an electronic device suitable for implementing an interface testing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0026] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0027] Figure 1 The following schematically shows an application scenario diagram of the interface test according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown are merely examples to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0028] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a distributed system 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the distributed system 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. Among them, the target application to be tested can be deployed on the remaining servers ( Figure 1 not shown).

[0029] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the distributed system 105 through the network 104, for example, to build interactive test cases and dynamic test cases, or send interface test requests using the first terminal device 101, the second terminal device 102, and the third terminal device 103. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0030] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0031] The distributed system 105 may include multiple computer nodes, each of which may be deployed in a server, which may be a server that provides various services, such as an independent physical server, or a cloud server that provides basic cloud computing services such as cloud services, cloud computing, network services, and middleware services.

[0032] For example, the application scenario 100 can provide a test environment, and make the test environment consistent with the production environment by configuring the server, database, network, etc., and select or develop an automated test framework suitable for the test requirements to support subsequent test execution.

[0033] It should be noted that the interface testing method provided in the embodiment of the present disclosure can generally be executed by at least one of a terminal device or a server. Accordingly, the interface testing device provided in the embodiment of the present disclosure can generally be set in at least one of a terminal device or a server.

[0034] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0035] The following will be based on Figure 1 The scene described by Figure 2~Figure 4 The interface testing method of the embodiment of the present disclosure is described in detail.

[0036] Figure 2 The flowchart of the interface testing method according to the embodiment of the present disclosure is schematically shown.

[0037] like Figure 2 As shown, this embodiment includes:

[0038] In operation S210, in response to an interface test request for a target application, an interactive test case and a dynamic test case are obtained, wherein the interactive test case indicates interactive behavior data between a simulated user and the target application, and the dynamic test case indicates interface behavior data of the target application.

[0039] For example, interface test requests can be generated manually or automatically based on scheduled tasks. The target application can expose one or more interfaces, or interact with data through the interfaces of other applications. For example, in banking applications (such as mobile banking), interactive test cases may include user login, transfer operations, balance query and other interactive behaviors. Dynamic test cases may include API calls, such as verifying user identity, processing transactions, etc.

[0040] You can analyze the API documentation of the target application to gain an in-depth understanding of the API's functions, request methods, parameters, and return values. Then, based on the test focus, such as functional verification, performance evaluation, security checks, etc., you can design and obtain interactive test cases and dynamic test cases.

[0041] For example, in the process of designing interactive test cases, you can simulate user interaction to design test cases, such as login, query, data update, etc. First, analyze user behavior, which includes creating user portraits to understand the behavior patterns of different users and determining typical scenarios for user interaction with the API. Next, design the interaction process, which involves drawing a flowchart of user interaction with the API and covering important user interaction scenarios. Then, write interactive use cases, write detailed descriptions and steps for each interactive use case, and design automated scripts to simulate user operations. After that, perform data preparation, including preparing valid data that meets the API requirements, and invalid data that does not meet the API requirements for testing error handling. Next, implement the automated script, select an automated testing tool suitable for simulating user interaction, and write an automated script to simulate user interaction operations. Finally, design a user interface simulation, which includes simulating user click operations on the user interface and simulating users filling in form data.

[0042] For example, in the process of designing dynamic test cases, you can design test cases for API behavior, such as abnormal input, error handling, etc. The generation process of dynamic test cases includes: First, understand API behavior. Analyze API documents and be familiar with API request methods, parameters, return values, and possible error responses. Determine API behavior and understand the behavior patterns of API under normal and abnormal conditions. Then, define test objectives. For functional testing, verify whether the API performs functions as expected. For performance testing, evaluate the performance of the API under different loads. For security testing, check the security of the API, such as SQL injection, cross-site scripting attacks, etc. Then, design test scenarios. For normal scenarios, design cases to test the behavior of the API under normal requests. For abnormal scenarios, design cases to test the API's ability to handle erroneous inputs. For boundary scenarios, test the boundary values ​​of input parameters, such as minimum and maximum values. Then, write dynamic test cases. For case descriptions, write a clear description for each test case, including purpose, prerequisites, and test steps. And construct requests that meet API requirements, including request methods, URLs, header information, and request bodies. You can also change request parameters, including valid parameters, invalid parameters, and boundary values. Then, implement the automation script. Select a suitable automation testing tool and write an automation script to simulate API requests and responses.

[0043] In operation S220 , the interactive test cases and the dynamic test cases are executed in parallel on a plurality of computing nodes.

[0044] Multiple computing nodes can be deployed in a distributed architecture, and each computing node can include a server or computer that performs computing tasks. Parallel execution includes executing interface tests on the target application based on interactive test cases and dynamic test cases on multiple computing nodes at the same time. For example, multiple computing nodes can simulate different users interacting with the target application.

[0045] Interactive test cases can be used to detect the interaction of the target application, analyze user behavior patterns in advance, design test cases that can trigger different interaction scenarios, and then use automated tools to simulate user interaction operations. Dynamic test cases can be used to detect the interface behavior of the target application, monitor the API call process in real time, record request and response data, and check whether the API request and response meet security standards according to the security rule file.

[0046] In operation S230, an interface test result of the target application is obtained based on the shared data pool and the execution result of each computing node, wherein the shared data pool is provided to multiple computing nodes for data access during parallel execution.

[0047] A shared data pool refers to a data storage area shared by multiple computing nodes, such as a shared database. For example, one of the computing nodes stores data A into the shared data pool, and the other computing nodes can retrieve the data A from the shared data pool for interface testing. For example, data B is prepared in the shared data pool in advance, and one or more computing nodes can retrieve the data B for use. For example, one of the computing nodes modifies data C in the shared data pool, and the other computing nodes can retrieve the modified data C for use. For example, multiple computing nodes can also communicate during the test process to achieve data interaction.

[0048] Assume that the target application includes an online trading system, which includes functions such as user login, fund transfer, and account query. An automated testing framework can be used to simulate user interactions and API calls. During the test execution, all computing nodes access the same database, which serves as a shared data pool to store test data and results. After the test is completed, the results are extracted from the database to analyze the accuracy of transaction processing and the performance of the prior trading system.

[0049] According to the embodiments of the present disclosure, by combining interactive test cases with dynamic test cases, the time for testing the interface of the target application can be shortened by executing in parallel, simulating user interaction behavior and interface behavior can improve the coverage and comprehensiveness of the test, and can make full use of computing resources to improve the efficiency of test execution. It is also possible to provide a data basis for parallel execution of multiple computing nodes in the form of a shared data pool, closely combining interactive test cases with dynamic test cases in the data dimension, and can save storage resources and reduce the complexity of the test environment by reusing shared data.

[0050] Figure 3 The flowchart of obtaining test cases according to an embodiment of the present disclosure is schematically shown.

[0051] like Figure 3 As shown, this embodiment is one of the embodiments of operation S210, including:

[0052] In operation S310, the interactive test cases are divided into N first subsets, and the dynamic test cases are divided into M second subsets.

[0053] Reference Figure 3, the user behavior data in the interactive test case can be subdivided into multiple independent user behavior units, each unit represents one or a class of specific user operations or behaviors, and the simulation data corresponding to each user behavior unit is organized into a subset. User behavior can be managed and simulated more finely in parallel testing, so that each subset can be allocated and executed independently, while considering the dependencies with the subsets in the dynamic test case. For example, clicks, logins, queries, and form filling are each treated as independent user behavior units, and the corresponding simulation data is organized into a subset.

[0054] Furthermore, the interface behavior data in the dynamic test case can be subdivided into multiple independent interface behavior units, each of which focuses on testing the behavior of the interface under specific conditions. These conditions may include abnormal input, error handling, boundary parameter (such as boundary value input) testing, and performance testing. The test data corresponding to each interface behavior unit is organized into a subset so that the dependency between the first subset and the second subset can be considered in parallel testing.

[0055] In operation S320, all subsets are divided into Y test tasks according to the dependency between any two subsets among the N first subsets and the M second subsets, wherein the dependency indicates the execution timing conditions or data interaction conditions followed during the parallel execution process, and N, M and Y are integers greater than or equal to 1 respectively.

[0056] For example, in a banking application, a test task may include a login subset and an account verification subset, because the login operation depends on the account verification, where the login operation comes from the first subset and can simulate the login behavior, and the account verification comes from the second subset, including interface behaviors such as account data and verification requests. The execution timing condition or data interaction condition can characterize the execution timing or data interaction between the first subsets, between the second subsets, or between the first subset and the second subset. For example, in a banking application, a user must first successfully log in (the first subset) before he can perform a transfer operation (another first subset), which indicates that there is a dependency between the two subsets.

[0057] According to an embodiment of the present disclosure, test cases are split into smaller subsets for parallel execution. Test tasks are divided by considering dependencies, so that the tests have sequentiality and data consistency.

[0058] In some embodiments, before all subsets in the to-be-executed set are divided into Y test tasks, clustering is performed on the N first subsets and the M second subsets to obtain at least one cluster; when each cluster contains at least two subsets, the dependency relationship between any two subsets is obtained.

[0059] Exemplarily, a machine learning algorithm, such as K-means or a hierarchical clustering algorithm, can be used to automatically cluster all subsets. For example, a cluster may include all user behavior subsets (i.e., the first subset) and interface behavior subsets (i.e., the second subset) related to "account management".

[0060] For example, suppose a bank application performs interface testing, and the application includes functions such as user login, account query, and fund transfer. First, all relevant interactive test cases (such as different login scenarios) and dynamic test cases (such as different input parameters, output parameters, or interface calls) are split into multiple subsets. Then, a clustering algorithm is used to cluster these subsets into different clusters according to business stages or business functions, such as the "account management" function and the "fund operation" function. In each cluster, the dependencies between subsets are analyzed, such as account query can only be performed after successful login. Finally, based on these dependencies, all subsets are divided into Y test tasks, and these test tasks are executed in parallel on multiple computing nodes.

[0061] According to the embodiments of the present disclosure, clustering technology is used to improve the efficiency of partitioning, effectively save time, and discover the potential connections between various subsets.

[0062] Figure 4 The following schematically shows an architecture diagram for allocating test tasks according to an embodiment of the present disclosure.

[0063] like Figure 4 As shown, in some embodiments, before multiple computing nodes execute interactive test cases and dynamic test cases in parallel, the computing resources required for each of Y test tasks are evaluated; and each test task is assigned to a corresponding computing node based on the available computing resources of each of the multiple computing nodes.

[0064] For example, computing resources include the hardware and software resources required to perform the test tasks, such as CPU, memory, storage, cache, and network bandwidth. The user behavior to be simulated for each subset of each test task, the background data processing steps required for the target application to respond to the user behavior, and the input and output parameters of one or more interfaces can be evaluated. For example, the execution process of historical services can be obtained to find target services with similar user behaviors, data processing steps, and input and output parameters, and the required computing resources can be obtained through logs. Alternatively, performance analysis tools can be used to benchmark test tasks to determine resource requirements.

[0065] Tasks can be assigned to the most appropriate nodes based on the available resources of the computing nodes and the requirements of the test tasks. For example, test tasks that require a lot of memory can be assigned to servers with high memory configurations. For test tasks that handle a large number of concurrent requests, assign them to servers with high CPU and memory configurations. For data-intensive test tasks, assign them to servers with fast storage systems.

[0066] According to the embodiments of the present disclosure, by accurately evaluating and allocating resources, it is possible to ensure that the resources of each computing node are fully utilized to avoid resource waste. In addition, reasonable resource allocation can provide the prerequisite for parallel execution, reduce the execution time of test tasks, and improve overall test efficiency.

[0067] In some embodiments, assigning each test task to a corresponding computing node based on the available computing resources of each of the multiple computing nodes includes: obtaining the execution time and required computing resources of each test task; and assigning each test task to a corresponding computing node based on the available computing resources of each of the multiple computing nodes at different times.

[0068] The execution time refers to the time period from the start time to the end time of the test task. For example, in the interface test of a banking application, a test task may start at 9 am and end at 11 am, so the execution time of this test task is from 9 am to 11 am. Available computing resources include the amount of resources that a computing node can use to execute tasks within a specific time. For example, if a server is only scheduled to run a small number of tasks within a certain time period, most of its CPU and memory resources may be available.

[0069] For example, first, plan the start and end time of each test task, and use performance analysis tools to evaluate the amount of resources required for each test task. Then, use the resource scheduling function to assign the test task to the most appropriate server based on the current load and configuration of each server in the data center. For example, for tasks that need to handle a large number of concurrent requests, schedule them during periods when the server load is low and assign them to servers with high CPU and memory configurations. This allows each test task to be executed in the best environment, improving test efficiency and accuracy.

[0070] According to the embodiments of the present disclosure, task allocation can be performed according to the time dimension and the computing resource dimension, and the execution order of the test tasks and the allocation of resources can be reasonably arranged.

[0071] In some embodiments, executing interactive test cases and dynamic test cases in parallel on multiple computing nodes includes: executing Y test tasks in parallel on multiple computing nodes to access data from a shared data pool.

[0072] For example, by executing the divided test tasks on multiple computing nodes at the same time, using containerization technology and orchestration tools to manage and schedule the parallel execution of test tasks, parallel testing can be achieved through multi-threading or multi-process technology, significantly reducing the total time required to complete all test tasks. Providing a shared data pool allows access to and operation of the same data set during the execution of all test tasks to ensure the consistency and reliability of test results.

[0073] In some embodiments, obtaining interface test results for a target application based on a shared data pool and the execution results of each computing node includes: acquiring test logs during the parallel execution process from the shared data pool; and analyzing the test logs and the execution results to obtain interface test results.

[0074] Test logs are documents that record detailed events and status information during test execution. For example, in banking application testing, the test log may contain detailed information for each simulated user interaction test, such as user behavior, clicked areas, test functions, interface requests, and interface responses. For example, in a transaction test, it may include transaction time, transaction amount, participating accounts, and transaction results. The execution results include the results after executing each test task, including success, failure, or exception status.

[0075] After the test execution is completed, the execution results of each computing node are synchronized and summarized. By analyzing the collected logs and execution results, the execution status of the test tasks is evaluated to reflect the test results of the interface.

[0076] For example, during the test, each node writes the execution log to the shared data pool. After the test is completed, these logs are obtained from the shared data pool, and the log analysis tool is used to extract the details of each test task, including key indicators such as time and failure rate. Then, the data analysis tool is used to conduct in-depth analysis of these data to obtain the interface test results, such as the overall performance and stability of the interface. For example, for the transaction interface, the details of each transaction are extracted, including transaction processing time, success rate, failure rate and other indicators, to obtain the interface test results.

[0077] According to the embodiments of the present disclosure, by collecting and analyzing test logs and combining the execution results of multiple computing nodes, the specific situation of the test execution can be more clearly understood and accurate interface test results can be obtained.

[0078] Based on the above interface testing method, the present disclosure also provides an interface testing device. Figure 5 The device is described in detail.

[0079] Figure 5 The structural block diagram of the interface testing device according to the embodiment of the present disclosure is schematically shown.

[0080] like Figure 5 As shown, the interface testing device 500 of this embodiment includes a use case acquisition module 510 , a parallel execution module 520 and a test result module 530 .

[0081] The use case acquisition module 510 can perform operation S210 to obtain interactive test cases and dynamic test cases in response to an interface test request for the target application, wherein the interactive test cases indicate the interactive behavior data between the simulated user and the target application, and the dynamic test cases indicate the interface behavior data of the target application.

[0082] The parallel execution module 520 may perform operation S220 to execute interactive test cases and dynamic test cases in parallel on multiple computing nodes.

[0083] The test result module 530 may perform operation S230 to obtain an interface test result for the target application based on the shared data pool and the execution result of each computing node, wherein the shared data pool is provided to multiple computing nodes for data access during parallel execution.

[0084] In some embodiments, the use case acquisition module 510 can also be used to split the interactive test cases into N first subsets and the dynamic test cases into M second subsets; based on the dependency between any two of the N first subsets and the M second subsets, all subsets are divided into Y test tasks.

[0085] In some embodiments, the interface testing device 500 further includes a clustering module. Before dividing all subsets in the to-be-executed set into Y test tasks, the clustering module is used to perform clustering processing on the N first subsets and the M second subsets to obtain at least one cluster; when each cluster contains at least two subsets, obtain the dependency relationship between any two subsets.

[0086] In some embodiments, the interface testing device 500 further includes a task allocation module. Before the multiple computing nodes execute the interactive test cases and the dynamic test cases in parallel, the task allocation module is used to evaluate the computing resources required for each of the Y test tasks; and allocate each test task to a corresponding computing node according to the available computing resources of each of the multiple computing nodes.

[0087] In some embodiments, the task allocation module is further used to obtain the execution time and required computing resources of each test task; and allocate each test task to a corresponding computing node according to the available computing resources of each of the multiple computing nodes at different times.

[0088] In some embodiments, the parallel execution module 520 is used to execute Y test tasks in parallel on multiple computing nodes to access data from a shared data pool.

[0089] In some embodiments, the test result module 530 is further used to obtain the test logs in the parallel execution process from the shared data pool; and analyze the test logs and the execution results to obtain the interface test results.

[0090] For the parts not mentioned in the device part, they can be understood with reference to the various embodiments of the above method. That is, the device part includes modules for executing the various steps of any one of the method embodiments described above. In addition, the implementation methods, technical problems solved, functions implemented, and technical effects achieved of each module / unit / subunit, etc. in the device part embodiment are respectively the same or similar to the implementation methods, technical problems solved, functions implemented, and technical effects achieved of each corresponding step in the method part embodiment, and will not be repeated here.

[0091] According to an embodiment of the present disclosure, any multiple modules among the use case acquisition module 510, the parallel execution module 520 and the test result module 530 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.

[0092] According to an embodiment of the present disclosure, at least one of the use case acquisition module 510, the parallel execution module 520 and the test result module 530 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the use case acquisition module 510, the parallel execution module 520 and the test result module 530 may be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function may be executed.

[0093] Figure 6 A block diagram of an electronic device suitable for implementing an interface testing method according to an embodiment of the present disclosure is schematically shown.

[0094] like Figure 6As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0095] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0096] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.

[0097] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0098] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0099] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.

[0100] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0101] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0102] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.

[0103] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0104] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram or flow chart, and the combination of the boxes in the block diagram 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.

[0105] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0106] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. An interface testing method, comprising: In response to an interface test request for a target application, acquiring an interactive test case and a dynamic test case, wherein the interactive test case indicates interactive behavior data between a simulated user and the target application, and the dynamic test case indicates interface behavior data of the target application; Execute the interactive test cases and the dynamic test cases in parallel on multiple computing nodes; Based on the shared data pool and the execution result of each computing node, an interface test result of the target application is obtained, wherein the shared data pool is provided to the multiple computing nodes for data access during the parallel execution process.

2. The method according to claim 1, characterized in that The obtaining of interactive test cases and dynamic test cases includes: Splitting the interactive test cases into N first subsets, and splitting the dynamic test cases into M second subsets; According to the dependency relationship between any two of the N first subsets and the M second subsets, all subsets are divided into Y test tasks, wherein the dependency relationship indicates the execution timing conditions or data interaction conditions followed during the parallel execution process, and N, M and Y are integers greater than or equal to 1 respectively.

3. The method according to claim 2, characterized in that Before dividing all subsets into Y test tasks, the method further includes: Performing clustering processing on the N first subsets and the M second subsets to obtain at least one cluster; When each cluster contains at least two subsets, the dependency relationship between any two subsets is obtained.

4. The method according to claim 2, characterized in that: Before the multiple computing nodes execute the interactive test cases and the dynamic test cases in parallel, the method further includes: Evaluate the computing resources required for each of the Y test tasks; Each of the test tasks is allocated to a corresponding computing node according to the available computing resources of each of the multiple computing nodes.

5. The method according to claim 4, characterized in that The allocating each test task to a corresponding computing node according to the available computing resources of each of the plurality of computing nodes comprises: Obtaining the execution time and required computing resources of each test task; According to the available computing resources of the multiple computing nodes at different times, each of the test tasks is allocated to a corresponding computing node.

6. The method according to claim 4, characterized in that The parallel execution of the interactive test cases and the dynamic test cases on multiple computing nodes includes: The Y test tasks are executed in parallel on the multiple computing nodes to access data from the shared data pool.

7. The method according to any one of claims 1 to 6, characterized in that The step of obtaining the interface test result of the target application based on the shared data pool and the execution result of each computing node includes: Acquire the test logs in the parallel execution process from the shared data pool; The test log and the execution result are analyzed to obtain the interface test result.

8. An interface testing device, characterized in that: The device comprises: A case acquisition module, configured to acquire, in response to an interface test request for a target application, an interactive test case and a dynamic test case, wherein the interactive test case indicates interactive behavior data between a simulated user and the target application, and the dynamic test case indicates interface behavior data of the target application; A parallel execution module, used for executing the interactive test cases and the dynamic test cases in parallel on multiple computing nodes; The test result module is used to obtain the interface test result of the target application based on the shared data pool and the execution result of each computing node, wherein the shared data pool is provided to the multiple computing nodes for data access during the parallel execution process.

9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.