Program testing method, system, device, electronic device and storage medium
By configuring information interfaces and process logic relationships, the system receives the executable file and external interface information of the program under test, solving the problem of batch and efficient testing in existing technologies. This enables simultaneous and efficient testing of different types of programs, thereby improving testing efficiency.
Patent Information
- Application Number
- CN202011406306.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-03
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2040-12-03
AI Technical Summary
Existing technologies are unable to efficiently test different types of test programs in batches, resulting in low testing efficiency.
By configuring the information interface and process logic relationship, receiving the execution file and external interface information of the program to be tested, establishing the information interface, and performing the test according to the pre-configured test data and process logic relationship, it is possible to achieve efficient testing of different programs to be tested simultaneously.
It enables efficient batch testing of different types of test programs, improving testing efficiency, reducing repetitive work, and supporting parallel testing of multiple programs.
Smart Images

Figure CN114090419B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a program testing method, device, electronic equipment and storage medium. Background Art
[0002] Currently, existing technologies use a method for testing each program individually. This requires independent testing because each program has different data interface configurations, as well as different testing environments and scenarios. This makes automated batch testing difficult. Obviously, testing each program individually is inefficient.
[0003] Therefore, there is an urgent need for a program testing method that can batch test a large number of different types of test programs, so as to help solve the technical problem that the existing technology cannot efficiently test different types of test programs. Summary of the Invention
[0004] The present application provides a program testing method, the purpose of which is to achieve simultaneous and efficient testing of different programs to be tested by configuring information interfaces and process logic relationships, so as to help solve the technical problem that the existing technology cannot perform batch and efficient testing of different types of test programs.
[0005] The method comprises:
[0006] receiving an execution file and external interface information of at least one program to be tested, wherein the external interface information is interface information corresponding to the program to be tested;
[0007] Configuring an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface;
[0008] The test result is obtained by executing the test corresponding to the execution file according to the pre-configured test data and process logic relationship.
[0009] In another optional embodiment, after the step of receiving at least one executable file of a program to be tested and external interface information, wherein the external interface information is interface information corresponding to test data of the program to be tested, the method further comprises:
[0010] The execution file and the external interface information of each program to be tested are independently stored in a preset database so as to execute subsequent steps respectively.
[0011] In another optional embodiment, before the step of performing the test to obtain the test result by corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship, the method further includes:
[0012] The process logic relationship between the test data and the execution file is edited and / or shared and / or grouped and / or checked and / or parameterized and / or referenced according to a predetermined configuration method.
[0013] In another optional embodiment, the obtaining of the test result by executing the test corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship includes:
[0014] According to the test data and the process logic relationship, the corresponding execution file is started to execute the test through user operation or automatic testing to obtain the test result.
[0015] In another optional embodiment, after the step of obtaining a test result by executing a test corresponding to the execution file according to the test data and the process logic relationship, the method further includes:
[0016] Comparing the test result with a preset expected result to obtain a comparison result, wherein the test result includes an operation test result of the test data and the logical relationship of the process;
[0017] The program to be tested and / or the test data and / or the process logic relationship are verified according to the comparison result.
[0018] The present application also provides a program testing system, which also includes a testing platform and a testing data source, as well as a configuration module and a test result display module;
[0019] The test platform is configured to receive an execution file of at least one program to be tested and external interface information, wherein the external interface information is interface information corresponding to the program to be tested;
[0020] The configuration module is configured to configure an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface;
[0021] The test platform is used to obtain test results by executing tests corresponding to the execution files and the information interface according to the pre-configured test data and the process logic relationship.
[0022] The test result display module is used to query and / or display the test results and / or output a test result report.
[0023] The present application also provides a program testing system, the system comprising a database;
[0024] The test platform is further configured to independently store the execution file and the external interface information of each program to be tested in the preset database so as to execute subsequent steps respectively.
[0025] The present application also provides a program testing device, which includes:
[0026] A receiving module, configured to receive at least one execution file of a program to be tested and external interface information, wherein the external interface information is interface information corresponding to the program to be tested;
[0027] a configuration module, configured to configure an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface;
[0028] An execution module, configured to execute a test corresponding to the execution file and the information interface according to the pre-configured test data and the process logic relationship to obtain a test result;
[0029] The test result display module is used to query and / or display the test results and / or output a test result report.
[0030] The present application also provides an electronic device, comprising: a processor and a memory;
[0031] The memory stores an application program that can be executed by the processor, which is used to enable the processor to perform the steps of the program testing method.
[0032] The present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the program testing method are implemented.
[0033] As can be seen above, based on the above embodiments, the present application realizes simultaneous and efficient testing of different programs to be tested by configuring the information interface and process logic relationship, so as to help solve the technical problem that the existing technology cannot perform batch testing of different types of test programs. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 1 is a flow chart of a program testing method according to an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of the data structure of a test platform in a program testing system according to an embodiment of the present invention;
[0036] Figure 3 A schematic diagram of a data structure when an executable file is tested with test data through a process logic relationship in a program testing system according to an embodiment of the present invention;
[0037] Figure 4 FIG. 1 is a schematic diagram of the architecture of a program testing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0039] The inventors discovered that information systems face problems such as large program testing workload, low test coverage, high test repetition, and low manual testing efficiency in daily operation and maintenance and upgrades. The amount of program testing of this type is very large, but because each program test faces different application scenarios, different programs have different test data requirements and logical relationships. Therefore, different types of test programs cannot be tested in batches and need to be tested independently. For example, the first program test is a financial interaction program, and the second program test is a logistics interaction program. Obviously, the test data and process logic relationships during program execution are different for the two, so efficient batch automated testing is impossible because testers need to configure according to different data sources and process logic relationships. Therefore, there is an urgent need for a program testing method that can efficiently and simultaneously test a large number of programs in batches, so as to help solve the technical problem that the existing technology cannot perform efficient automated testing on multiple programs.
[0040] Figure 1 FIG. 1 is a flow chart of a program testing method according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the data structure of a test platform in a program testing system according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the data structure when the execution file in the program testing system is tested through the process logic relationship and the test data in one embodiment of the present invention. Figure 1 and Figure 2 ,as well as Figure 3 As shown, in one embodiment, a program testing method is provided, the method comprising:
[0041] S101, receiving an execution file and external interface information of at least one program to be tested, wherein the external interface information is interface information of the program to be tested;
[0042] In this step, specific steps for receiving the execution file and the external interface information are provided. In this step, at least one of the programs to be tested must be received first. For each program to be tested, there will be a corresponding execution file and the external interface information. The execution file can be a war package or an exe file or provide a packaging command. In addition to the execution file, the external interface information must also be received. The external interface information is the interface information for the test data corresponding to the program to be tested. For example, in a financial system, if a user needs to transfer 100 yuan from Bank A to Bank B, Bank A will inevitably configure a transfer data interface for data interaction of the transfer information. The transfer data interface can be understood as the interface to be described by the external interface information.
[0043] S102: Configure an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface.
[0044] This step provides a specific implementation method for establishing an information interface based on the external interface information, wherein the information interface is used to provide data to the external system, or the external system feeds back data, and also needs to interact through the information interface.
[0045] S103: Performing an execution test corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship to obtain a test result.
[0046] In this step, a specific step of testing to obtain the test result is provided. It should be pointed out that because the corresponding external system data has been obtained from the information interface in the previous step, and the test data and the process logic relationship have been configured, the execution test can be performed through the execution file according to the test data and the process logic relationship, and finally the test result can be obtained. It should be pointed out that the test data includes internal reference data and / or external reference data.
[0047] In this embodiment, a specific implementation method of a program testing method is provided. First, at least one execution file and external interface information of a program to be tested are received, wherein the external interface information is the interface information of the program to be tested. The external interface information includes: interface class name and method name, interface input parameter quantity and type, interface output parameter type, interface service type (three types: providing service interface, relying on external interface and result output interface), interface technology type (Http, RPC, Restful Service and Web Service interface, etc.), interface description and test data (including input parameter test data and output parameter test data), the type supports basic types and object classes, and the input and output parameter test data use JSON format. (JSON (JavaScript Object Notation, JS Object Notation) is a lightweight data exchange format.) The external interface information import function implements the import function of the interface class, identifies the interface method and input and output parameter information in the interface class file, generates external interface information, supports batch import, and realizes the rapid construction of the information system test environment.
[0048] Then, the information interface is configured according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface. Finally, the test result is obtained by executing the test corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship. In this embodiment, by obtaining the external interface information of the program to be tested, establishing the information interface with the external interface information, providing or obtaining data from the external system, and implementing the final test through the test data and the process logic relationship pre-configured by the tester or automatically. After configuration, it can meet the simultaneous testing of multiple programs to be tested, and each single program to be tested no longer needs to be tested separately. It helps to solve the technical problem that the existing technology cannot perform efficient and automated testing on multiple programs. In addition, it should be pointed out that the test data and the process logic relationship can be designed and configured in the form of use cases.
[0049] Figure 2 and Figure 3 As shown, a payment-type program under test is used as an example to illustrate how data is run in this embodiment. The information interface is used to provide payment amount data in an external banking system and obtain feedback data information. The process logic relationship 1 and test data 1 can be understood as a use case.
[0050] In another embodiment, after the step of receiving at least one executable file of a program to be tested and external interface information, wherein the external interface information is interface information corresponding to test data of the program to be tested, the method further comprises:
[0051] The execution file and the external interface information of each program to be tested are independently stored in a preset database so as to execute subsequent steps respectively.
[0052] In this embodiment, a method is provided for independently storing different programs to be tested in the database to avoid interference between different programs to be tested and to enable parallel testing of multiple programs to be tested.
[0053] In another embodiment, configuring the process logical relationship between the test data and the execution file according to a predetermined configuration method is editing and / or sharing and / or grouping and / or checking and / or parameterizing and / or referencing the process logical relationship between the test data and the execution file according to a predetermined configuration method.
[0054] In this embodiment, a specific configuration method for the process logic relationship is provided. Taking the use case method to configure the process logic relationship and the test data as an example, the use case describes the relationship between the test data and the execution file with different entries. The specific configuration method is not limited to editing, that is, adding or reducing the entries, or sharing the edited process logic relationship. It can improve the test efficiency of the program to be tested with the same process logic relationship in the future to avoid repeated editing of the process logic relationship. When different programs to be tested are continuously tested, a large number of configured process logic relationships will be left. These remaining process logic relationships can also be grouped, such as belonging to finance, logistics, or other categories. In addition, the process logic relationship can also be tested or parameterized. It should also be pointed out that after the entry is edited and modified, it can be updated to all subsequent tests of the program to be tested that use the entry.
[0055] In another embodiment, the obtaining of the test result by executing the test corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship includes:
[0056] According to the test data and the process logic relationship, the corresponding execution file is started to execute the test through user operation or automatic testing to obtain the test result.
[0057] In this embodiment, a specific implementation method for executing the execution file in different startup modes is provided. If it is an automatic mode, that is, the execution is automatically initiated: according to the configuration information of the information system, if the need for automatic operation and automatic operation of Corn expressions are configured, the execution of all test cases is automatically initiated according to the Corn expression timing rules. If it is a user operation mode, the execution is manually initiated, that is, an entry for users to initiate test execution is provided on the use case execution management page. The test cases to be tested can be filtered according to the information system and test group (which can be empty) (shared use cases cannot be executed), and then all or part of the test cases can be selected to initiate execution. The test cases to be tested can also be directly initiated according to the information system and test group (which can be empty). Alternatively, after the manual startup test is successful and stable, the scheduled automatic test function is enabled. For example, after the development submits the code, the automated test is performed at 12 o'clock every night, and the automated test results of the previous night can be seen when going to work in the early morning.
[0058] In another embodiment, after the step of obtaining a test result by executing a test corresponding to the execution file according to the test data and the process logic relationship, the method further includes:
[0059] S201, based on the test results and the preset expected results are compared to obtain a comparison result, wherein the test results include the test data and the process logic relationship operation test results.
[0060] This step provides specific steps for comparing the test results.
[0061] S202: Verify and / or query the program to be tested and / or the test data and / or the process logic relationship according to the comparison result.
[0062] In this step, the program to be tested and the use case (ie, the test data and / or the process logic relationship) are verified through the comparison result, and the next step of processing is performed after querying.
[0063] In this embodiment, a specific implementation method for comparing the test results is provided, which is essentially a management of the test results. The specific management method will be further introduced later and will not be repeated here.
[0064] In another embodiment, the present application further provides a program testing system, the system comprising a testing platform, a testing data source, and a configuration device;
[0065] The test platform is configured to receive at least one execution file of a program to be tested and external interface information, wherein the external interface information is interface information corresponding to test data of the program to be tested;
[0066] The configuration module is configured to configure an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface;
[0067] The test platform is used to obtain test results by executing tests corresponding to the execution files and the information interface according to the pre-configured test data and the process logic relationship;
[0068] The test result display module is used to query and / or display the test results and / or output a test result report.
[0069] After configuring the test data and the process logic relationship in the form of use cases, the system of this application and the workflow method are further explained in detail. The test platform includes four directions: system interface management, use case design, test execution and test report management. The system interface management is responsible for the collection and management of the basic information of the test platform and the import and management of the external interface information and the maintenance of the test data; the use case design is equivalent to the design of the process logic relationship, and its functions mainly include: test case basic information management, maintenance, reference, sharing and verification management of use case entry data, use case test expected result management, and use case grouping management and parameter management; the test execution module is responsible for the initiation of the test case to the execution file, the execution process of the execution file and the information management of the execution record; the management of the test results specifically includes: the management of the test results, the query of test case execution results and the query of use case execution details. Finally, the application of the automated testing method and system is explained by using process description.
[0070] The system is implemented as a standalone component that can be deployed and run independently, with test case data stored in a database. For example, it can be implemented as a runnable war package in Java or an exe file in C#. The system provides a user interface for test case management and execution, a database table structure for storing test cases and their results, and backend automated testing services for automated testing of information systems based on external interfaces.
[0071] The system supports simultaneous online automated testing of multiple programs under test, and stores their test cases and their running result data in separate isolation. The system design imports the construction of the information system test environment (i.e., the configuration of the external interface and the process logic relationship), and realizes the rapid construction of test cases through the reference and verification functions of the test data and the use cases of the external interface. It realizes the rapid update of test cases after the information system upgrade through the sharing of test case entries, and increases the test case coverage through the parameterized management of test case entry data. It starts the program under test through the mock method to quickly execute the test case, verifies the test results through the defined use case test expectations, and displays the complete content of the test report through the test case execution results and detailed information.
[0072] Management of the external interface
[0073] The management of the external interface of the system is responsible for the management of the program to be tested and the management of the external interface information, and receives the execution file related to the program to be tested, wherein the execution file has test configuration information and environment information.
[0074] The test program management: implements basic information management of the test program, collects relevant test configuration information and environmental information, mainly provides the executable file of the test program, and can add, delete, modify and query. The test configuration information and environmental information include: the name of the test program, the code of the test program (unique identifier), the person in charge of the test program, a brief introduction of the test program, the executable file and the type of the executable file, etc. The test configuration information includes: source code address, packaging command, whether to run automatically, automatically run Corn expression, and whether to package before running, etc.
[0075] External Interface Management: This function manages all external interface information for each program under test. In addition to the basic functions for adding, deleting, modifying, and querying external interface information, it also includes functions for importing external interface information, managing external interface test data, and replicating external interface information. The external interface test data management function enables online maintenance and file import of each interface test data, which is used to support the reference function of test cases. The external interface information replication function enables the rapid construction of similar external interfaces and supports interface replication across information systems.
[0076] Use case design (i.e. process logic relationship)
[0077] Use case design enables rapid construction and updating of test cases, as well as reference, sharing, verification, grouping, and parameterization of test cases. It includes modules for use case information management, use case entry data management, use case test expectation management, use case grouping management, and parameter management.
[0078] Use case information management: This allows for the addition, deletion, modification, and maintenance of basic test case information, including the use case number, name, description, information system, category (shared and test cases), grouping, and external interface for the entry point. Simultaneously, use case information sharing is implemented. When adding a new use case, existing shared use cases can be directly shared, primarily sharing all of their entry data. The basic use case information and test expectation data can be copied and modified independently.
[0079] Use Case Item Data Management: This functionality enables the addition, deletion, modification, query, and maintenance of all relevant external interface input and output data for a test case, as well as the reference, sharing, verification, and parameterization of use case item data. Each relevant external interface input and output data constitutes a test case item, and a test case contains several items of item data. Each test case includes an external interface for the use case entry location and several service interfaces that rely on external systems. When adding or modifying use case item information, you can reference external interface test data. You can also reference item data from other test cases (effectively copying it into the current test case as new use case item data). Sharing of partial use case items within existing shared use cases is also supported. (After sharing, if the original item data in the shared use case is modified, the item data in the shared use case remains up to date.) When modifying interface input and output JSON data, online verification is provided, using the interface input and output parameter definitions to verify the validity of the values. Parameter variables (alphanumeric and underscore combinations starting with $) are supported within the interface input and output JSON data, and their values are maintained in the parameter management module.
[0080] Use case test expectation management: realize the verification information collection of the result data expected to be output by the test case, mainly the input parameter verification data and output parameter data of the result output interface. A test case can have multiple result outputs (for example, output to a database, output to an external file, output to a message queue, and output to an external system), and the system mainly verifies the call status of these result output external interfaces. The input parameter verification data is the verification rule expression for each input parameter of the collected result output external interface, which is used to verify whether the execution result after the test case is executed is correct or not. The input parameter verification data is in JSON format. The output parameter data is the same as the output parameter data in the use case entry data, as long as it meets the expected results of the information system, and the format is also JSON.
[0081] Test Group Management: This module groups test cases, typically using business scenarios as group names. This module is responsible for adding, deleting, modifying, and maintaining test group information, including group name, group code, group description, and the associated information system.
[0082] Parameter Management: This allows you to add, delete, modify, query, and maintain parameter variable values within test case entry data. This includes parameter variables, their values, and the associated information system. Parameter values are shared across all test cases within the program under test. If the parameter values within the test case entry data differ, different parameter variables must be used.
[0083] Test Execution
[0084] Test execution realizes manual and automatic execution of information system test cases and records the information of each execution. It mainly includes two functional modules: case execution management and execution record management.
[0085] Use case execution management: realizes manual initiation and automatic initiation of execution of information system test cases and execution of use cases to be tested. Automatic initiation of execution: according to the configuration information of the information system, if automatic operation and automatic operation of Corn expressions are configured, the execution of all use cases to be tested will be automatically initiated according to the timing rules of the Corn expression. Manual initiation of execution provides users with an entry to initiate test execution on the use case execution management page. Users can first filter the use cases to be tested (shared use cases cannot be executed) according to the information system and test group (which can be empty), and then select all or part of the use cases to be tested to initiate execution. Alternatively, users can directly initiate the execution of the use cases to be tested according to the information system and test group (which can be empty).
[0086] Execution of test cases: Test execution is performed according to the test cases that are initiated, and the test case execution information is recorded to generate a test report. First, the executable file is checked based on the configuration information of the information system. If the source code address is configured and packaging is required before running, the source code is pulled and the packaging command is executed to compile and package the information system to generate an executable war package or exe file. Secondly, the executable file of the program under test is started using the mock method (Mock method: a test simulation method that uses a simulated environment to start the information system under test. It supports calling all external interface calls involved in system operation from this simulated environment instead of calling the real external system. Therefore, the test execution can be driven by test case entry data (i.e., external interface mock data) to obtain the expected test case execution results. Finally, the execution result information of all test case execution results is sent to the test report management function module to generate a test report. For specific Mock methods, please refer to the instructions for using frameworks such as EasyMock and PowerMock.
[0087] Execution record management: This system records and queries test case execution information. Each execution of a test case (whether initiated manually or automatically) is recorded. This information includes: the program under test, the startup method (manual or automatic), the test group (can be empty), the time the test was initiated, the number of test cases, a list of test case numbers, whether the compilation and packaging process was completed, whether the test ran normally, the time the test was completed, the reason for the test failure, the number of test cases that passed the test, and the number of test cases that failed the test. If a test fails, no test report will be generated to record the reason for the failure, requiring manual troubleshooting.
[0088] Test report management (i.e. test result management)
[0089] Test report management implements test report generation and query management. It mainly includes functional modules such as execution report management, use case execution result query, and use case execution detail query.
[0090] Execution report management: Generates test reports based on the execution result information sent by the test case execution, and provides query functions for all test reports (query by test execution initiation time, program to be tested, test group, etc.). The test report includes test report summary information, use case execution result information, and use case execution detailed information. The test report summary information includes: program to be tested, test group (can be empty), number of use cases to be tested, list of names of use cases to be tested, test execution initiation time, test execution completion time, number of passed test cases, number of failed test cases, and percentage of passed use cases, etc.; use case execution result information includes the execution result information of each use case to be tested in a test execution, specifically including: test case number, test case name, test execution time, and use case execution result (pass or fail); use case execution detailed information includes: the expected verification result of each use case test in each use case (verification passed or verification failed) and whether the external interface corresponding to each use case entry is called and whether it is called according to the input parameter data.
[0091] Use Case Execution Result Query: This function allows you to query use case execution result information. This function is an extension of the use case execution report. First, query a use case test report from the report execution management, browse to the report summary, and then drill down to query the execution result information of all test cases corresponding to this test execution.
[0092] Use Case Execution Details Query: This function allows you to query detailed information about use case execution. This function extends the use case execution result information. By drilling down from each use case's execution result information, you can query detailed information about the execution of that use case. If a test case fails, querying the external interface calls and the expected verification of the use case in the use case details can help identify issues with the program under test.
[0093] Application Process Description
[0094] First, the program to be tested is packaged into an executable war package or exe file or a packaging command is provided. The basic information and configuration information of the program to be tested are entered into this system. Then, all external interface files (such as Java interface files) of the program to be tested are imported to form external interface information. Test data can be provided in the interface file through interface annotations, or can be entered online or imported into this patented system through independent test data files. Secondly, shared use cases are constructed online using the interface test data, and then the shared use cases are used to quickly construct the test cases. Functions such as reference, sharing, verification, grouping, and parameterization are fully utilized to quickly build test cases, and fine-tune the expected verification of the use case test. Then, parameter values are configured, and the test case groups or all use cases to be tested are selected and submitted for test execution to generate a test report. Finally, the test execution report and its detailed results are reviewed. If all use cases pass, the test is completed. If there are use cases that fail, further processing is performed. When the information system is upgraded and renovated, the test cases are adjusted according to the changed and newly added requirements and the detailed design of the program to be tested. For shared test cases, a single modification automatically updates all test cases that share them. When a specific test case group is affected by a requirement update, the test cases for that group are queried and updated centrally. By modifying parameter values, test cases can be updated directly. After quickly updating the test cases, regression testing can be performed after the program under test is upgraded and developed. When new requirements necessitate the addition of new test cases, similarly, new test cases can be quickly built using features like referencing, sharing, verification, grouping, and parameterization to automate testing of the new required functionality.
[0095] This patented system requires the information system under test to provide an executable war package or exe file, or to provide a packaging command that can compile and package the source code address of the executable file. Through system configuration, it can execute compilation and packaging at a scheduled time, run test cases at a scheduled time, and generate an automated test report.
[0096] Formulate standardized service development specifications, and under the guidance of relevant specifications and agreements, start from system interface management, use case design, test execution and test report management, and implement them separately.
[0097] In another optional embodiment, the system further comprises a database;
[0098] The test platform is further configured to independently store the execution file and the external interface information of each program to be tested in the preset database so as to execute subsequent steps respectively.
[0099] Figure 4 FIG. 1 is a schematic diagram of the architecture of a program testing device according to an embodiment of the present invention. Figure 4 As shown, in another optional embodiment, the present application provides a program testing device, the device comprising:
[0100] Receiving module 101, for receiving at least one execution file of a program to be tested and external interface information, wherein the external interface information is interface information of the program to be tested;
[0101] Configuration module 102, configured to configure an information interface according to the external interface information corresponding to the execution file, wherein the information interface is used for data interaction during the test process; and to configure the process logic relationship between the test data and the execution file in a predetermined configuration manner according to the information interface;
[0102] An execution module 103 is configured to execute a test corresponding to the execution file according to the test data and the process logic relationship to obtain a test result;
[0103] The test result display module 104 is used to query and / or display the test results and / or output a test result report.
[0104] In another optional embodiment, the present application further provides an electronic device, comprising: a processor and a memory;
[0105] The memory stores an application program that can be executed by the processor, which is used to enable the processor to perform the steps of the program testing method.
[0106] In another optional embodiment, a computer-readable storage medium stores a computer program thereon, wherein the program implements the steps of the program testing method when executed by a processor.
[0107] In addition, the method steps described in this application may be implemented not only by data processing programs but also by hardware, for example, by logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Therefore, such hardware capable of implementing the method described in this application may also constitute this application.
[0108] The flowcharts and block diagrams in the accompanying drawings of the present application show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to the various embodiments disclosed in the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of 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 the order of the standards in different figures. For example, the boxes represented by two connections 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 flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0109] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of this application.
[0110] The principles and implementation methods of the present invention are described herein using specific embodiments. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not intended to limit this application. For those skilled in the art, changes can be made in the specific implementation methods and application scope based on the ideas, spirit and principles of the present invention. Any modifications, equivalent replacements, improvements, etc. made therein should be included within the scope of protection of this application.
[0111] In practical applications, the computer-readable medium may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs. When executed, the one or more programs implement the data table partitioning method performed by the data table partitioning device described above.
[0112] According to the embodiments disclosed in the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but 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, but is not intended to limit the scope of protection of the present application. In the embodiments disclosed in the present application, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
Claims
1. A program testing method, characterized in that: include: receiving an execution file and external interface information of at least one program to be tested, wherein the external interface information is interface information corresponding to the program to be tested; Configuring an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface for providing data to the outside and / or a data interface for obtaining required external data; The test results are obtained by executing the test corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship; each relevant external interface input and output data constitutes a test case entry data, and the external interface test data is referred to when adding or modifying the use case entry information.
2. The program testing method according to claim 1, wherein: After the step of receiving the execution file and external interface information of at least one program to be tested, the method further includes: The execution file and the external interface information of each program to be tested are independently stored in a preset database so as to execute subsequent steps respectively.
3. The program testing method according to claim 1 or 2, characterized in that: Before the step of performing the test to obtain the test result by corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship, the method further includes: The process logic relationship between the test data and the execution file is edited and / or shared and / or grouped and / or checked and / or parameterized and / or referenced according to a predetermined configuration method.
4. The program testing method according to claim 1, wherein: The step of obtaining a test result by executing the test corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship includes: According to the test data and the process logic relationship, the corresponding execution file is started to execute the test through user operation or automatic testing to obtain the test result.
5. The program testing method according to claim 4, characterized in that: After the step of obtaining a test result by executing a test corresponding to the execution file according to the test data and the process logic relationship, the method further includes: Comparing the test result with a preset expected result to obtain a comparison result, wherein the test result includes an operation test result of the test data and the logical relationship of the process; The program to be tested and / or the test data and / or the process logic relationship are verified and / or queried according to the comparison result.
6. A program testing system, characterized in that: The system includes a test platform and a test data source, as well as a configuration device and a test result display module; The test platform is configured to receive an execution file of at least one program to be tested and external interface information, wherein the external interface information is interface information corresponding to the program to be tested; The configuration device is used to configure the information interface according to the external interface information corresponding to the execution file, wherein: The information interface is a data interface provided to the outside and / or a required data interface; The test platform is used to execute the test according to the pre-configured test data and process logic relationship by corresponding to the execution file and the information interface to obtain the test result; each relevant external interface input and output data constitutes a test case entry data, and the external interface test data is referenced when adding or modifying the test case entry information; The test result display module is used to query and / or display the test results and / or output a test result report.
7. The program testing system according to claim 6, characterized in that: The system further includes a database; The test platform is further configured to independently store the execution file and the external interface information of each program to be tested in the preset database so as to execute subsequent steps respectively.
8. A program testing device, characterized in that: The device includes: a receiving module, configured to receive at least one execution file of a program to be tested and external interface information, wherein the external interface information is interface information corresponding to test data of the program to be tested; a configuration module, configured to configure an information interface according to the external interface information corresponding to the execution file, wherein the information interface is a data interface provided to the outside and / or a required data interface; An execution module, configured to execute a test to obtain a test result by corresponding to the execution file and the information interface according to the pre-configured test data and process logic relationship; The test result display module is used to query and / or display and / or output the test result report; each relevant external interface input and output data constitutes a test case entry data, and the external interface test data is referred to when adding or modifying the use case entry information.
9. An electronic device, characterized in that: The electronic device includes: a processor and a memory; The memory stores an application program executable by the processor, which is used to enable the processor to perform the steps of the program testing method according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the program testing method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Automatic test execution method and device
CN109992494A