Software testing method and system, electronic equipment and storage medium

By obtaining data from the trigger domain, data domain and business domain configuration of the software, combined with user historical data, and simulating real business scenarios to test the software, the problem of low test comprehensiveness in the existing technology is solved and the reliability of software testing is improved. sex and comprehensiveness.

CN118820079APending Publication Date: 2024-10-22DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410801861.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

When existing software testing methods add new software functions or reconstruct software, it is difficult to accurately simulate certain specific behaviors that are difficult to trigger through traffic playback, resulting in low comprehensiveness of testing.

Method used

By parsing data from the preset trigger domain, data domain and business domain configuration of the target software, obtaining identification data and preset verification rules, combined with user historical data, simulating the call path in real business scenarios, and performing functional testing on the target software and data consistency check.

Benefits of technology

It improves the comprehensiveness and reliability of software testing, can more accurately simulate various application scenarios in real scenarios, and enhances the robustness of the target software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820079A_ABST
    Figure CN118820079A_ABST
Patent Text Reader

Abstract

The invention provides a software testing method and system, electronic equipment and a storage medium, and the method comprises the steps: configuring a trigger domain, a data domain and a service domain in advance for to-be-tested software, configuring and obtaining identification data and a preset verification rule based on the trigger domain, determining a database based on the data domain, obtaining test data from the database based on the identification data, and sending the test data to a server; real historical data of a user is stored in the database, then, according to service domain configuration, all function interfaces are called in sequence to input test data, and a processing result is obtained and verified. The to-be-called interface and the calling sequence of the interface are simulation of a possible calling path in a real business scene, target software is tested based on real data of a user in combination with the simulation path, various scenes which the target software can be possibly applied to in the real scene can be simulated, the test comprehensiveness and reliability are improved, and the test efficiency is improved. And by configuring the trigger domain, the data domain and the service domain, the test reliability of the target software is improved through a multi-stage verification mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to a software testing method, system, electronic equipment and storage medium. Background Art

[0002] Currently, software usually needs to be tested before it goes online. With the development of Internet technology and enterprise business, software is becoming more and more complex, and the business scenarios of software are also becoming more and more complex. When adding new software functions or refactoring software, the lack of software testing scenarios becomes a major challenge.

[0003] In the related art, software testing is usually performed through traffic replay, which is usually based on actual user requests captured previously. However, there are some specific behaviors that are difficult to trigger and there may be few online requests. It is difficult to accurately simulate such scenarios through traffic replay, resulting in less comprehensive software testing. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a software testing method, system, electronic device, and storage medium to improve the comprehensiveness of test scenarios, thereby improving the comprehensiveness and reliability of software testing.

[0005] According to one aspect of the present invention, there is provided a software testing method, the method comprising:

[0006] Parsing a trigger source and a data acquisition script from a trigger domain configuration preset for the target software to be tested, and acquiring identification data through the data acquisition script; wherein the identification data is used to acquire preset variables in a preset verification rule from the trigger source, and the preset verification rule is used to implement a verification logic for functional testing and data consistency of the target software;

[0007] Obtaining a database configuration from a data domain configuration preset for the target software, wherein the database configuration includes a database where the test data of the target software is located, and the database stores user historical data;

[0008] Based on the identification data, acquiring test data from the database, the test data being the data value of the preset variable;

[0009] Acquire multiple interface group information from the business domain configuration preset for the target software, wherein each of the interface group information includes an interface to be called and a calling order of each of the interfaces to be called;

[0010] Transfer each of the test data to the corresponding interface group, and obtain the processing result returned by the interface group;

[0011] The processing result is verified based on the preset verification rule, and if the processing result passes the verification, it is determined that the target software has passed the test.

[0012] In a possible embodiment, the data domain configuration further includes: a data query script and a query SQL, wherein the query SQL includes a query statement and a query variable;

[0013] The acquiring test data from the database based on the identification data comprises:

[0014] Execute the data query script to parse the identification data corresponding to the query variables included in the query SQL;

[0015] Writing identification data corresponding to the query variables included in the query SQL into the query SQL to obtain a target SQL;

[0016] The test data is obtained from the database through the target SQL.

[0017] In a possible embodiment, the data domain configuration includes multiple groups of data table configurations, and the data table configuration includes a database associated with the data table; user historical data is stored in different data tables of the database; and there is a data dependency relationship between the multiple groups of data table configurations;

