Software testing method and device, equipment and medium

The software differential code is determined through the code detection tool and matched with the preset configuration rules, and integrated into code files to transfer to the preset address, solving the problems of low efficiency and low accuracy of software testing in the existing technology, and achieving more efficient and accurate software testing.

CN119883926APending Publication Date: 2025-04-25AVATR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510055584.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When the software updates and iterations, the testing efficiency and accuracy of the prior art are low, resulting in the possibility of missing some test code, which in turn leads to the failure of software release and updates and reduces the test accuracy.

Method used

The code detection tool determines the difference code of the software's online running code and updates the iterative code, and matches the difference code with the preset configuration rules. After obtaining the matching results, it integrates it into a code file and transmits it to the preset address for user extraction for testing.

Benefits of technology

There is no need for technicians to detect code line by line, which greatly reduces the amount of data processed code, improves test processing efficiency, reduces the risk of omissions, improves detection accuracy, and improves the success rate of software release.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883926A_ABST
    Figure CN119883926A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of software testing, and discloses a software testing method and device, equipment and a medium, and the method comprises the steps: determining an online operation code of software and a difference code of an updating iteration code through a code detection tool; performing matching processing on the difference code and a preset configuration rule to obtain a matching result; and integrating the matching result into a code file and transmitting the code file to a preset address, so that a user extracts the code file from the preset address for test processing. By means of the technical scheme, technicians do not need to detect the codes line by line, the data size of the codes processed by the technicians can be greatly reduced, the test processing efficiency can be improved, the risk of omission can be reduced, the detection precision can be improved, and then the success rate of software release can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of software testing, and in particular to a software testing method, device, equipment and medium. Background Art

[0002] With the increase in user demand, the rapid iteration of various software product functions has become the norm. By continuously updating software product functions, the diversity of different software can be enriched.

[0003] In the process of software release and update, in addition to the software itself, there may be many middleware or configuration dependencies. These dependencies need to be prepared or run in advance before the main body of the software is updated. Therefore, before releasing the update, the software needs to be tested to ensure that the software can run normally. The current common method is: the technician determines the software modification items, and then detects the script code of the software according to the software modification items, and finally determines whether the modified function of the script code corresponds to the expected effect based on the display effect of the software product page.

[0004] However, the commonly used methods currently have the following technical problems: once the number of software modifications increases, the amount of code involved in the update iteration also increases, which not only increases the detection and processing time of technicians and the testing efficiency, but also easily misses some test codes, which leads to the failure of subsequent release updates and reduces the test accuracy. Summary of the invention

[0005] In view of the above problems, the embodiments of the present invention provide a software testing method, apparatus, device and medium, which are used to solve the technical problems of low testing processing efficiency and low testing accuracy in the prior art.

[0006] According to one aspect of an embodiment of the present invention, a software testing method is provided, the method comprising:

[0007] Use code detection tools to determine the difference between the online running code and the updated iterative code of the software;

[0008] Matching the difference code with the preset configuration rule to obtain a matching result;

[0009] The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

[0010] In one embodiment, the present invention can determine the difference code between the online running code and the updated iterative code of the software through a code detection tool; the difference code and the matching result of the preset configuration rule are integrated into a file and transmitted to a preset address, so that the user can extract the file at the preset address for testing and processing. Compared with the prior art that manually detects the software code line by line, the present invention does not require technicians to detect the code line by line, which can not only greatly reduce the amount of code data processed by technicians and improve the efficiency of test processing, but also reduce the risk of omissions and improve the accuracy of detection, thereby improving the success rate of software release.

[0011] According to another aspect of an embodiment of the present invention, there is provided a software testing device, comprising:

[0012] A determination module is used to determine the difference code between the online running code and the updated iterative code of the software through a code detection tool;

[0013] A matching module, used for matching the difference code with a preset configuration rule to obtain a matching result;

[0014] The test module is used to integrate the matching results into a code file and transmit it to a preset address, so that the user can extract the code file at the preset address for test processing.

