Service system test method and device, electronic equipment and storage medium

The automated testing method in the form of interface calls solves the problems of incomplete coverage and high risk of failure caused by manual reliance on manual testing of business systems in the existing technology, achieving more comprehensive test coverage and saving time.

CN118672883APending Publication Date: 2024-09-20BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310265927.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing business system testing methods rely on manual labor and have a low degree of automation, resulting in incomplete test coverage, high risk of failure, and long time consumption. Especially when system migration or environment changes, it is difficult to verify the operating logic in different environments.

Method used

By designing test cases and implementing them in the form of interface calls, we automate the test process, obtain and compare feedback data when executing the same test case in different environments, and realize the verification of test results of the business system.

Benefits of technology

It realizes automated testing of business systems, improves test coverage, reduces failure risks, saves testing time, and can test both main processes and details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672883A
    Figure CN118672883A
Patent Text Reader

Abstract

The invention discloses a test method and device of a service system, electronic equipment and a storage medium. The method comprises the steps of obtaining a test case designed for the service system; when the business system runs in the original environment, a first interface needing to be called for executing the test case is determined; determining a second interface which needs to be called for executing the test case when the business system runs in the target environment; calling a first interface to execute the test case to obtain first feedback data; calling a second interface to execute the test case to obtain second feedback data; and comparing the first feedback data with the second feedback data to obtain a test result of the service system. The test case is implemented in the form of interface calling, the test result of the service system can be obtained by comparing the execution results when different interfaces are called to execute the same test case, the whole test process can be automatically realized by depending on scripts or programs and does not depend on manpower any more, the automation degree is high, the test coverage is more complete, the fault risk is reduced, and the test efficiency is improved. And test time is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to testing technology, and more particularly to a testing method, device, electronic device and storage medium for a business system. Background Art

[0002] Due to system migration or business needs, the same business system may be deployed in different environments. Therefore, it is necessary to test the business systems deployed in different environments to verify whether the operating logic of the same system in different environments is consistent. This is a huge workload for testers.

[0003] In the process of implementing the present invention, the inventors found that the current method for testing business systems mainly relies on manual implementation and has a low degree of automation. Moreover, due to reliance on manual work, considering the cost and time consumption, generally only the main process of the business system is tested to ensure that there are no problems with the main process. The test coverage is incomplete, the risk of system failure is very high, and the test takes a long time. Summary of the invention

[0004] The embodiments of the present invention provide a testing method, device, electronic device and storage medium for a business system, which can automatically implement the testing process, have more comprehensive testing coverage, reduce the risk of failure, and save testing time.

[0005] In a first aspect, an embodiment of the present invention provides a method for testing a business system, including:

[0006] Obtain test cases designed for business systems;

[0007] Determine a first interface that needs to be called when the business system is running in the original environment to execute the test case; determine a second interface that needs to be called when the business system is running in the target environment to execute the test case;

[0008] Calling the first interface to execute the test case and obtain first feedback data; calling the second interface to execute the test case and obtain second feedback data;

[0009] The first feedback data and the second feedback data are compared to obtain a test result of the business system.

[0010] In a second aspect, an embodiment of the present invention provides a testing device for a business system, including:

[0011] The acquisition module is used to obtain test cases designed for the business system;

[0012] A determination module is used to determine a first interface that needs to be called when the business system is running in the original environment to execute the test case; and to determine a second interface that needs to be called when the business system is running in the target environment to execute the test case;

[0013] An execution module, configured to call the first interface to execute the test case and obtain first feedback data; and call the second interface to execute the test case and obtain second feedback data;

[0014] A comparison module is used to compare the first feedback data with the second feedback data to obtain a test result of the business system.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a business system testing method as described in any one of the embodiments of the present invention is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a business system testing method as described in any one of the embodiments of the present invention.

[0017] In the embodiment of the present invention, a test case designed for a business system can be obtained; a first interface that needs to be called to execute the test case when the business system is running in the original environment is determined; a second interface that needs to be called to execute the test case when the business system is running in the target environment is determined; the first interface is called to execute the test case to obtain first feedback data; the second interface is called to execute the test case to obtain second feedback data; the first feedback data and the second feedback data are compared to obtain the test result of the business system. That is, the present invention implements the test case in the form of an interface call, and the test result of the business system can be obtained by comparing the execution results when calling different interfaces to execute the same test case. The entire test process can be automatically implemented by relying on scripts or programs, and no longer relies on manual labor. It has a high degree of automation and high test efficiency. The main process and detail points of the business system can be tested, and the test coverage is more complete, which reduces the risk of system failure and saves test time. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 It is a flow chart of a method for testing a business system provided by an embodiment of the present invention;

