Software function testing method and apparatus

By classifying software functions and setting predictive judgment results, and matching test results to determine the normality or abnormality of software functions, the problems of accuracy and timeliness of testing on big data platforms are solved, and fast, comprehensive and accurate testing results are achieved.

CN114356781BActive Publication Date: 2026-07-24KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210030345.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2026-07-24
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

Existing software functional testing methods struggle to guarantee data accuracy and coverage on big data platforms, and their timeliness is also low.

Method used

By classifying software functions, setting predictive judgment results, and matching test results with predictive judgment results during testing, the normality or abnormality of software functions can be determined.

Benefits of technology

It enables rapid, comprehensive, and accurate software testing at low cost, shortens anomaly localization time, reduces labor costs, and improves testing and development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356781B_ABST
    Figure CN114356781B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure provides a software function testing method and device, the method comprises the following steps: classifying software functions of a software to be tested according to the software functions; obtaining test results of testing each type of software function respectively; determining whether the test results match corresponding predicted judgment results set, if yes, determining that the software function corresponding to the software to be tested is normal; otherwise, determining that the software function corresponding to the software to be tested is abnormal. The method can test the software quickly, comprehensively and accurately under the premise of low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a software function testing method and apparatus. Background Technology

[0002] As platforms become increasingly data-driven, the types and sources of software business data on these platforms are too numerous, and there are many business flows and functionalities. Different user roles also have different data scenarios. For this type of big data testing project, manual black-box testing and manual spot checks are difficult to guarantee the accuracy and coverage of the data, and the timeliness is also low. Summary of the Invention

[0003] In view of this, this application provides a software functional testing method and apparatus that can perform rapid, comprehensive and accurate testing of software at low cost.

[0004] To solve the above-mentioned technical problems, the technical solution of this application is implemented as follows:

[0005] In one embodiment, a software functional testing method is provided, the method comprising:

[0006] The software to be tested should be categorized according to its functions.

[0007] Obtain test results for each type of software function separately;

[0008] Determine whether the test result matches the corresponding prediction result set. If they match, determine that the software function corresponding to the software under test is normal; otherwise, determine that the software function corresponding to the software under test is abnormal.

[0009] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the software function testing method described above.

[0010] In another embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the software function testing method.

[0011] In another embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the software function testing method.

[0012] As can be seen from the above technical solutions, the software to be tested is classified according to its functions in the above embodiments. Based on the data used for testing and the pre-set corresponding predictive judgment results for the testing functions, test results are obtained when testing the corresponding software functions. The normality of the corresponding software function is determined by matching the test results with the corresponding predictive judgment results. This method enables rapid, comprehensive, and accurate testing of software at low cost. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of the software function testing process in Embodiment 1 of this application;

[0015] Figure 2 This is a schematic diagram of the software function testing process in Embodiment 2 of this application;

[0016] Figure 3 This is a schematic diagram of the software function testing process in Embodiment 3 of this application;

[0017] Figure 4 This is a schematic diagram of the software function testing device in the embodiments of this application;

[0018] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] The technical solution of the present invention will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0022] This application provides a software function testing method. The method categorizes the software to be tested according to its functions, pre-sets corresponding predictive judgment results based on the test data and functions, and obtains test results when testing the corresponding software functions. By matching the test results with the corresponding predictive judgment results, the method determines whether the corresponding software function is functioning correctly. This method enables rapid, comprehensive, and accurate software testing at low cost.

[0023] The software function testing process in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0024] Example 1

[0025] See Figure 1 , Figure 1 This is a schematic diagram of the software function testing process in Embodiment 1 of this application. The specific steps are as follows:

[0026] Step 101: Classify the software to be tested according to its functions.

[0027] The software functions in this application embodiment can be classified according to the method of acquiring data, including: automatic data synchronization, manual data upload, and manual data upload and processing.

[0028] In specific implementations, depending on the software being tested, it may include any one or any combination of the following software functions:

[0029] Automatic data synchronization, manual data upload, and manual data upload and processing.

[0030] Before testing each type of software function, it is necessary to set predictive judgment data based on the test data used, application scenarios, and relevant processing rules.

[0031] Step 102: Obtain the test results for each type of software function.