[0018] The acquiring test data from the database based on the identification data comprises:

[0019] sorting the multiple groups of data table configurations based on the data dependency relationships between the multiple groups of data table configurations;

[0020] According to the order of the plurality of groups of data table configurations, based on the identification data, sequentially acquiring test data from the database associated with each of the data table configurations;

[0021] The method further comprises:

[0022] Adding the test data to the identification data variable;

[0023] The step of transferring each of the test data to the corresponding interface group and obtaining the processing result returned by the interface group includes:

[0024] The identification data variable is passed into the corresponding interface group to obtain the processing result returned by the interface group.

[0025] In a possible embodiment, the method further includes:

[0026] The trigger domain configuration, data domain configuration and business domain configuration are received through a preset front-end page, wherein the trigger domain configuration includes identification data and preset verification rules, the data domain configuration includes database configuration, and the business domain configuration includes multiple interface group information.

[0027] In a possible embodiment, the method further includes:

[0028] When the timing conditions are met, the steps of parsing the trigger source and data acquisition script from the trigger domain configuration preset for the target software to be tested, and acquiring identification data through the data acquisition script are executed to trigger functional testing and data consistency verification of the target software.

[0029] According to another aspect of the present invention, there is provided a software testing system, the system comprising:

[0030] A trigger domain parsing module, used to parse the trigger source and the data acquisition script from the trigger domain configuration preset for the target software to be tested, and obtain identification data through the data acquisition script; wherein the identification data is used to obtain the preset variables in the preset verification rules from the trigger source, and the preset verification rules are used to implement the verification logic of the function test and data consistency of the target software;

[0031] A data domain parsing module, used to obtain a database configuration from a data domain configuration preset for the target software, wherein the database configuration includes a database where the test data of the target software is located, and the database stores user historical data;

[0032] A data acquisition module, used to acquire test data from the database based on the identification data, wherein the test data is the data value of the preset variable;

[0033] A business domain parsing module, used to obtain a plurality of interface group information from a business domain configuration preset for the target software, wherein each of the interface group information includes an interface to be called and a calling order of each of the interfaces to be called;

[0034] An input module, used to input each of the test data into the corresponding interface group, and obtain the processing result returned by the interface group;

[0035] The verification module is used to verify the processing result based on the preset verification rule, and determine that the target software passes the test when the processing result passes the verification.

[0036] In a possible embodiment, the system further includes: a configuration layer;

[0037] The configuration layer is used to receive input trigger domain configuration, data domain configuration and business domain configuration through a preset front-end page, wherein the trigger domain configuration includes identification data and preset verification rules, the data domain configuration includes multiple database configurations and multiple groups of data table configurations, wherein user historical data is stored in different data tables of the database; the data table configuration includes a database associated with the data table, and the business domain configuration includes multiple interface group information.

[0038] In a possible embodiment, the system further includes: a timing scheduling module;

[0039] The timing scheduling module is used to control the trigger domain resolution module to start working when the timing condition is met.

[0040] According to another aspect of the present invention, there is provided an electronic device, comprising:

[0041] Processor; and

[0042] Memory for storing programs,

[0043] The program includes instructions, which, when executed by the processor, enable the processor to execute any of the software testing methods described above.

[0044] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any of the above-mentioned software testing methods.

[0045] One or more technical solutions provided in the embodiments of the present invention configure the trigger domain, data domain and business domain for the software to be tested in advance, obtain identification data and preset verification rules based on the trigger domain configuration, determine database information based on the data domain, the database stores the user's real historical data, and obtain test data from the database based on the identification data, and then call each functional interface in sequence according to the business domain configuration, and input the corresponding test data to obtain the processing result of the target software, and verify the processing result, and determine that the target software passes the test when the processing result passes the verification. The interface to be called and the calling sequence of the interface are the simulation of the possible calling path in the real business scenario. By testing the target software based on the user's real data combined with the simulation path, various scenarios that the target software may be applied to in the real scenario can be simulated to improve the comprehensiveness and reliability of the test. At the same time, by configuring the trigger domain, data domain and business domain, the target software is tested and verified, and the reliability of the target software test is improved through multi-level verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0047] Figure 1 A schematic diagram of a flow chart of a software testing method provided by an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the structure of a software testing system provided by an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of an architecture of a software testing system provided by an embodiment of the present invention;