[0020] Figure 2is another flow chart of the business system testing method provided by an embodiment of the present invention;

[0021] Figure 3 is an example diagram of a method for testing a business system provided by an embodiment of the present invention;

[0022] Figure 4 This is an example diagram of a page showing test results provided by an embodiment of the present invention;

[0023] Figure 5 It is a structural schematic diagram of a testing device for a business system provided by an embodiment of the present invention;

[0024] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0026] Figure 1 The present invention provides a flow chart of a method for testing a business system according to an embodiment of the present invention. The method can be performed by a testing device for a business system according to an embodiment of the present invention. The device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a computer. The following embodiments will be described by taking the device integrated into an electronic device as an example. Figure 1 , the method may specifically include the following steps:

[0027] Step 101: Obtain test cases designed for the business system.

[0028] For example, a business system may be a system designed to implement a certain business or to provide certain services, such as a shopping system, a payment system, an information management system, etc. Due to system migration or business needs, the same business system may be deployed and run in different environments. This embodiment mainly tests the same system running in different environments. The operating environment of the business system may include a hardware environment and a software environment. Different operating environments may refer to different hardware environments and / or software environments. The hardware environment may include memory, hard disk, processor, etc., and the software environment may include operating system type, version, etc.

[0029] A test case is a description of a test task for a specific software product, which reflects the test plan, method, technique and strategy. Specifically, when a business system needs to be tested, the tester (such as a research and development staff) can provide test materials, which may include interface documents, test scope, test environment, etc. provided by the tester. The tester can evaluate the impact scope based on the test materials and then design test cases. In this embodiment, since subsequent tests can be automatically performed using scripts or programs with high efficiency, the designed test cases can be as comprehensive as possible and cover all scenarios as much as possible, that is, they can not only cover the test of the main process, but also cover the test of all details to reduce the risk of system failure.

[0030] In the specific implementation, the test cases of the designed business system can be saved in a specified file, such as a spreadsheet (Excel) file. The test of a business system can correspond to a specified file. After the specified file is formed, it can be uploaded to the database server for saving. When a business system needs to be tested, the specified file corresponding to the business system can be downloaded from the database server, and the test cases can be read from the specified file through the specified script.

[0031] Step 102, determining a first interface that needs to be called when executing a test case when the business system is running in the original environment; determining a second interface that needs to be called when executing a test case when the business system is running in the target environment.

[0032] In this embodiment, since the same system needs to be tested in different environments, in order to realize automated testing, when designing test cases, the test cases can be designed to be implemented in the form of interface calls, that is, a set of test cases are designed for business systems running in different environments, and the execution of the test cases depends on the interface calls, and different interfaces are called for business systems running in different environments; in this way, the interface information called when testing business systems running in different environments can also be stored in the specified file, and the specified file can be queried by the script to determine the first interface that needs to be called when the business system runs in the original environment to execute the test case; determine the second interface that needs to be called when the business system runs in the target environment to execute the test case. For example, a business system needs to run in environment A and environment B respectively, and a total of m (m is a positive integer) test cases are designed for the business system, then the interface information that needs to be called in environment A and environment B to execute the m test cases can be stored in the specified file corresponding to the business system, and the interface information can be represented by a uniform resource locator (URL), and the interface information that needs to be called in environment A and environment B to execute the m test cases can be stored as two columns of information for the same test case.

[0033] For example, in the application scenario of system migration, the original environment can be the operating environment before the business system migration, and the target environment can be the operating environment after the business system migration; due to the change in the operating environment, when testing the business system, the interface called by the same test case will be different.

[0034] Step 103: call the first interface to execute the test case and obtain first feedback data; call the second interface to execute the test case and obtain second feedback data.

[0035] When the same system runs in different environments, in theory, the operating logic should be consistent, that is, the feedback data should be consistent for the same function. Therefore, the operating logic can be tested by judging the data fed back by calling different interfaces when executing the same test case.

[0036] Step 104 : Compare the first feedback data with the second feedback data to obtain a test result of the business system.