[0032] Step 103: Determine whether the test result matches the corresponding prediction result set. If yes, proceed to step 104; otherwise, proceed to step 105.

[0033] Step 104: Confirm that the software function corresponding to the software under test is normal.

[0034] Step 105: Determine if the software function corresponding to the software under test is abnormal.

[0035] In this embodiment, the software to be tested is categorized according to its functions. Based on the data used for testing and the pre-set predictive judgment results for the corresponding functions, test results are obtained when testing the corresponding software functions. The normality of the corresponding software function is determined by matching the test results with the corresponding predictive judgment results. This method enables rapid, comprehensive, and accurate software testing at low cost.

[0036] Example 2

[0037] See Figure 2 , Figure 2 This is a schematic diagram of the software function testing process in Embodiment 2 of this application. The specific steps are as follows:

[0038] Step 201: Classify the software to be tested according to its functions.

[0039] The methods of acquiring data in this application embodiment are classified as follows: automatic data synchronization, manual data upload, and manual data upload and processing.

[0040] In specific implementations, depending on the software being tested, it may include any one or any combination of the following software functions:

[0041] Automatic data synchronization, manual data upload, and manual data upload and processing.

[0042] Taking a real estate big data platform as an example, it has multiple functions, and the data information involved includes: basic property information, physical stores, group property information, personnel structure information, operational structure information, commercial district property information, commercial district store information, supplementary property information, property grid, expert store information, and market online transaction data, etc.

[0043] Based on the data acquisition method, the above information acquisition methods are divided into three categories:

[0044] Automatically synchronize data: basic property information, physical stores, group property information, personnel structure information, operational structure information, and business district property information;

[0045] Manually upload data: supplementary information about the property, property grid, and information about expert stores;

[0046] Manually upload and process data: Market online contract signing data.

[0047] Step 202: If the software function included in the software to be tested includes automatic data synchronization, then set the data synchronization task and the time point for executing the data synchronization task.

[0048] In practice, a data synchronization task is set up in the database or job scheduling platform to automatically synchronize the following data:

[0049] Includes basic building information, physical stores, group-based building information, personnel structure information, operational structure information, and business district building information.

[0050] When setting up a data synchronization task, specify the fields required to synchronize the aforementioned data, as well as the time point for executing the data synchronization task.

[0051] When the specified time point is reached, the data synchronization task will be executed automatically.

[0052] Step 203: Set the prediction judgment result based on the data fields of the synchronized data in the data synchronization task.

[0053] If the basic building information includes data fields such as city ID, city name, building ID, and building name, then the prediction result will be based on these data fields.

[0054] Step 204: Obtain the data fields corresponding to the synchronized data obtained after executing the data synchronization task as the test result.

[0055] Step 205: Determine whether the test result matches the corresponding prediction result. If yes, determine that the automatic data synchronization function of the software under test is normal; otherwise, determine that the automatic data synchronization function of the software under test is abnormal. End this process.

[0056] In practice, if it is determined that the test result does not match the corresponding prediction result set, and the data fields included in the test result contain data fields not included in the prediction result, then the preset judgment result is updated according to the test result, the data synchronization task is set again, and the time point for executing the data synchronization task is tested.

[0057] The specific method for updating the preset judgment result is not limited in this application embodiment. It can be that corresponding data fields are added to the predicted judgment result based on the test result.

[0058] Once it is confirmed that the software function of automatic data synchronization of the software under test is normal, the data synchronization time, synchronization success, and data synchronization result can be output.

[0059] The output method can be sent to a device for display, or it can be displayed on the local device.

[0060] When it is determined that the software function of automatic data synchronization of the software under test is abnormal, the data synchronization time and synchronization failure information can be output.

[0061] Step 206: If the software function included in the software to be tested includes manual data upload, then set the corresponding prediction and judgment result based on the data to be manually uploaded.

[0062] If manually uploaded data includes: supplementary information about the property, property grid, and expert store information, the prediction result will be the corresponding data.

[0063] Step 207: Obtain the data after manually uploading data based on the software under test as the test result.

[0064] Upload the data to be manually uploaded, and obtain the test results by downloading the uploaded data.

[0065] Step 208: Determine whether the test result matches the corresponding prediction result. If yes, determine that the manual data upload function of the software under test is normal; otherwise, determine that the manual data upload function of the software under test is abnormal. End this process.