[0015] According to another aspect of an embodiment of the present invention, a software testing device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software testing method as described above when executing the computer program.

[0016] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a software testing device / apparatus to perform the following operations:

[0017] Use code detection tools to determine the difference between the online running code and the updated iterative code of the software;

[0018] Matching the difference code with the preset configuration rule to obtain a matching result;

[0019] The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

[0020] The present invention can determine the difference code between the online running code and the updated iterative code of the software through a code detection tool; integrate the difference code and the matching result of the preset configuration rule into a file and transmit it to a preset address, so that the user can extract the file at the preset address for testing and processing. Compared with the prior art that manually detects the software code line by line, the present invention does not require technicians to detect the code line by line, which can not only greatly reduce the amount of code data processed by technicians and improve the efficiency of test processing, but also reduce the risk of omissions and improve the accuracy of detection, thereby improving the success rate of software release.

[0021] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0023] Figure 1 A schematic flow chart showing a first embodiment of a software testing method provided by the present invention;

[0024] Figure 2 A schematic flow chart of a second embodiment of the software testing method provided by the present invention is shown;

[0025] Figure 3 A schematic structural diagram of a first embodiment of a software testing device provided by the present invention is shown;

[0026] Figure 4 A structural schematic diagram of an embodiment of a software testing device provided by the present invention is shown. DETAILED DESCRIPTION

[0027] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0028] Figure 1 A flow chart of a first embodiment of a software testing method provided by the present invention is shown, and the method is executed by a software testing device.

[0029] The software testing device may be a testing tool installed on a computer, which can automatically detect and collect software configurations, or a software testing platform installed on a computer.

[0030] like Figure 1 As shown, in one embodiment, the method includes the following steps:

[0031] Step 110: Determine the difference code between the online running code of the software and the updated iterative code through a code detection tool.

[0032] In one embodiment, a technician can input the online running code of the software and the updated iterative code of the software to be launched into the software testing equipment. The software testing equipment can call the code detection tool to read the two codes, and then compare the scripts and contents of the two codes to identify the differences and differences between the two codes, so as to obtain the difference code.

[0033] In specific operations, you can use code detection tools and script operations to operate git diff (or other version tools) commands to compare the updated iterative code with the online running code to obtain the difference code.

[0034] The difference code can be used to determine the code content of the software in this update, so that effective testing can be performed on the code content in subsequent steps, thereby avoiding code omissions and reducing the probability of test errors caused by code test omissions.

[0035] Step 120: Match the difference code with the preset configuration rule to obtain a matching result.

[0036] Among them, the preset configuration rules are the code parsing rules written by the user before software testing, including the code address, routing configuration, new items, etc.

[0037] Each time an update is made, the user can determine the content that needs to be updated this time, and then write corresponding parsing rules according to the updated content.

[0038] After reading the different items and the difference items between the two codes, the difference code can be matched with the preset configuration rule, so that the configuration change location can be searched in the difference code according to the preset configuration rule.

[0039] Through matching processing, on the one hand, it can be determined whether the difference code is inconsistent with the preset configuration rules and whether it meets the requirements of the preset configuration rules. On the other hand, it can be determined whether there are omissions to avoid errors in subsequent tests.

[0040] Step 130: Integrate the matching results into a code file and transmit it to a preset address, so that the user can extract the code file at the preset address for testing.

[0041] In order to facilitate the technicians to perform testing, after obtaining the matching results, the matching results can be integrated into a code file, and then the code file can be directly transferred to the preset address. The preset address can be a file export address, a technician's email address, a technician's device address, or a network disk address, etc., which can be adjusted according to actual needs.

[0042] Optionally, the matching results, online running codes and updated iterative codes can be uniformly collected and integrated into one file. The entire file can be output to a specified path or address. The technicians can directly extract the file at the specified address for test processing without the need to detect the code line by line, which can greatly reduce the processing workload and improve the efficiency of test processing.