[0037] If the first feedback data and the second feedback data are the same, it means that when the same system is running in different environments, the test feedback results for a certain function are the same, that is, the test case is executed successfully; otherwise, if the first feedback data and the second feedback data are different, the test case fails to execute. To test a business system, all test cases designed for the business system can be executed. When all test cases are executed successfully, the test result of the business system is determined to be passed; otherwise, if at least one test case fails to execute, the test result of the business system is determined to be failed.

[0038] When the test result of the business system is not passed, the test case that failed to execute can also be located, and the location result can be fed back to the preset terminal (such as the terminal of the tester or the terminal of the developer) so that the relevant personnel (such as the developer) can modify or optimize the business system. After modification or optimization, the business system can be tested again according to the test method provided in this embodiment until the test passes.

[0039] In an embodiment of the present invention, a test case designed for a business system can be obtained; a first interface that needs to be called to execute the test case when the business system is running in the original environment is determined; a second interface that needs to be called to execute the test case when the business system is running in the target environment is determined; the first interface is called to execute the test case to obtain first feedback data; the second interface is called to execute the test case to obtain second feedback data; the first feedback data and the second feedback data are compared to obtain the test result of the business system. That is, the present invention implements the test case in the form of an interface call, and the test result of the business system can be obtained by comparing the execution results when calling different interfaces to execute the same test case. The entire test process can be automatically implemented by relying on scripts or programs, and no longer relies on manual labor. The degree of automation is high, and both the main process and detail points of the business system can be tested. The test coverage is more complete, the risk of system failure is reduced, and the test time is saved.

[0040] Combine the following Figure 2 and Figure 3 The testing method of the business system of the embodiment of the present invention is further described as follows: Figure 2 As shown, the following steps may be included:

[0041] Step 201: Obtain test cases designed for the business system.

[0042] Specifically, Figure 3 As shown, when a business system needs to be tested, the R&D personnel can provide test materials through the R&D end. The test materials can include the interface documents provided by the test personnel, the test scope, the test environment, etc. The test personnel can obtain the test materials through the test end, evaluate the impact scope based on the test materials, and then design test cases. The test cases designed for the business system can be stored in a specified file, which can be a table file. The test cases designed for the business system can be read from the specified file using a specified script (a script written to achieve automatic testing). The test cases designed for the business system can include multiple test cases. When testing the business system, each test case designed for the business system can be executed. In order to achieve automated testing, the test cases of this embodiment are designed to be implemented in the form of interface calls. The specified file also stores the interface information called when testing business systems running in different environments; wherein, the interface call can be implemented through get requests, post requests, etc.

[0043] In a specific embodiment, taking the case where the interface call is implemented through a get request and the interface input parameters are directly spliced ​​into the URL as an example, the test case information stored in the specified file may be as shown in Table 1 below:

[0044]

[0045] Table 1

[0046] In a specific embodiment, taking the example of implementing the interface call through a post request and splitting the interface input parameter and the URL, the test case information stored in the specified file may be as shown in Table 2 below:

[0047]

[0048] Table 2

[0049] In the two test case information shown in Table 1 and Table 2, the serial number and scenario description information can be added according to personal habits. The scenario description information should preferably be able to intuitively display the functional points verified by the corresponding test case; the corresponding environment column can be filled with the interface information of the interface that needs to be called to execute the test case. The interface information that needs to be called in different environments is used as different column information for the same test case; whether the interface input parameters and URL are spliced ​​together can be determined according to personal habits; the execution results of the test case can be written according to the actual situation after the subsequent test.

[0050] Step 202, determining a first interface that needs to be called when executing a test case when the business system is running in the original environment; determining a second interface that needs to be called when executing a test case when the business system is running in the target environment.

[0051] Specifically, the designated file corresponding to the business system can be queried to determine the interface that needs to be called when the business system is running in different environments to execute the same test case. For example, taking the test case designed for a certain business system as the first item in Table 1 (test case 1), test case 1 tests the acquisition of the overall page business volume daily dimension data through the business system. It can be seen from Table 1 that when the business system is running in environment A, if test case 1 is executed, the interface http: / / aurl.xx.com / open? dt=2022-06-14 needs to be called. When the business system is running in environment B, if test case 1 is executed, the interface http: / / burl.xx.com / open? dt=2022-06-14 needs to be called.

[0052] During testing, you can use a specified script to read the interface information called by the test case from the specified file line by line, output the interfaces in pairs to the interface list, and then read the interface information in pairs from the interface list to make interface requests.