[0050] Figure 4 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0051] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0052] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0053] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0054] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0055] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0056] In order to improve the reliability of software testing, the embodiments of the present invention provide a software testing method, system, electronic device and storage medium. The software testing method provided by the embodiments of the present invention can be applied to any electronic device with a software testing function, which can be a computer, a server or a mobile terminal, etc. The scheme of the present invention is described below with reference to the accompanying drawings:

[0057] Figure 1 A flowchart of a software testing method provided by an embodiment of the present invention, the method may include the following steps:

[0058] S101, parsing a trigger source and a data acquisition script from a trigger domain configuration preset for the target software to be tested, and acquiring identification data through the data acquisition script; wherein the identification data is used to acquire a preset variable in a preset verification rule from the trigger source, and the preset verification rule is used to implement a verification logic for functional testing and data consistency of the target software;

[0059] S102, acquiring a database configuration from a data domain configuration preset for the target software, wherein the database configuration includes a database where test data of the target software is located, and the database stores user historical data;

[0060] S103, based on the identification data, obtaining test data from the database, the test data being the data value of the preset variable;

[0061] S104, acquiring a plurality of interface group information from a preset business domain configuration for the target software, wherein each of the interface group information includes an interface to be called and a calling order of each of the interfaces to be called;

[0062] S105, transferring each of the test data to the corresponding interface group, and obtaining the processing result returned by the interface group;

[0063] S106: Verify the processing result based on the preset verification rule, and determine that the target software passes the test if the processing result passes the verification.

[0064] By applying the embodiment of the present invention, the trigger domain, data domain and business domain are configured in advance for the software to be tested, and identification data and preset verification rules are obtained based on the trigger domain configuration, and database information is determined based on the data domain. The database stores the real historical data of the user, and test data is obtained from the database based on the identification data. Then, according to the business domain configuration, each functional interface is called in sequence, and the corresponding test data is input to obtain the processing result of the target software, and the processing result is verified. If the processing result passes the verification, it is determined that the target software has passed the test. The interface to be called and the calling sequence of the interface are the simulation of the possible calling path in the real business scenario. By testing the target software based on the real user data combined with the simulation path, various scenarios that the target software may be applied to in the real scenario can be simulated to improve the comprehensiveness and reliability of the test. At the same time, by configuring the trigger domain, data domain and business domain, the target software is tested and verified, and the reliability of the target software test is improved through multi-level verification.

[0065] The above S101-S106 are exemplarily described below:

[0066] The target software to be tested may be any software, such as mobile phone software or PC software, and the present invention does not make any specific limitation on this.

[0067] In the embodiment of the present invention, various configurations can be pre-performed for the target software to be tested, including trigger domain configuration, data domain configuration and business domain configuration, wherein the trigger domain configuration includes the data source information of the target software, the data query benchmark of the target software, etc., the data domain configuration includes the configuration information of the target software related database, and can provide a test data query database, and the business domain includes the interface configuration of the target software and the interface call sequence configuration, etc.

[0068] In a possible embodiment, the trigger domain may include a trigger data source and identification data, wherein the trigger source refers to the data source that the target software needs to query when processing a request, and the identification data refers to the data that the target software needs to rely on when querying data when processing a request, that is, a preset data type, which can be determined based on an actual business scenario. Exemplarily, a database storing user historical data stores a variety of information such as user identification, user order data, user behavior data, and merchant order data. At this time, if a user's historical data needs to be queried, the user identification can be used as identification data to query the database storing the user's historical data to obtain the user's historical data.

[0069] The trigger source and identification data can be flexibly set for different application scenarios of the target software. The present invention does not specifically limit this. The target software can have multiple trigger domain configurations, and each trigger domain configuration can have multiple trigger sources and identification data. Exemplarily, if the functions that can be implemented by the target software include querying user history data and querying order sales data, then for the query user history data function, the data source can be set to user history data, and the identification data can be set to user identification. For the query order sales data function, the data source can be set to a database storing merchant history data, and the identification data can be set to order identification.

[0070] In a possible embodiment, the trigger domain configuration may further include a data acquisition script, which may acquire corresponding identification data from a data source based on the trigger domain configuration. The data acquisition script may be compiled in any compiled language, such as groovy, python, etc.