[0043] The present invention can determine the difference code between the online running code and the updated iterative code of the software through a code detection tool; integrate the difference code and the matching result of the preset configuration rule into a file and transmit it to a preset address, so that the user can extract the file at the preset address for testing and processing. Compared with the prior art that manually detects the software code line by line, the present invention does not require technicians to detect the code line by line, which can not only greatly reduce the amount of code data processed by technicians and improve the efficiency of test processing, but also reduce the risk of omissions and improve the accuracy of detection, thereby improving the success rate of software release.

[0044] Figure 2 FIG. 2 is a flow chart of a second embodiment of a software testing method provided by the present invention, wherein the method is executed by a software testing device. Figure 2 As shown, the method comprises the following steps:

[0045] Step 210: After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively.

[0046] In one embodiment, the technical personnel may input the online running code and the updated iterative code of the software, or may pull the online running code and the updated iterative code of the software from the server or the software system.

[0047] In order to facilitate subsequent integration into files for technical personnel to extract, the online running code and the updated iteration code can be added to text documents in the preset directory respectively.

[0048] Specifically, the online running code of the software and the updated iterative code newly added to the software are obtained, and the updated iterative code can be saved in a diff.txt file in the directory where the test device of the software runs to obtain a text document.

[0049] In one embodiment, the online running code and the updated iterative code may be stored in different places. If the technicians are asked to input the online running code and the updated iterative code one by one, it will take a lot of time, which will reduce the efficiency of subsequent processing. In order to accurately and quickly obtain the online running code and the updated iterative code, as an example, the acquisition of the online running code and the updated iterative code of the software may include the following sub-steps:

[0050] Step 2101: Determine the project name after the software is launched and the branch name when the software is to be launched;

[0051] Step 2102: Run a preset first instruction based on the project name to pull online running code;

[0052] Step 2103: Run a preset second instruction based on the branch name to pull the updated iteration code;

[0053] Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

[0054] Specifically, the software testing device may store different versions of software codes. After running the software testing device, the software testing device may display interactive prompts to the technician. The technician may select the name of the software project to be operated (for example, project_A) according to the interactive prompts to obtain the project name of the software. At the same time, the technician may enter the branch name of the software to be launched (for example, branch_A).

[0055] After obtaining the project name, the preset first instruction can be executed based on the project name to pull the online running code, wherein the preset first instruction is the pull code pre-written by the technician.

[0056] For example, the software testing equipment runs the code written in advance by the technician and executes the preset first instruction "git checkoutmaster&git pull", so that the online code can be pulled from the database.

[0057] It should be noted that after each update is completed, the updated code can be stored to facilitate technical personnel to directly search for the code for comparison and matching later.

[0058] Similarly, after obtaining the branch name, the preset second instruction can be run based on the branch name to pull the updated iteration code. The preset second instruction is the underlying code of the code detection tool or software test equipment.

[0059] For example, you can call the underlying code of the code detection tool or the software test device, run the "gitcheckout release_1.5&git pull" command to pull the code to be released for this software, and then run "git diffmaster release_1.5|grep'\+'>diff.txt" to obtain the updated iterative code newly added in this development.

[0060] After pulling the online running code and updating the iterative code, you can save the online running code and the updated iterative code to the diff.txt file in the preset directory.

[0061] Step 220: Call a code detection tool to find code difference items of the branch scripts of the text document to obtain difference codes.

[0062] In one embodiment, a code detection tool (for example, through a script operation git diff or other version tools) can be run to search the text document, and the difference between the code of the branch running online and the updated iterative code can be detected in the text document to obtain the difference code, and the difference code can be output to a local file or text document to facilitate subsequent processing.

[0063] Step 230: After splitting each line of preset configuration rules according to the preset segmentation characters, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules.

[0064] In one embodiment, an example of a preset configuration rule may be as follows:

[0065] #The # sign is a comment, used for explanation. The content starting with the # sign is not a rule.