[0053] For example, for Table 1, the information output to the interface list may be as follows:

[0054] url={["http: / / aurl.xx.com / open?dt=2022-06-14","http: / / burl.xx.com / open?dt=2022-06-14"],["http: / / aurl.xx.com / open?dt=2022-06","http: / / burl.xx.com / open?dt=2022-06"]}.

[0055] Reading interface information in pairs from the interface list to make interface requests can be done as follows:

[0056] Request http: / / aurl.xx.com / open?dt=2022-06-14 to obtain interface data;

[0057] Request http: / / burl.xx.com / open?dt=2022-06-14 to obtain interface data.

[0058] Step 203: call the first interface to execute the test case and obtain first feedback data; call the second interface to execute the test case and obtain second feedback data.

[0059] When the same system runs in different environments, in theory, the operating logic should be consistent, that is, the feedback data for the same function should be consistent. Therefore, the operating logic can be tested by judging the data fed back by calling different interfaces when executing the same test case. If the first feedback data and the second feedback data are the same, it means that when the same system runs in different environments, the test feedback results for a certain function are the same, that is, the test case is executed successfully; conversely, if the first feedback data and the second feedback data are different, the test case fails to execute. Taking the currently executed test case for testing the acquisition of the daily dimension data of the overall page business volume as an example, if the pages obtained through the two interface calls are the same, the test case is executed successfully.

[0060] Step 204: Screen, concatenate and sort the first feedback data to obtain first target data.

[0061] Step 205, screening, splicing and sorting the second feedback data to obtain second target data.

[0062] In order to facilitate data comparison and improve comparison speed and accuracy, the feedback data can be screened, spliced ​​and sorted to obtain the target data, and the target data can be used for data comparison. For example, for two feedback data obtained by calling different interfaces to execute the same test case, one of the feedback data is first processed as follows:

[0063] (1) Exclude the outer part of the string that does not affect the display of page results, and intercept the part that needs to be compared; select some fields that can uniquely confirm a piece of data from the intercepted part, or filter out some non-dimensional fields, such as index data result fields and fields with empty values ​​(value) (none);

[0064] (2) Concatenate the filtered fields to generate an identification key. When the amount of data is very large, this method of concatenating keys can find the problematic data more quickly and can quickly sort the two copies of data.

[0065] (3) Use the identification key to sort in descending or ascending order to obtain the sorted data and ensure that the two copies of data are presented in the same order.

[0066] Do the same process for the other feedback data to obtain two sets of target data. Compare the two sets of target data to obtain the execution result of this test case.

[0067] Step 206, comparing the first target data and the second target data to obtain an execution result of a corresponding test case.

[0068] If the two target data are the same, the execution result of the corresponding test case is determined to be successful; if the two target data are not the same, the execution result of the corresponding test case is determined to be a failure. For example, if both target data are empty, the test case is executed successfully; if one of the two target data is empty and the other is not empty, the test case fails to execute; if both target data are not empty, but the data is different, the test case fails to execute; if both target data are not empty and the data is the same, the test case is executed successfully. After obtaining the execution result of this test case, the execution result of the test case can be written into the "execution result" position of the corresponding test case. For example, in the example shown in Table 1, if the feedback data obtained by executing test case 1 in environment A is different from that obtained by executing test case 1 in environment B, test case 1 fails to execute; if the feedback data obtained by executing test case 2 in environment A is the same as that obtained by executing test case 2 in environment B, test case 2 is executed successfully. Accordingly, after writing the execution result, it can be shown in Table 3 as follows:

[0069]

[0070] Table 3

[0071] Step 207: Determine the test result of the business system according to the execution results of the multiple test cases.

[0072] After executing each test case designed for the business system, the test result of the business system can be determined based on the execution results of each test case. Generally speaking, if the execution results of multiple test cases are all successful, the test result of the business system is determined to be passed; if at least one of the execution results of multiple test cases is a failure, the test result of the business system is determined to be failed.

[0073] Step 208: Display the test results of the business system and display the execution results of multiple test cases.

[0074] Specifically, a test report can be generated based on the test results and displayed. The test report can include the test results of the business system and the execution results of each test case. For example, a test result display page can be as follows: Figure 4 As shown, the number of successfully executed test cases, the number of failed test cases, the number of skipped test cases, the test start time, etc. can be displayed; in addition, the detailed execution data of the test cases can also be displayed; through the comprehensive display, it is convenient for testers to view the test results and locate problems.