[0071] In a possible embodiment, the trigger domain configuration may also include a preset verification rule, which is used to implement the verification logic of the function test and data consistency of the target software. Specifically, the preset verification rule may include the preset variable to be verified and the method of verifying the preset variable. The specific content can be flexibly set according to the actual application scenario. For example, if it is necessary to verify whether the order amount of a certain user returned by the business system is correct, the preset variable in the preset verification rule corresponding to the application scenario is the user ID, and the verification content is whether the user order amount obtained by the business system based on the user ID is consistent with the order amount in the database.

[0072] In a possible embodiment, the trigger domain configuration may be performed according to the trigger domain configuration table shown below:

[0073] Table 1. Trigger domain configuration table

[0074]

[0075] In a possible embodiment, the data domain configuration may include a database configuration related to the target software, wherein the database configuration may include a database address, a database name, a database user name, a database password, etc. In actual use of a database, user data is usually stored in a sub-table and / or partition manner to improve the efficiency of data query, therefore, the data domain configuration may also include a data table configuration, wherein the data table configuration may include a sub-library strategy, a sub-table strategy, and database information associated with a data table, etc. The database information associated with the data table may be a database address, a database name, etc.

[0076] The above data table configuration may also include query SQL and data query scripts, wherein query SQL refers to the SQL format used to query the data table, and the variables in the query SQL can be replaced by custom placeholders. The above data query script can be written in any programming language, and the business logic implemented is to select the identification data based on the variables in the query SQL, so as to use the identification data as the variables in the SQL and query the value corresponding to the identification data.

[0077] In a possible embodiment, in an actual business scenario, when the software processes a business request, it may need to call multiple databases, data tables, etc. Therefore, the above data table configuration may also include a query order for the data tables, and the query order can be determined based on the data dependency relationship between the data tables.

[0078] As a possible implementation, the data domain may be configured according to the following data domain configuration table:

[0079] Table 2. Data domain configuration table

[0080]

[0081]

[0082] There may be multiple databases and data tables corresponding to the target software, and accordingly, the above database configuration may include multiple database information. At present, the distributed system usually stores data through the MYSQL master-slave architecture, so, illustratively, the above database configuration may include the master database and the slave database identifier. At the same time, the above database configuration may also include the query order of the database.

[0083] The above-mentioned business domain configuration may include the interface address (URL) of each interface to be called, interface request parameters and the interface calling sequence. As mentioned above, the target software can realize multiple functions, and the interface address corresponding to each function is different. Therefore, multiple interface address groups can be configured for the target software. The interface address group includes the interface to be called and the calling sequence of each interface in the interface address group. The interface address and calling sequence in the interface address group can be configured according to various calling sequences that may appear in actual business scenarios. The above-mentioned interface request parameters are the data types required to be included in the request sent to the interface for processing. For example, for the interface for processing and querying user historical order data, the interface request parameters may include user identification, historical order generation time, etc.

[0084] The above business domain configuration may also include a request parameter parsing script, which may be set based on the interface request parameters and may parse the request parameters included in the request received by the interface.

[0085] As a possible implementation, the business domain may be configured according to the business domain configuration table shown below:

[0086] Table 3. Business domain configuration table

[0087]

[0088]

[0089] In a possible embodiment, verification rules can also be configured, and the verification rules can be flexibly configured according to actual business scenarios. Exemplarily, the verification rules can include data consistency verification rules, such as checking whether the data of the master and slave databases are consistent after being processed by the target software, or whether the returned data is consistent with the data in the database, etc.

[0090] In a possible embodiment, the input trigger domain configuration, data domain configuration and business domain configuration can be received through a preset front-end page, wherein the trigger domain configuration includes identification data and preset verification rules, the data domain configuration includes database configuration, and the business domain configuration includes multiple interface group information.

[0091] Specifically, a front-end configuration page can be set up, and the front-end configuration page can be in the form of an H5 page as the front-end page of the enterprise's internal business management platform, and the front-end page can also be a web page in other formats. Relevant testers can configure the above-mentioned trigger domain, data domain and business domain based on the front-end page. As a possible implementation method, configurable content can be displayed in the front-end page, such as displaying "identification data", "database name", "data table query script" or "query SQL", etc., and each configurable content can provide a corresponding fill-in box, and relevant personnel can fill in specific configuration information in the corresponding fill-in box. Multiple configuration information can be filled in after one configuration.

[0092] After completing the above configurations, the configuration information can be stored in a database. As a possible implementation, a new database can be set up to store the configuration information pre-set for each software to be tested. When the target software to be tested needs to be tested, the trigger domain configuration, data domain configuration, and business domain configuration can be obtained from the database.