[0066] #Different projects can have different rules. The following takes a Java project as an example.

[0067] #Parse whether there is a new configuration file, regular expression.

[0068] ^(@Value|@ConfigurationProperties|@RefreshScope)$|||Configuration item.

[0069] #Analyze whether there is a new MQ and apply for topic and group.

[0070] ^(@RocketMQMessageListener|@KafkaListener)$|||MQ configuration.

[0071] #Parse database changes.

[0072] ^(create table|alter table|insert into|update.*set)$|||Database configuration.

[0073] #Parse whether there is routing configuration.

[0074] ^upstream$|||nginx configuration.

[0075] The format of the preset configuration rule is a regular expression, which starts with "^" and ends with "$".

[0076] Since there may be one or more preset configuration rules written by technicians, in order to uniformly manage multiple preset configuration rules, multiple preset configuration rules can be integrated into a rule file. The rule file can contain multiple preset configuration rules, and the entire rule file can be a collection of multiple preset configuration rules (ruleList). At the same time, each line is an independent configuration rule (rule).

[0077] When matching, a set of multiple preset configuration rules (ruleList) can be obtained by reading the rule file, and then the ruleList can be traversed in a loop to use the pre-defined rule to perform regular matching with the code difference item output in S04 to obtain a matching result.

[0078] In specific operations, the rule file can be read, and the configuration rules in the rule file can be read line by line, and then the configuration rules of each line are split according to the preset split character (such as the symbol "|||"). After splitting, the left side of "|||" is the regular expression, and the right side is the rule description.

[0079] After splitting each line of preset configuration rules, the regular expression of each configuration rule may be extracted, and multiple regular expressions may be obtained, wherein each regular expression corresponds to a preset configuration rule.

[0080] In one embodiment, since the preset configuration rules include different contents such as code addresses, routing configurations, and new items, in order to integrate multiple preset configuration rules, different preset configuration rules can be stored in a rule set pre-built by the user.

[0081] As an example, the rule set construction operation includes:

[0082] Step 01: Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule.

[0083] Step 02: Use multiple lines of configuration rules to construct a generation rule set.

[0084] In specific operations, users can pre-write different rule contents in the configuration file of this tool. Each line in the configuration file is an independent configuration rule.

[0085] Finally, the entire configuration file can be constructed to generate a rule set (ruleList). Multiple different configuration rules are stored in the rule set (ruleList). When matching, the rule set (ruleList) of the configuration file can be directly read to obtain the preset configuration rules.

[0086] Step 240: Match the difference code with each of the regular expressions to obtain a matching result.

[0087] Next, you can call the matching method based on the regular expression class library, match the diff.txt file of the difference code and the regular expression as input parameters, and get the matching result, plus the rule description, and output it to result.txt as the result.

[0088] Step 4: Loop through the rule set, repeat steps 2 and 3 to execute all rules, and append the results to a result.txt file for user viewing.

[0089] Step 250: Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is a rule description obtained after splitting each line of preset configuration rules.

[0090] Step 260: Send the code file to a preset address via email.

[0091] In actual operation, when matching, the preset configuration rules may be read, the preset configuration rules may be traversed in a loop, and the difference code may be matched with the regular expression of each preset configuration rule to obtain a matching result.

[0092] After the configuration result is obtained, the matching result can be output to the local hard disk of the test tool of the computer. Finally, the test tool can output the rule description obtained by splitting step 230 and the matching result as a result to result.txt to obtain a code file in txt format.

[0093] After the execution is completed, in order to notify the technician, the code file in txt format can be sent to the technician's email address via email. The technician can directly extract the code file from his email to perform subsequent test processing based on the code file.