[0075] Step 209: locate the test cases with failed execution results from the multiple test cases to obtain the location results.

[0076] For example, for measurement cases whose execution results are failures, a failure case table may be formed and sent to a preset terminal.

[0077] Step 210: Send the positioning result to a preset terminal.

[0078] Relevant personnel (such as R&D personnel) can view the positioning results through the preset terminal and modify or optimize the business system according to the positioning results. After modification or optimization, the business system can be tested again according to the test method provided in this embodiment until the test passes, so that the failed test cases can be efficiently regressed. Using the method provided in this embodiment, it is also possible to continuously monitor the operating effects of the same business system in different environments, so as to detect anomalies in a timely manner and improve system stability.

[0079] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0080] In an embodiment of the present invention, a test case designed for a business system can be obtained; a first interface that needs to be called to execute the test case when the business system is running in the original environment is determined; a second interface that needs to be called to execute the test case when the business system is running in the target environment is determined; the first interface is called to execute the test case to obtain first feedback data; the second interface is called to execute the test case to obtain second feedback data; the first feedback data and the second feedback data are compared to obtain the test result of the business system. That is, the present invention implements the test case in the form of an interface call, and the test result of the business system can be obtained by comparing the execution results when calling different interfaces to execute the same test case. The entire test process can be automatically implemented by relying on scripts or programs, and no longer relies on manual labor. The degree of automation is high, and both the main process and detail points of the business system can be tested. The test coverage is more complete, the risk of system failure is reduced, and the test time is saved.

[0081] Figure 5 1 is a schematic diagram of a structure of a testing device for a business system provided by an embodiment of the present invention, and the device is suitable for executing a testing method for a business system provided by an embodiment of the present invention. Figure 5 As shown, the device may specifically include:

[0082] An acquisition module 401 is used to acquire test cases designed for a business system;

[0083] Determination module 402, used to determine the first interface that needs to be called when the business system is running in the original environment to execute the test case; determine the second interface that needs to be called when the business system is running in the target environment to execute the test case;

[0084] An execution module 403 is configured to call the first interface to execute the test case and obtain first feedback data; and call the second interface to execute the test case and obtain second feedback data;

[0085] The comparison module 404 is used to compare the first feedback data with the second feedback data to obtain the test result of the business system.

[0086] In one embodiment, the comparison module 404 is specifically used for:

[0087] Screening, splicing and sorting the first feedback data to obtain first target data;

[0088] Screening, splicing and sorting the second feedback data to obtain second target data;

[0089] The first target data and the second target data are compared to obtain a test result of the business system.

[0090] In one embodiment, the test case includes a plurality of test cases, and the comparison module 404 compares the first target data with the second target data to obtain a test result of the business system, including:

[0091] Comparing the first target data with the second target data to obtain an execution result of a corresponding test case;

[0092] The test result of the business system is determined according to the execution results of the multiple test cases.

[0093] In one embodiment, the comparison module 404 compares the first target data and the second target data to obtain an execution result of a corresponding test case, including:

[0094] If the first target data and the second target data are the same, determining that the execution result of a corresponding test case is successful;

[0095] If the first target data and the second target data are different, it is determined that the execution result of a corresponding test case is failure.

[0096] In one embodiment, the comparison module 404 determines the test result of the business system according to the execution results of the multiple test cases, including:

[0097] If the execution results of the multiple test cases are all successful, determining that the test result of the business system is passed;

[0098] If at least one of the execution results of the multiple test cases is a failure, it is determined that the test result of the business system is a failure.

[0099] In one embodiment, the device further comprises:

[0100] The display module is used to display the test results of the business system and the execution results of the multiple test cases.

[0101] In one embodiment, the device further comprises:

[0102] A positioning module, used to locate the test case with a failed execution result from the multiple test cases to obtain a positioning result;

[0103] The sending module is used to send the positioning result to a preset terminal.

[0104] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0105] The device of the embodiment of the present invention can obtain the test case designed for the business system; determine the first interface that needs to be called to execute the test case when the business system is running in the original environment; determine the second interface that needs to be called to execute the test case when the business system is running in the target environment; call the first interface to execute the test case to obtain the first feedback data; call the second interface to execute the test case to obtain the second feedback data; compare the first feedback data and the second feedback data to obtain the test result of the business system. That is, the present invention implements the test case in the form of interface call, and compares the execution results when calling different interfaces to execute the same test case, so as to obtain the test result of the business system. The entire test process can be automatically implemented by relying on scripts or programs, and no longer relies on manual labor. The degree of automation is high, and both the main process and detail points of the business system can be tested. The test coverage is more complete, the risk of system failure is reduced, and the test time is saved.