[0093] As a possible implementation, the target software can be tested at a certain time, such as setting a specific time to start testing the target software. When the timing condition is met, the trigger domain configuration, data domain configuration and business domain configuration can be automatically obtained from the database. In a possible embodiment, the test frequency can also be preset to perform software testing according to the test frequency.

[0094] In a possible implementation, after starting to test the target software, the trigger domain configuration, data domain configuration, and business domain configuration can be parsed separately. As a possible implementation, the trigger domain configuration can be parsed, and the data acquisition script can be obtained and executed to obtain the identification data. Then the data domain configuration is parsed to obtain the database, data table configuration, and data query script, etc. Then, for each data table, the database configuration associated with the data table is obtained, the query logic is executed to query the data corresponding to the data domain, and the data domain data set is constructed, that is, the test data is obtained.

[0095] In a possible embodiment, the data query script can be executed to parse the identification data corresponding to the query variables included in the query SQL; and the identification data corresponding to the query variables included in the query SQL can be written into the query SQL to obtain the target SQL; and the test data can be obtained from the database through the target SQL.

[0096] As described above, the data domain configuration includes multiple groups of data table configurations, and there are data dependencies between the multiple groups of data table configurations; therefore, in a possible embodiment, the multiple groups of data table configurations can be sorted based on the data dependencies between the multiple groups of data table configurations; and according to the order of the multiple groups of data table configurations, based on the identification data, the test data is obtained from the associated database contained in the data table configuration, and the specific values ​​of the preset variables contained in the preset verification rules of the test data set are tested. Specifically, the library and table partitioning strategy can be read, and the data table configuration can be traversed in order according to the data dependencies included in the library and table partitioning strategy, and the data domain query script can be executed to obtain the variables required for the data domain query SQL and replace them.

[0097] After that, the business domain configuration can be parsed to obtain each calling interface and the interface order, and each calling interface and the interface order can be sorted. Then, each interface can be traversed in order, and the request parameter parsing script can be executed for each interface to obtain the variable data required for the request parameter and replace the data. Then, the interface is called to pass the request parameter into the interface, and the business processing result of the interface is obtained, and the business processing result returned by each interface is verified. For example, the consistency of the master-slave database data, the consistency of the returned data with the stored data, etc. If a business processing result fails the consistency check, the business processing result is stored in the database and the relevant configuration person is notified.

[0098] In a possible embodiment, if a processing result fails the consistency check, a retry may be automatically initiated until the number of tests reaches a preset number.

[0099] In a possible embodiment, test data can be obtained from the databases associated with each data table configuration in sequence based on identification data in the order of multiple groups of data table configurations; the test data is added to the identification data variable, and the identification data variable is passed as data to be processed to the corresponding interface group to obtain the processing result returned by the interface group.

[0100] Specifically, an identification data variable may be preset, which is initially empty. After acquiring test data, the test data value may be used as one-dimensional data in the identification data variable to obtain the identification data variable to be processed. The dimension of the identification data variable may be determined based on the acquired test data.

[0101] The embodiment of the present invention is applied to simulate the business call link of online services based on the active triggering of real data in the production environment to verify the consistency of the system, improve the comprehensiveness and reliability of software testing, and thus improve the robustness of the software. A data consistency verification configuration model based on the three-layer configuration of the trigger domain, data domain, and business domain is established to further improve the reliability of software testing. In addition, each configuration can be flexibly configured according to actual needs, with strong scalability.

[0102] Based on the same inventive concept, the embodiment of the present invention also provides a software testing system, such as Figure 2 As shown, the software testing system 200 may include:

[0103] The trigger domain parsing module 201 is used to parse the trigger source and the data acquisition script from the trigger domain configuration preset for the target software to be tested, and obtain identification data through the data acquisition script; wherein the identification data is used to obtain the preset variables in the preset verification rules from the trigger source, and the preset verification rules are used to implement the verification logic of the function test and data consistency of the target software;

[0104] The data domain parsing module 202 is used to obtain a database configuration from a data domain configuration preset for the target software, wherein the database configuration includes a database where the test data of the target software is located, and the database stores user historical data;

[0105] A data acquisition module 203, used to acquire test data from the database based on the identification data, wherein the test data is the data value of the preset variable;