[0094] The present invention can instruct to extract online running code and update iterative code, split each line of preset configuration rules according to preset segmentation characters to obtain multiple regular expressions, and then use the code detection tool to detect the difference code between the online running code and the update iterative code; the matching results of the difference code and the regular expression, the online running code and the update iterative code are integrated into a file and transmitted to a preset address, so that the user can extract the file at the preset address for testing and processing. The present invention quickly detects the difference code between the online running code and the update iterative code, determines whether the configuration content is met according to the difference code, and facilitates the technical personnel to perform testing and processing, which can reduce the processing workload of the technical personnel, improve the efficiency of the test processing, and reduce the risk of omissions and improve the accuracy of detection.

[0095] Figure 3 FIG. 2 is a schematic diagram showing the structure of a first embodiment of a software testing device provided by the present invention. Figure 3 As shown, the device 300 includes: a determination module 310 , a matching module 320 and a testing module 330 .

[0096] The determination module is used to determine the difference code between the online running code and the updated iterative code of the software through a code detection tool.

[0097] The matching module is used to match the difference code with the preset configuration rule to obtain a matching result.

[0098] The test module is used to integrate the matching results into a code file and transmit it to a preset address, so that the user can extract the code file at the preset address for test processing.

[0099] In an optional manner, the matching process is performed on the difference code and the preset configuration rule to obtain a matching result, including:

[0100] After splitting each line of preset configuration rules according to the preset segmentation character, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules;

[0101] The difference code is matched with each of the regular expressions to obtain a matching result.

[0102] In an optional manner, determining the difference code between the online running code and the updated iterative code of the software by using a code detection tool includes:

[0103] After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively;

[0104] A code detection tool is called to find code difference items of the branch scripts of the text document to obtain difference codes.

[0105] In an optional manner, obtaining the online running code and the updated iteration code of the software includes:

[0106] Determine the project name after the software is launched and the branch name when the software is to be launched;

[0107] Run a preset first instruction based on the project name to pull online running code;

[0108] Run a preset second instruction based on the branch name to pull the updated iterative code;

[0109] Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

[0110] In an optional manner, integrating the matching results into a code file and transmitting the code file to a preset address includes:

[0111] Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is the rule description obtained after splitting each line of preset configuration rules;

[0112] The code file is sent to a preset address by email.

[0113] In an optional manner, the preset configuration rule is stored in a rule set pre-built by a user, and the construction operation of the rule set includes:

[0114] Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule;

[0115] A set of generation rules is constructed using multiple lines of configuration rules.

[0116] In an optional manner, the preset configuration rules include: code address, routing configuration and new items.

[0117] Figure 4 The schematic diagram of the structure of an embodiment of the software testing device provided by the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the software testing device.

[0118] like Figure 4 As shown, the software testing device may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0119] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned software testing method embodiment.

[0120] Specifically, the program 410 may include program code including computer executable instructions.

[0121] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the software testing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0122] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0123] Program 410 may be specifically called by processor 402 to enable the software test device to perform the following operations:

[0124] Use code detection tools to determine the difference between the online running code and the updated iterative code of the software;

[0125] Matching the difference code with the preset configuration rule to obtain a matching result;

[0126] The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

[0127] In an optional manner, the matching process is performed on the difference code and the preset configuration rule to obtain a matching result, including:

[0128] After splitting each line of preset configuration rules according to the preset segmentation character, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules;

[0129] The difference code is matched with each of the regular expressions to obtain a matching result.

[0130] In an optional manner, determining the difference code between the online running code and the updated iterative code of the software by using a code detection tool includes:

[0131] After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively;

[0132] A code detection tool is called to find code difference items of the branch scripts of the text document to obtain difference codes.

[0133] In an optional manner, obtaining the online running code and the updated iteration code of the software includes:

[0134] Determine the project name after the software is launched and the branch name when the software is to be launched;

[0135] Run a preset first instruction based on the project name to pull online running code;

[0136] Run a preset second instruction based on the branch name to pull the updated iterative code;

[0137] Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

[0138] In an optional manner, integrating the matching results into a code file and transmitting the code file to a preset address includes:

[0139] Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is the rule description obtained after splitting each line of preset configuration rules;

[0140] The code file is sent to a preset address by email.