[0106] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the business system testing method provided in any of the above embodiments is implemented.

[0107] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method for testing the business system provided by any of the above embodiments is implemented.

[0108] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 500 of an electronic device suitable for implementing an embodiment of the present invention. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0109] like Figure 6As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0110] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0111] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0112] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. 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.

[0114] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be arranged in a processor, for example, it may be described as follows: a processor includes an acquisition module, a determination module, an execution module, and a comparison module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.

[0115] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining a test case designed for a business system; determining a first interface that needs to be called to execute the test case when the business system is running in the original environment; determining a second interface that needs to be called to execute the test case when the business system is running in the target environment; calling the first interface to execute the test case and obtain first feedback data; calling the second interface to execute the test case and obtain second feedback data; comparing the first feedback data and the second feedback data to obtain the test result of the business system.

[0116] According to the technical solution of the embodiment of the present invention, a test case designed for a business system can be obtained; a first interface that needs to be called to execute the test case when the business system is running in the original environment is determined; a second interface that needs to be called to execute the test case when the business system is running in the target environment is determined; the first interface is called to execute the test case to obtain first feedback data; the second interface is called to execute the test case to obtain second feedback data; the first feedback data and the second feedback data are compared to obtain the test result of the business system. That is, the present invention implements the test case in the form of an interface call, and the test result of the business system can be obtained by comparing the execution results when calling different interfaces to execute the same test case. The entire test process can be automatically implemented by relying on scripts or programs, and no longer relies on manual labor. The degree of automation is high, and both the main process and detail points of the business system can be tested. The test coverage is more complete, the risk of system failure is reduced, and the test time is saved.

[0117] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for testing a business system, characterized in that: include: Obtain test cases designed for business systems; Determine a first interface that needs to be called when executing the test case when the business system is running in the original environment; Determine a second interface that needs to be called when executing the test case when the business system is running in the target environment; Calling the first interface to execute the test case and obtain first feedback data; Calling the second interface to execute the test case and obtain second feedback data; The first feedback data and the second feedback data are compared to obtain a test result of the business system.

2. The method according to claim 1, characterized in that The comparing the first feedback data with the second feedback data to obtain a test result of the business system includes: Screening, splicing and sorting the first feedback data to obtain first target data; Screening, splicing and sorting the second feedback data to obtain second target data; The first target data and the second target data are compared to obtain a test result of the business system.

3. The method according to claim 2, characterized in that The test case includes a plurality of test cases, and the comparing the first target data with the second target data to obtain the test result of the business system includes: Comparing the first target data with the second target data to obtain an execution result of a corresponding test case; The test result of the business system is determined according to the execution results of the multiple test cases.

4. The method according to claim 3, characterized in that The comparing the first target data and the second target data to obtain an execution result of a corresponding test case includes: If the first target data and the second target data are the same, determining that the execution result of a corresponding test case is successful; If the first target data and the second target data are different, it is determined that the execution result of a corresponding test case is failure.

5. The method according to claim 4, characterized in that Determining the test result of the business system according to the execution results of the multiple test cases includes: If the execution results of the multiple test cases are all successful, determining that the test result of the business system is passed; If at least one of the execution results of the multiple test cases is a failure, it is determined that the test result of the business system is a failure.

6. The method according to claim 5, characterized in that The method further comprises: The test results of the business system are displayed, and the execution results of the multiple test cases are displayed.

7. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: Locate the test cases whose execution results are failures from the multiple test cases to obtain a location result; The positioning result is sent to a preset terminal.

8. A testing device for a business system, characterized in that: include: The acquisition module is used to obtain test cases designed for the business system; A determination module is used to determine a first interface that needs to be called when the business system is running in the original environment to execute the test case; and to determine a second interface that needs to be called when the business system is running in the target environment to execute the test case; An execution module, configured to call the first interface to execute the test case and obtain first feedback data; Calling the second interface to execute the test case and obtain second feedback data; A comparison module is used to compare the first feedback data with the second feedback data to obtain a test result of the business system.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the business system testing method as described in any one of claims 1 to 7 is implemented.

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