[0066] Once it is confirmed that the software function of manually synchronizing data in the software under test is normal, the data upload time, data upload success, and data upload result can be output.

[0067] The output method can be sent to a device for display, or it can be displayed on the local device.

[0068] When it is determined that the software function of manually synchronizing data in the software under test is abnormal, the data upload time and upload failure information can be output.

[0069] Step 209: If the software function included in the software to be tested includes manually uploading and processing data, then based on the data to be manually uploaded and the preset processing rules, set the corresponding prediction and judgment result.

[0070] Step 210: Obtain the test result by manually uploading data based on the software under test and processing it according to preset processing rules.

[0071] Taking market share online contract signing data as an example, some data needs to be manually uploaded and then processed according to preset rules to complete the entire testing process, specifically:

[0072] Data imported manually;

[0073] The manually imported data is processed according to preset rules to obtain the processed results as the test results.

[0074] Step 211: Determine whether the test result matches the corresponding prediction result. If yes, determine that the manual data upload and processing function of the software under test is normal; otherwise, determine that the manual data upload and processing function of the software under test is abnormal.

[0075] Once it is confirmed that the manual synchronization of data in the software under test is normal and the software function is being processed, the data upload time, processing success, and data processing result can be output.

[0076] The output method can be sent to a device for display, or it can be displayed on the local device.

[0077] When determining the manual synchronization data of the software under test and handling this software function anomaly, the data upload time and upload processing failure information can be output.

[0078] In this embodiment, the software to be tested is categorized according to its functions into three types: automatically synchronized data, manually uploaded data, and manually uploaded data with processing. Based on the data used for testing and the pre-set predictive judgment results for the corresponding test functions, test results are obtained when testing the corresponding software functions. The normality of the corresponding software function is determined by matching the test results with the corresponding predictive judgment results. This method enables rapid, comprehensive, and accurate software testing at low cost.

[0079] In this embodiment of the application, when the corresponding software function is found to be abnormal, the cause of the bug can be eliminated based on the test data used, which greatly shortens the time for abnormal location, reduces manpower costs, and improves testing and development efficiency.

[0080] Example 3

[0081] See Figure 3 , Figure 3 This is a schematic diagram of the software function testing process in Embodiment 3 of this application. The specific steps are as follows:

[0082] Step 301: Obtain first data from the first platform based on the set data fields. Proceed to step 302.

[0083] Step 302: Obtain second data from the second platform based on the set data fields.

[0084] Step 303: Determine whether the first data and the second data match to verify whether the platform implementation logic is abnormal.

[0085] In this embodiment, the two platforms can be a business management platform and an analysis management platform, and the data source for both platforms is the same data management platform.

[0086] Given the different development staff and code logic assigned to the two platforms, the calculation results of some data displayed on different platforms for different roles should be consistent according to requirements. For example, the transaction volume, offer rate, area matching degree, and other data displayed on the two platforms should be consistent. If they are inconsistent, it means that the logic implementation of at least one platform is abnormal.

[0087] Based on the same inventive concept, this application also provides a software function testing device. See also Figure 4 , Figure 4 This is a schematic diagram of the software function testing device in an embodiment of this application. The device includes: a classification unit 401, a setting unit 402, an acquisition unit 403, and a determination unit 404.

[0088] Classification unit 401 is used to classify the software to be tested according to its functions.

[0089] Setting unit 402 is used to set corresponding prediction judgment results for each type of software function after classification by classification unit 401;

[0090] The acquisition unit 403 is used to acquire the test results of each type of software function after being classified by the classification unit 401.

[0091] The acquisition unit 404 is used to determine whether the test result acquired by the acquisition unit 403 matches the corresponding prediction judgment result set by the setting unit 402. If they match, the software function corresponding to the software under test is determined to be normal; otherwise, the software function corresponding to the software under test is determined to be abnormal.

[0092] In another embodiment,

[0093] Setting unit 402 is specifically used to set a prediction judgment result based on the data field of the synchronized data in the data synchronization task if the software function included in the software to be tested includes automatic data synchronization.