[0141] In an optional manner, the preset configuration rule is stored in a rule set pre-built by a user, and the construction operation of the rule set includes:

[0142] Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule;

[0143] A set of generation rules is constructed using multiple lines of configuration rules.

[0144] In an optional manner, the preset configuration rules include: code address, routing configuration and new items.

[0145] In an optional manner, the program 410 is called by the processor 402 to enable the software testing device to perform the following operations:

[0146] Use code detection tools to determine the difference between the online running code and the updated iterative code of the software;

[0147] Matching the difference code with the preset configuration rule to obtain a matching result;

[0148] The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

[0149] In an optional manner, the matching process is performed on the difference code and the preset configuration rule to obtain a matching result, including:

[0150] After splitting each line of preset configuration rules according to the preset segmentation character, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules;

[0151] The difference code is matched with each of the regular expressions to obtain a matching result.

[0152] In an optional manner, determining the difference code between the online running code and the updated iterative code of the software by using a code detection tool includes:

[0153] After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively;

[0154] A code detection tool is called to find code difference items of the branch scripts of the text document to obtain difference codes.

[0155] In an optional manner, obtaining the online running code and the updated iteration code of the software includes:

[0156] Determine the project name after the software is launched and the branch name when the software is to be launched;

[0157] Run a preset first instruction based on the project name to pull online running code;

[0158] Run a preset second instruction based on the branch name to pull the updated iterative code;

[0159] Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

[0160] In an optional manner, integrating the matching results into a code file and transmitting the code file to a preset address includes:

[0161] Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is the rule description obtained after splitting each line of preset configuration rules;

[0162] The code file is sent to a preset address by email.

[0163] In an optional manner, the preset configuration rule is stored in a rule set pre-built by a user, and the construction operation of the rule set includes:

[0164] Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule;

[0165] A set of generation rules is constructed using multiple lines of configuration rules.

[0166] In an optional manner, the preset configuration rules include: code address, routing configuration and new items.

[0167] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a software testing device / apparatus, the software testing device / apparatus executes the software testing method in any of the above method embodiments.

[0168] The executable instructions may be specifically used to enable the software testing equipment / device to perform the following operations:

[0169] Use code detection tools to determine the difference between the online running code and the updated iterative code of the software;

[0170] Matching the difference code with the preset configuration rule to obtain a matching result;

[0171] The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

[0172] In an optional manner, the matching process is performed on the difference code and the preset configuration rule to obtain a matching result, including:

[0173] After splitting each line of preset configuration rules according to the preset segmentation character, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules;

[0174] The difference code is matched with each of the regular expressions to obtain a matching result.

[0175] In an optional manner, determining the difference code between the online running code and the updated iterative code of the software by using a code detection tool includes:

[0176] After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively;

[0177] A code detection tool is called to find code difference items of the branch scripts of the text document to obtain difference codes.

[0178] In an optional manner, obtaining the online running code and the updated iteration code of the software includes:

[0179] Determine the project name after the software is launched and the branch name when the software is to be launched;

[0180] Run a preset first instruction based on the project name to pull online running code;

[0181] Run a preset second instruction based on the branch name to pull the updated iterative code;

[0182] Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

[0183] In an optional manner, integrating the matching results into a code file and transmitting the code file to a preset address includes:

[0184] Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is the rule description obtained after splitting each line of preset configuration rules;

[0185] The code file is sent to a preset address by email.

[0186] In an optional manner, the preset configuration rule is stored in a rule set pre-built by a user, and the construction operation of the rule set includes:

[0187] Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule;

[0188] A set of generation rules is constructed using multiple lines of configuration rules.

[0189] In an optional manner, the preset configuration rules include: code address, routing configuration and new items.

[0190] In an optional manner, the executable instructions enable the software testing device / apparatus to perform the following operations:

[0191] Use code detection tools to determine the difference between the online running code and the updated iterative code of the software;

[0192] Matching the difference code with the preset configuration rule to obtain a matching result;

[0193] The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