[0106] The business domain parsing module 204 is used to obtain a plurality of interface group information from the business domain configuration preset for the target software, wherein each of the interface group information includes an interface to be called and a calling order of each of the interfaces to be called;

[0107] The input module 205 is used to input each of the test data into the corresponding interface group and obtain the processing result returned by the interface group;

[0108] The verification module 206 is used to verify the processing result based on the preset verification rule, and determine that the target software passes the test if the processing result passes the verification.

[0109] In a possible embodiment, the data domain configuration further includes: a data query script and a query SQL, wherein the query SQL includes a query statement and a query variable;

[0110] The acquiring test data from the database based on the identification data comprises:

[0111] Execute the data query script to parse the identification data corresponding to the query variables included in the query SQL;

[0112] Writing identification data corresponding to the query variables included in the query SQL into the query SQL to obtain a target SQL;

[0113] The test data is obtained from the database through the target SQL.

[0114] In a possible embodiment, the data domain configuration includes multiple groups of data table configurations, and there is a data dependency relationship between the multiple groups of data table configurations;

[0115] The acquiring test data from the database based on the identification data comprises:

[0116] sorting the multiple groups of data table configurations based on the data dependency relationships between the multiple groups of data table configurations;

[0117] Acquire test data from the associated database included in the data table configurations based on the identification data in the order of the multiple groups of data table configurations

[0118] In a possible embodiment, the system further includes: a configuration layer;

[0119] The configuration layer is used to receive input trigger domain configuration, data domain configuration and business domain configuration through a preset front-end page, wherein the trigger domain configuration includes identification data and preset verification rules, and the data domain configuration includes database configuration and multiple groups of data table configurations, wherein user historical data is stored in different data tables of the database; the data table configuration includes a database associated with the data table, and the business domain configuration includes multiple interface group information.

[0120] In a possible embodiment, the system further includes: a timing scheduling module;

[0121] The timing scheduling module is used to control the trigger domain resolution module to start working when the timing condition is met.

[0122] like Figure 3 As shown, Figure 3 A business flow chart of a software testing system provided by an embodiment of the present invention, the software testing system may include a configuration layer, a scheduling layer, a logic layer, a business layer and a storage layer, wherein the scheduling layer includes a timing scheduling module, the logic layer includes a trigger domain parsing module, a data domain parsing module, a data acquisition module, a business domain parsing module, an input module and a verification module in the embodiment of the present invention, the business layer includes various functional modules of the target software, and the storage layer includes a database and a data table; specifically, the following processes may be included:

[0123] Relevant personnel configure trigger domain resolution, data domain address, query configuration, business domain URL, resolution configuration, and verification rule configuration on the configuration page. After completing and submitting the configuration on the configuration page, the configuration backend can store the configuration information in the database of the storage layer.

[0124] The timing scheduling module in the scheduling layer triggers the start of the test at a scheduled time. After the test starts, the logic layer parses the trigger domain configuration, executes the trigger domain data acquisition script, obtains the data domain identification data, and parses the data domain configuration to obtain the database and data table configuration. If there are multiple data table configurations, the data table configurations are sorted and traversed, and the data table configurations are executed to execute the data domain query script and the database and table sub-division strategy to obtain the variables described in the data domain query SQL and replace the variable values ​​to form a SQL that can be queried.

[0125] After that, the business domain configuration is parsed to obtain each calling interface and the interface sequence, and each calling interface and the interface sequence are sorted, and then they are traversed in order, and the request parameter parsing script is executed for each interface to obtain the variable data required for the request parameter and replace the data. After that, the interface is called to pass the request parameter into the interface, and the business processing result of the interface is obtained, and the business processing result returned by each interface is verified. For example, the consistency of the master-slave database data, the consistency of the returned data with the stored data, etc. If a business processing result fails the consistency check, the business processing result is stored in the database and the relevant configuration person is notified.

[0126] Among them, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0127] The exemplary embodiment of the present invention further provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform a method according to an embodiment of the present invention when executed by the at least one processor.

[0128] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.

[0129] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.

[0130] refer to Figure 4 , a block diagram of an electronic device 400 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0131] like Figure 4 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0132] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 407 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 may include, but is not limited to, a disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0133] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the above-mentioned software testing method is implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the above-mentioned software testing method by any other appropriate means (e.g., by means of firmware).

[0134] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0136] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0138] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0139] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