[0094] The acquisition unit 403 is specifically used to set a data synchronization task and the time point for executing the data synchronization task when acquiring test results for the software function of automatic data synchronization; and to acquire the data field corresponding to the synchronized data obtained after executing the data synchronization task as the test result.

[0095] In another embodiment,

[0096] The setting unit 402 is further configured to update the preset judgment result according to the test result if the acquisition unit 404 determines that the test result does not match the corresponding prediction judgment result set, and the data fields included in the test result contain data fields not included in the prediction judgment result, and then set the data synchronization task again, and perform the test at the time point of executing the data synchronization task.

[0097] In another embodiment,

[0098] Setting unit 402 is specifically used to set a corresponding prediction judgment result based on the data to be manually uploaded if the software function included in the software to be tested includes manual data upload.

[0099] The acquisition unit 403 is specifically used to acquire the data after manually uploading data based on the software under test as the test result when acquiring test results for the software function of manually uploading data.

[0100] In another embodiment,

[0101] Setting unit 402 is specifically used to set a corresponding prediction and judgment result based on the data to be manually uploaded and the preset processing rules when the software function included in the software to be tested includes manually uploading and processing data.

[0102] The acquisition unit 403 is specifically used to acquire, when obtaining test results for the software function of manually uploading and processing data, the data after being manually uploaded based on the software under test and processed according to preset processing rules as the test result.

[0103] In another embodiment,

[0104] The first acquisition unit is further configured to acquire first data from a first platform based on a set data field; and acquire second data from a second platform based on a set data field.

[0105] The acquisition unit 404 is further used to determine whether the first data and the second data match to verify whether the platform implementation logic is abnormal.

[0106] The units in the above embodiments can be integrated into one unit or deployed separately; they can be merged into one unit or further divided into multiple sub-units.

[0107] In another embodiment, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the software function testing method.

[0108] In another embodiment, a computer-readable storage medium is also provided, on which computer instructions are stored, which, when executed by a processor, can implement the steps in the software function testing method.

[0109] In another embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the software function testing method.

[0110] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute the following methods:

[0111] The software to be tested should be categorized according to its functions.

[0112] Obtain test results for each type of software function separately;

[0113] Determine whether the test result matches the corresponding prediction result set. If they match, determine that the software function corresponding to the software under test is normal; otherwise, determine that the software function corresponding to the software under test is abnormal.

[0114] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0115] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A software functional testing method, characterized in that, The method includes: The software to be tested should be categorized according to its functions. Obtain test results for each type of software function separately; Determine whether the test result matches the corresponding prediction result set. If yes, determine that the software function corresponding to the software under test is normal; otherwise, determine that the software function corresponding to the software under test is abnormal. If the software under test includes the function of automatic data synchronization, the method further includes: The prediction and judgment results are set based on the data fields of the synchronized data in the data synchronization task; To obtain test results for the software function of automatic data synchronization, the following steps are taken: setting up a data synchronization task and the time point for executing the data synchronization task; and obtaining the data fields corresponding to the synchronized data obtained after executing the data synchronization task as test results. If the test result is determined to be inconsistent with the corresponding prediction result set, and the test result includes data fields that are not included in the prediction result, then the preset judgment result is updated according to the test result, the data synchronization task is set again, and the time point for executing the data synchronization task is tested.

2. The method according to claim 1, characterized in that, If the software function included in the software to be tested includes manual data upload, the method further includes: setting a corresponding prediction and judgment result based on the data to be manually uploaded; Test results were obtained for the software function of manually uploading data, including: The test results are obtained by manually uploading data based on the software under test.

3. The method according to claim 1, characterized in that, If the software function included in the software to be tested includes manually uploading and processing data, the method further includes: setting a corresponding prediction and judgment result based on the data to be manually uploaded and preset processing rules; Test results were obtained for the software function of manually uploading and processing data, including: The test result is obtained by manually uploading data based on the software under test and processing it according to preset processing rules.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The first data is obtained from the first platform based on the set data fields; Retrieve second data from the second platform based on the set data fields; Determine whether the first data and the second data match to verify whether the platform implementation logic is abnormal.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data synchronization verification method and device and computer equipment

    CN110162461A

  • Software system testing method and device, terminal equipment and storage medium

    CN113238930A

  • Dual system arithmetic processing unit and dual system arithmetic processing method

    JP2012022429A