[0194] In an optional manner, the matching process is performed on the difference code and the preset configuration rule to obtain a matching result, including:

[0195] After splitting each line of preset configuration rules according to the preset segmentation character, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules;

[0196] The difference code is matched with each of the regular expressions to obtain a matching result.

[0197] In an optional manner, determining the difference code between the online running code and the updated iterative code of the software by using a code detection tool includes:

[0198] After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively;

[0199] A code detection tool is called to find code difference items of the branch scripts of the text document to obtain difference codes.

[0200] In an optional manner, obtaining the online running code and the updated iteration code of the software includes:

[0201] Determine the project name after the software is launched and the branch name when the software is to be launched;

[0202] Run a preset first instruction based on the project name to pull online running code;

[0203] Run a preset second instruction based on the branch name to pull the updated iterative code;

[0204] Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

[0205] In an optional manner, integrating the matching results into a code file and transmitting the code file to a preset address includes:

[0206] Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is the rule description obtained after splitting each line of preset configuration rules;

[0207] The code file is sent to a preset address by email.

[0208] In an optional manner, the preset configuration rule is stored in a rule set pre-built by a user, and the construction operation of the rule set includes:

[0209] Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule;

[0210] A set of generation rules is constructed using multiple lines of configuration rules.

[0211] In an optional manner, the preset configuration rules include: code address, routing configuration and new items.

[0212] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.

[0213] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.

[0214] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.

[0215] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A software testing method, characterized in that: The method comprises: Use code detection tools to determine the difference between the online running code and the updated iterative code of the software; Matching the difference code with the preset configuration rule to obtain a matching result; The matching results are integrated into a code file and transmitted to a preset address, so that the user can extract the code file at the preset address for testing.

2. The method according to claim 1, characterized in that The matching process of the difference code and the preset configuration rule to obtain a matching result includes: After splitting each line of preset configuration rules according to the preset segmentation character, a plurality of regular expressions are obtained, wherein each of the regular expressions corresponds to one of the preset configuration rules; The difference code is matched with each of the regular expressions to obtain a matching result.

3. The method according to claim 1, characterized in that The method of determining the difference between the online running code and the updated iterative code of the software by using a code detection tool includes: After obtaining the online running code and the updated iterative code of the software, the online running code and the updated iterative code are added to text documents in a preset directory respectively; A code detection tool is called to find code difference items of the branch scripts of the text document to obtain difference codes.

4. The method according to claim 3, characterized in that The obtaining of online running code and updated iteration code of the software includes: Determine the project name after the software is launched and the branch name when the software is to be launched; Run a preset first instruction based on the project name to pull online running code; Run a preset second instruction based on the branch name to pull the updated iterative code; Among them, the preset first instruction is the pull code written in advance by the technician, and the preset second instruction is the underlying code of the code detection tool.

5. The method according to claim 3, characterized in that: The step of integrating the matching results into a code file and transmitting the code file to a preset address includes: Add the matching result and preset rule content to a text document in a preset directory to generate a code file in txt format, wherein the preset rule content is the rule description obtained after splitting each line of preset configuration rules; The code file is sent to a preset address by email.

6. The method according to claim 1, characterized in that The preset configuration rules are stored in a rule set pre-built by the user, and the construction operation of the rule set includes: Get the rule content pre-written by the user in the configuration file, where each line of rule content is an independent configuration rule; A set of generation rules is constructed using multiple lines of configuration rules.

7. The method according to claim 6, characterized in that The preset configuration rules include: code address, routing configuration and new items.

8. A software testing device, characterized in that: The device comprises: A determination module is used to determine the difference code between the online running code and the updated iterative code of the software through a code detection tool; A matching module, used for matching the difference code with a preset configuration rule to obtain a matching result; The test module is used to integrate the matching results into a code file and transmit it to a preset address, so that the user can extract the code file at the preset address for test processing.

9. A software testing device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software testing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the software testing method according to any one of claims 1 to 7.