Claims

1. A software testing method, characterized in that: The method comprises: Parsing a trigger source and a data acquisition script from a trigger domain configuration preset for the target software to be tested, and acquiring identification data through the data acquisition script; wherein the identification data is used to acquire preset variables in a preset verification rule from the trigger source, and the preset verification rule is used to implement a verification logic for functional testing and data consistency of the target software; Obtaining a database configuration from a data domain configuration preset for the target software, wherein the database configuration includes a database where the test data of the target software is located, and the database stores user historical data; Based on the identification data, acquiring test data from the database, the test data being the data value of the preset variable; Acquire multiple interface group information from the business domain configuration preset for the target software, wherein each of the interface group information includes an interface to be called and a calling order of each of the interfaces to be called; Transfer each of the test data to the corresponding interface group, and obtain the processing result returned by the interface group; The processing result is verified based on the preset verification rule, and if the processing result passes the verification, it is determined that the target software passes the test.

2. The method according to claim 1, characterized in that The data domain configuration also includes: a data query script and a query SQL, wherein the query SQL includes a query statement and a query variable; The acquiring test data from the database based on the identification data comprises: Execute the data query script to parse the identification data corresponding to the query variables included in the query SQL; Writing identification data corresponding to the query variables included in the query SQL into the query SQL to obtain a target SQL; The test data is obtained from the database through the target SQL.

3. The method according to claim 1, characterized in that The data domain configuration includes multiple groups of data table configurations, and the data table configuration includes a database associated with the data table; different data tables in the database store user historical data; There is a data dependency relationship between the multiple groups of data table configurations; The acquiring test data from the database based on the identification data comprises: sorting the multiple groups of data table configurations based on the data dependency relationships between the multiple groups of data table configurations; According to the order of the plurality of groups of data table configurations, based on the identification data, sequentially acquiring test data from the database associated with each of the data table configurations; The method further comprises: Adding the test data to the identification data variable; The step of transferring each of the test data to the corresponding interface group and obtaining the processing result returned by the interface group includes: The identification data variable is passed into the corresponding interface group to obtain the processing result returned by the interface group.

4. The method according to claim 1, characterized in that: The method further comprises: The trigger domain configuration, data domain configuration and business domain configuration are received through a preset front-end page, wherein the trigger domain configuration includes identification data and preset verification rules, the data domain configuration includes database configuration, and the business domain configuration includes multiple interface group information.

5. The method according to claim 1, characterized in that The method further comprises: When the timing conditions are met, the steps of parsing the trigger source and data acquisition script from the trigger domain configuration preset for the target software to be tested, and acquiring identification data through the data acquisition script are executed to trigger functional testing and data consistency verification of the target software.

6. A software testing system, characterized in that: The system comprises: A trigger domain parsing module, used to parse the trigger source and the data acquisition script from the trigger domain configuration preset for the target software to be tested, and obtain identification data through the data acquisition script; wherein the identification data is used to obtain the preset variables in the preset verification rules from the trigger source, and the preset verification rules are used to implement the verification logic of the function test and data consistency of the target software; A data domain parsing module, used to obtain a database configuration from a data domain configuration preset for the target software, wherein the database configuration includes a database where the test data of the target software is located, and the database stores user historical data; A data acquisition module, used to acquire test data from the database based on the identification data, wherein the test data is the data value of the preset variable; A business domain parsing module, used to obtain a plurality of interface group information from a business domain configuration preset for the target software, wherein each of the interface group information includes an interface to be called and a calling order of each of the interfaces to be called; An input module, used to input each of the test data into the corresponding interface group, and obtain the processing result returned by the interface group; The verification module is used to verify the processing result based on the preset verification rule, and determine that the target software passes the test when the processing result passes the verification.

7. The system according to claim 6, characterized in that The system further comprises: a configuration layer; The configuration layer is used to receive input trigger domain configuration, data domain configuration and business domain configuration through a preset front-end page, wherein the trigger domain configuration includes identification data and preset verification rules, the data domain configuration includes multiple database configurations and multiple groups of data table configurations, wherein user historical data is stored in different data tables of the database; the data table configuration includes a database associated with the data table, and the business domain configuration includes multiple interface group information.

8. The system according to claim 6, characterized in that The system also includes: a timing scheduling module; The timing scheduling module is used to control the trigger domain resolution module to start working when the timing condition is met.

9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 5.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-5.