CN110727567B - Method, device, computer equipment and storage medium for detecting software quality - Google Patents

Method, device, computer equipment and storage medium for detecting software quality Download PDF

Info

Publication number
CN110727567B
CN110727567B CN201910849762.1A CN201910849762A CN110727567B CN 110727567 B CN110727567 B CN 110727567B CN 201910849762 A CN201910849762 A CN 201910849762A CN 110727567 B CN110727567 B CN 110727567B
Authority
CN
China
Prior art keywords
log
test
service function
test log
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910849762.1A
Other languages
Chinese (zh)
Other versions
CN110727567A (en
Inventor
刘淼
张明卉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Securities Co Ltd
Original Assignee
Ping An Securities Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Securities Co Ltd filed Critical Ping An Securities Co Ltd
Priority to CN201910849762.1A priority Critical patent/CN110727567B/en
Publication of CN110727567A publication Critical patent/CN110727567A/en
Application granted granted Critical
Publication of CN110727567B publication Critical patent/CN110727567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3457Performance evaluation by simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of software monitoring and provides a method, a device, computer equipment and a storage medium for detecting software quality. The method comprises the following steps: receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request, receiving a first test log set fed back by the log query system, acquiring a service function type corresponding to the service function identifier, screening a second test log set corresponding to the service function type from the first test log set, acquiring a regular expression corresponding to the service function type, performing deduplication processing on the second test log set according to the regular expression, screening out target test log sets, determining log results of all target test logs in the target test log sets, and obtaining a software quality detection result according to the log results. The quality of the new version software can be compromised by adopting the method, and the quality risk is reduced.

Description

Method, device, computer equipment and storage medium for detecting software quality
Technical Field
The present invention relates to the field of software monitoring technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for detecting software quality.
Background
With the development of computer technology, the Internet cooperation mode goes deep into the business trend of enterprises, a plurality of enterprises cooperate with third-party channels, and the number of customers and the transaction amount of the enterprises are improved through the influence of the third-party channels. In the process of cooperating with the third-party channel, because of more channels and limited enterprise quality guarantee resources, a mechanism that an enterprise provides test cases to be executed by the third-party channel is often implemented, and the enterprise can issue new version software after receiving a test report provided by a cooperating third party.
However, when the new version software is released in this way, the quality detection of the new version software is only responsible for the third party channel, which easily causes the quality problem of the new version software and the problem of high quality risk.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, and storage medium for software quality detection that can reduce quality risks.
A method of software quality detection, the method comprising:
receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request;
Receiving a first test log set fed back by a log query system, wherein the first test log set is obtained by searching a stored test log by the log query system according to a log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
acquiring a service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
acquiring a regular expression corresponding to the service function type, performing de-duplication processing on the second test log set according to the regular expression, and screening out a target test log set;
determining log results of all target test logs in the target test log set, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
In one embodiment, generating and sending a log query request to a log query system based on a business query request includes:
acquiring time parameters, service function identifiers, user accounts and channel numbers in the service query request;
Determining a test log time period to be queried according to the time parameter, and determining a query service identifier according to the service function identifier;
generating a log query request according to the test log time period, the query service identifier, the user account and the channel number of the required query, and sending the log query request to a log query system.
In one embodiment, obtaining the service function type corresponding to the service function identifier, and screening the second test log set corresponding to the service function type from the first test log set includes:
acquiring a service function type corresponding to the service function identifier;
acquiring log identifiers of all first test logs in a first test log set;
and sorting the first test log set according to the service function identification and the log identification to obtain a second test log set corresponding to the service function type.
In one embodiment, performing deduplication processing on the second test log set according to the regular expression, and screening the target test log set includes:
determining log results of each second test log in the second test log set according to the regular expression;
when a plurality of second test logs corresponding to the same service function type exist in the second test log set, screening the plurality of second test logs according to log results and/or log recording time, and determining target test logs corresponding to the service function types;
When only one second test log corresponding to the service function type exists in the second test log set, a target test log corresponding to the service function type is obtained according to the corresponding second test log.
In one embodiment, the screening the plurality of second test logs according to the log result and/or the log recording time, and determining the target test log corresponding to each service function type includes:
determining log results of a plurality of second test logs corresponding to the same service function type;
when only one second test log with a successful log result exists in each second test log, obtaining a target test log according to the second test log with the successful log result;
when a plurality of second test logs with successful log results exist in each second test log, acquiring log record time of each second test log with successful log results, calculating a difference value between the log record time of each second test log with successful log results and the current time, and determining a second test log with the smallest difference value with the current time to obtain a target test log.
In one embodiment, obtaining the software quality evaluation parameter according to the first log number and the second log number, and obtaining the software quality detection result according to the software quality evaluation parameter includes:
Acquiring the total number of service function types required to be queried in a query request;
determining the regression coverage rate of the service functions according to the preset total number of the service functions, the first log number and the second log number;
determining regression passing rate according to the first log number and the total number of service function types;
and obtaining a software quality detection result according to the regression coverage rate and the regression passing rate of the service function.
An apparatus for software quality detection, the apparatus comprising:
the first receiving module is used for receiving a service query request carrying a service function identifier, generating and sending a log query request to the log query system according to the service query request;
the second receiving module is used for receiving a first test log set fed back by the log query system, the first test log set is obtained by searching the stored test logs according to the log query request by the log query system, and the test logs are obtained by executing preset test cases by a third-party server and feeding back the test cases;
the screening module is used for acquiring the service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
The de-duplication module is used for acquiring a regular expression corresponding to the service function type, de-duplication processing is carried out on the second test log set according to the regular expression, and a target test log set is screened out;
the processing module is used for determining the log results of all the target test logs in the target test log set, counting the first log number with successful log results and the second log number with failed log results, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
In one embodiment, the first receiving module is further configured to obtain a time parameter, a service function identifier, a user account, and a channel number in the service query request, determine a test log time period for the query according to the time parameter, determine a query service identifier according to the service function identifier, generate a log query request according to the test log time period for the query, the query service identifier, the user account, and the channel number, and send the log query request to the log query system.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request;
receiving a first test log set fed back by a log query system, wherein the first test log set is obtained by searching a stored test log by the log query system according to a log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
acquiring a service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
acquiring a regular expression corresponding to the service function type, performing de-duplication processing on the second test log set according to the regular expression, and screening out a target test log set;
determining log results of all target test logs in the target test log set, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request;
receiving a first test log set fed back by a log query system, wherein the first test log set is obtained by searching a stored test log by the log query system according to a log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
acquiring a service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
acquiring a regular expression corresponding to the service function type, performing de-duplication processing on the second test log set according to the regular expression, and screening out a target test log set;
determining log results of all target test logs in the target test log set, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
According to the method, the device, the computer equipment and the storage medium for detecting the software quality, the log inquiry is carried out according to the service inquiry request to obtain the first test log set, the first test log set is screened according to the service function identification and the regular expression to obtain the target test log set, the software quality evaluation parameters are obtained according to the log results of all target test logs in the target test log set, and therefore the software quality detection results are obtained according to the software quality evaluation parameters. By the method, on the basis that the third-party server has completed software testing, software quality detection is performed according to the service query request and the test log fed back by the third-party server, so that a software quality detection result is obtained, the quality spam of the software of the new version to be deployed is realized, and the quality risk is reduced.
Drawings
FIG. 1 is an application scenario diagram of a method of software quality detection in one embodiment;
FIG. 2 is a flow diagram of a method of software quality detection in one embodiment;
FIG. 3 is a schematic flow chart illustrating the sub-process of step S202 in FIG. 2 according to one embodiment;
FIG. 4 is a schematic flow chart illustrating the sub-process of step S206 in FIG. 2 according to one embodiment;
FIG. 5 is a schematic flow chart illustrating the sub-process of step S208 in FIG. 2 according to one embodiment;
FIG. 6 is a schematic flow chart illustrating the sub-process of step S504 in FIG. 5 according to one embodiment;
FIG. 7 is a schematic flow chart illustrating the sub-process of step S210 in FIG. 2 according to one embodiment;
FIG. 8 is a block diagram of an apparatus for software quality detection in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for detecting the quality of the software can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the log query system 104 over a network. The terminal 102 receives a service query request carrying a service function identifier, generates and sends a log query request to the log query system 104 according to the service query request, receives a first test log set fed back by the log query system 104, searches a stored test log according to the log query request by the log query system 104, executes a preset test case and feeds back the test log to obtain a service function type corresponding to the service function identifier by a third party server, screens out a second test log set corresponding to the service function type from the first test log set, acquires a regular expression corresponding to the service function type, performs deduplication processing on the second test log set according to the regular expression, screens out a target test log set, determines log results of all target test logs in the target test log set, obtains software quality evaluation parameters according to the first log number and the second log number, and obtains software quality detection results according to the software quality evaluation parameters. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the log query system 104 may be implemented by a separate server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method for detecting software quality is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
s202: and receiving a service query request carrying the service function identifier, generating and sending a log query request to a log query system according to the service query request.
The terminal receives a service query request carrying a service function identifier, wherein the service query request comprises a time parameter, a service function identifier, a user account, a channel number and the like, the channel number refers to the corresponding number of a third party channel which is tested on the user account, the service function identifier is determined according to the checking condition of the user on the service function option and can be used for determining the service function type to be queried, specifically, a service function option list is displayed on a display interface of the terminal, the service query request input by the user comprises the service function option in the checked service function option list, the time parameter refers to a test log time period of the user selected to be queried, and the terminal can query log data in a specific time period according to the time parameter.
After receiving the service query request, the terminal analyzes the service query request, determines query conditions, wherein the query conditions comprise a test log time period, a query channel, a service function type and the like required to be queried, and after determining the query conditions, the terminal generates a log query request according to the query conditions and sends the log query request to a log query system. Specifically, the log query request may be an http request, and the log query system stores test logs corresponding to each third party server, where the test logs are obtained by executing a preset test case by each third party server and feeding back the test case.
S204: and receiving a first test log set fed back by the log query system, wherein the first test log set is obtained by searching the stored test logs by the log query system according to the log query request, and the test logs are obtained by executing preset test cases by a third-party server and feeding back the test cases.
The log query system searches the stored test logs according to the log query request and feeds back a first test log set corresponding to the log query request to the terminal. The log query system stores test logs corresponding to the third-party servers, the test logs are obtained by executing preset test cases by the third-party servers and feeding back the test cases, the test cases comprise test data sent to the third-party servers by a user through a terminal, and the test data are used for detecting the quality of the new version software.
S206: and acquiring the service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set.
The terminal acquires the service function type corresponding to the service function identifier, and then divides each first test log in the first test log set according to the service function type to determine a second test log set corresponding to the service function type. Specifically, the second test log set corresponding to the service function type refers to a test log obtained by executing a test case corresponding to the service function type, and can be used for analyzing the execution condition of the service function.
S208: and acquiring a regular expression corresponding to the service function type, performing de-duplication processing on the second test log set according to the regular expression, and screening out a target test log set.
Regular expressions, also called regular expressions, are a logical formula that operates on strings (including common characters (e.g., letters between a and z) and special characters (called "meta-characters")) by forming a "regular string" from a number of specific characters defined in advance, and combinations of these specific characters, where the "regular string" is used to express a filtering logic for the string. A regular expression is a text pattern that describes one or more strings to be matched when searching text.
In the scheme of the application, the regular expression is used for acquiring a log result from a specific field of a second test log in the second test log set, and the log result comprises success and failure. The terminal acquires regular expressions corresponding to the service function types from a preset log lookup table, the regular expressions corresponding to the service function types exist in the log lookup table, the terminal performs deduplication processing on the second test log set according to the regular expressions, namely, determines log results of the second test log according to the regular expressions, screens the second test log set according to the log results, and screens out target test log sets.
S210: determining log results of all target test logs in the target test log set, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
Each target test log in the target test log set corresponds to the service function type one by one, and according to the log result of each target test log, the execution condition of each service function can be determined, so that according to the execution condition of each service function, a software quality detection result is obtained. The first log number with successful log results and the second log number with failed log results are counted, software quality evaluation parameters are obtained according to the first log number and the second log number, and software quality detection results are obtained according to the software quality evaluation parameters. The software quality evaluation parameters refer to index parameters used for software quality evaluation, such as business function regression coverage rate, regression passing rate and the like, and the terminal considers the software quality detection result as qualified only when the software quality evaluation parameters are all larger than corresponding thresholds and can release the software quality detection result to the outside.
According to the method for detecting the software quality, log inquiry is carried out according to the service inquiry request to obtain the first test log set, the first test log set is screened according to the service function identification and the regular expression to obtain the target test log set, the software quality assessment parameters are obtained according to the log results of all target test logs in the target test log set, and therefore the software quality detection results are obtained according to the software quality assessment parameters. By the method, on the basis that the third-party server has completed software testing, software quality detection is performed according to the service query request and the test log fed back by the third-party server, so that a software quality detection result is obtained, the quality spam of the software of the new version to be deployed is realized, and the quality risk is reduced.
In one embodiment, as shown in fig. 3, S202 includes:
s302: acquiring time parameters, service function identifiers, user accounts and channel numbers in the service query request;
s304: determining a test log time period to be queried according to the time parameter, and determining a query service identifier according to the service function identifier;
s306: generating a log query request according to the test log time period, the query service identifier, the user account and the channel number of the required query, and sending the log query request to a log query system.
The user can inquire the data in a specific time period according to the requirement, the common test log time period of the required inquiry comprises 1 hour, 1 day, 7 days and the like, and the common time parameter format can be XXXX-XX-XX-YYYY-YY. The service function identifier corresponds to a service function type, and common service function types comprise user login, silver certificate transfer, purchase commission, sale commission, form removal and the like. The user can select the service function type to be queried at the front end of the terminal according to the needs of the user. The user account comprises a client number and a fund account number, wherein the user account is a user account which is provided for the third-party channel in advance by an enterprise for testing, namely, the user account which is tested by the third-party channel, and the channel number refers to the number of the corresponding third-party channel which is tested by the user account.
After receiving the service query request, the terminal analyzes the service query request, determines query conditions, wherein the query conditions comprise a test log time period, a query channel, a service function type and the like required to be queried, and after determining the query conditions, the terminal generates a log query request according to the query conditions and sends the log query request to a log query system. Specifically, the log query request may be an http request, and the log query system stores test logs corresponding to each third party server, where the test logs are obtained by executing a preset test case by each third party server and feeding back the test case.
According to the embodiment, the log query request is generated according to the service query request, and the log query request is sent to the log query system to perform log query, so that the first test log set is obtained.
In one embodiment, as shown in fig. 4, S206 includes:
s402: acquiring a service function type corresponding to the service function identifier;
s404: acquiring log identifiers of all first test logs in a first test log set;
s406: and sorting the first test log set according to the service function identification and the log identification to obtain a second test log set corresponding to the service function type.
The first test log carries a log identifier, and the log identifier is used for determining a tested service function type corresponding to the first test log. The terminal obtains log identifiers of all the first test logs in the first test log set, and can sort and sort the first test log set through the service function identifiers and the log identifiers to obtain a second test log set corresponding to the service function type, wherein the second test log set corresponding to the service function type is a test log obtained by executing test cases corresponding to the service function type, and the second test log set can be used for analyzing the execution condition of the service function.
According to the embodiment, the first test log set is classified and arranged according to the service function identifier and the log identifier of the first test log, so that a second test log set corresponding to the service function type is obtained.
In one embodiment, as shown in fig. 5, S208 includes:
s502: determining log results of each second test log in the second test log set according to the regular expression;
s504: when a plurality of second test logs corresponding to the same service function type exist in the second test log set, screening the plurality of second test logs according to log results and/or log recording time, and determining target test logs corresponding to the service function types;
s506: when only one second test log corresponding to the service function type exists in the second test log set, a target test log corresponding to the service function type is obtained according to the corresponding second test log.
The terminal can acquire log results from specific fields of each second test log in the second test log set according to the regular expression. When a plurality of second test logs corresponding to the same service function type exist in the second test log set, screening the plurality of second test logs according to log results and/or log recording time, screening a target test log corresponding to the service function type, and when only one second test log corresponding to the service function type exists in the second test log set, screening is not needed, and the target test log corresponding to the service function type is directly obtained according to the corresponding second test log. The screening of the plurality of second test logs according to the log results and/or log recording time comprises determining a screening mode according to the log results of the plurality of second test logs, wherein the log results comprise success and failure, and the log recording time refers to the time of storing the test logs by the log query system.
According to the embodiment, the log results of the second test logs in the second test log set are obtained according to the regular expression, and the duplicate removal processing is performed on the second test log set according to the log results of the second test logs, so that the target test log corresponding to the service function type is obtained.
In one embodiment, as shown in fig. 6, S504 includes:
s602: determining log results of a plurality of second test logs corresponding to the same service function type;
s604: when only one second test log with a successful log result exists in each second test log, obtaining a target test log according to the second test log with the successful log result;
s606: when a plurality of second test logs with successful log results exist in each second test log, acquiring log record time of each second test log with successful log results, calculating a difference value between the log record time of each second test log with successful log results and the current time, and determining a second test log with the smallest difference value with the current time to obtain a target test log.
The terminal can determine a plurality of log results of second test logs corresponding to the same service function type, firstly screening the second test logs according to the log results, when only one second test log with a successful log result exists in each second test log, taking the second test log with the successful log result as a target test log, when a plurality of second test logs with the successful log result exist in each second test log, further screening the second test log according to the log record time, acquiring the log record time of each second test log with the successful log result, calculating the difference value between the log record time of each second test log with the successful log result and the current time, determining the second test log with the smallest difference value with the current time, and taking the second test log with the smallest difference value as the target test log. The current time refers to the system time currently displayed by the terminal, and the smallest difference value with the current time refers to the closest to the current time, namely, the second test log which is finally stored in the log inquiry system and has a successful log result.
According to the embodiment, the target test log is obtained by performing deduplication processing on the second test log set according to the log result and the log recording time of the second test log.
In one embodiment, as shown in fig. 7, S210 includes:
s702: acquiring the total number of service function types required to be queried in a query request;
s704: determining the regression coverage rate of the service functions according to the preset total number of the service functions, the first log number and the second log number;
s706: determining regression passing rate according to the first log number and the total number of service function types;
s708: and obtaining a software quality detection result according to the regression coverage rate and the regression passing rate of the service function.
The terminal obtains the total number of service function types to be queried in the query request, the total number of service function types is determined by the number of service function options checked by the user, the total number of service functions refers to the total number of service functions which can be processed by software, the service function regression coverage rate can be determined according to the preset total number of service functions, the first log number and the second log number, further, the calculation mode of the service function regression coverage rate can be that the service function regression coverage rate= (first log number+second log number)/the service function total number, the terminal can determine the regression passing rate according to the first log number and the service function type total number, and further, the calculation mode of the regression passing rate is that the regression passing rate=the first log number/the service function type total number. The service function regression coverage rate and the regression passing rate are two dimensions for software quality evaluation, a regression coverage rate threshold value and a regression passing rate threshold value are arranged in the terminal, and the terminal can only consider the software quality detection result as qualified when the obtained regression coverage rate and the regression passing rate are both larger than the corresponding threshold values and can release the software quality detection result outwards.
According to the embodiment, the total number of the service functions, the first log number and the second log number are used for determining the regression coverage rate of the service functions, determining the regression passing rate according to the first log number and the total number of the service functions, obtaining the software quality detection result according to the regression coverage rate and the regression passing rate of the service functions, and determining the software quality detection result.
It should be understood that, although the steps in the flowcharts of fig. 2-7 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
In one embodiment, as shown in fig. 8, there is provided an apparatus for software quality detection, comprising: a first receiving module 802, a second receiving module 804, a screening module 806, a deduplication module 808, and a processing module 810, wherein:
the first receiving module 802 is configured to receive a service query request carrying a service function identifier, generate and send a log query request to a log query system according to the service query request;
the second receiving module 804 is configured to receive a first test log set fed back by the log query system, where the first test log set is obtained by searching, by the log query system, a stored test log according to a log query request, and the test log is obtained by executing a preset test case by a third party server and feeding back the test case;
a screening module 806, configured to obtain a service function type corresponding to the service function identifier, and screen a second test log set corresponding to the service function type from the first test log set;
the deduplication module 808 is configured to obtain a regular expression corresponding to the service function type, perform deduplication processing on the second test log set according to the regular expression, and screen out a target test log set;
the processing module 810 is configured to determine a log result of each target test log in the target test log set, count a first log number of successful log results and a second log number of failed log results, obtain a software quality evaluation parameter according to the first log number and the second log number, and obtain a software quality detection result according to the software quality evaluation parameter.
According to the device for detecting the software quality, log inquiry is carried out according to the service inquiry request to obtain the first test log set, the first test log set is screened according to the service function identification and the regular expression to obtain the target test log set, the software quality assessment parameters are obtained according to the log results of all target test logs in the target test log set, and therefore the software quality detection results are obtained according to the software quality assessment parameters. By the method, on the basis that the third-party server has completed software testing, software quality detection is performed according to the service query request and the test log fed back by the third-party server, so that a software quality detection result is obtained, the quality spam of the software of the new version to be deployed is realized, and the quality risk is reduced.
In one embodiment, the first receiving module is further configured to determine a test log time period of the required query according to the time parameter, determine a query service identifier according to the service function identifier, generate a log query request according to the test log time period of the required query, the query service identifier, the user account and the channel number, and send the log query request to the log query system.
In one embodiment, the screening module is further configured to obtain a service function type corresponding to the service function identifier, obtain log identifiers of each first test log in the first test log set, and sort the first test log set according to the service function identifier and the log identifiers, so as to obtain a second test log set corresponding to the service function type.
In one embodiment, the deduplication module is further configured to determine a log result of each second test log in the second test log set according to the regular expression, when a plurality of second test logs corresponding to the same service function type exist in the second test log set, screen the plurality of second test logs according to the log result and/or the log recording time, determine a target test log corresponding to each service function type, and when only one second test log corresponding to the service function type exists in the second test log set, obtain the target test log corresponding to the service function type according to the corresponding second test log.
In one embodiment, the deduplication module is further configured to determine a plurality of log results of second test logs corresponding to the same service function type, when only one second test log with a successful log result exists in each second test log, obtain a target test log according to the second test log with the successful log result, when the second test log with the successful log result exists in each second test log, obtain a log record time of the second test log with the successful log result, calculate a difference value between the log record time and a current time of the second test log with the successful log result, and determine a second test log with a minimum difference value with the current time, so as to obtain the target test log.
In one embodiment, the processing module is further configured to obtain a total number of service function types to be queried in the query request, determine a service function regression coverage according to the preset total number of service functions, the first log number and the second log number, determine a regression passing rate according to the first log number and the total number of service function types, and obtain a software quality detection result according to the service function regression coverage and the regression passing rate.
The specific definition of the device for detecting the quality of the software can be found in the definition of the method for detecting the quality of the software hereinabove, and will not be repeated here. The above-described means for software quality detection may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of software quality detection. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory storing a computer program and a processor that when executing the computer program performs the steps of:
receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request;
receiving a first test log set fed back by a log query system, wherein the first test log set is obtained by searching a stored test log by the log query system according to a log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
acquiring a service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
Acquiring a regular expression corresponding to the service function type, performing de-duplication processing on the second test log set according to the regular expression, and screening out a target test log set;
determining log results of all target test logs in the target test log set, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
According to the computer equipment for software quality detection, log inquiry is carried out according to the service inquiry request to obtain a first test log set, the first test log set is screened according to the service function identification and the regular expression to obtain a target test log set, and according to the log results of all target test logs in the target test log set, the software quality evaluation parameters are obtained according to the log results, so that the software quality detection results are obtained according to the software quality evaluation parameters. By the method, on the basis that the third-party server has completed software testing, software quality detection is performed according to the service query request and the test log fed back by the third-party server, so that a software quality detection result is obtained, the quality spam of the software of the new version to be deployed is realized, and the quality risk is reduced.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring time parameters, service function identifiers, user accounts and channel numbers in the service query request;
determining a test log time period to be queried according to the time parameter, and determining a query service identifier according to the service function identifier;
generating a log query request according to the test log time period, the query service identifier, the user account and the channel number of the required query, and sending the log query request to a log query system.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring a service function type corresponding to the service function identifier;
acquiring log identifiers of all first test logs in a first test log set;
and sorting the first test log set according to the service function identification and the log identification to obtain a second test log set corresponding to the service function type.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining log results of each second test log in the second test log set according to the regular expression;
when a plurality of second test logs corresponding to the same service function type exist in the second test log set, screening the plurality of second test logs according to log results and/or log recording time, and determining target test logs corresponding to the service function types;
When only one second test log corresponding to the service function type exists in the second test log set, a target test log corresponding to the service function type is obtained according to the corresponding second test log.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining log results of a plurality of second test logs corresponding to the same service function type;
when only one second test log with a successful log result exists in each second test log, obtaining a target test log according to the second test log with the successful log result;
when a plurality of second test logs with successful log results exist in each second test log, acquiring log record time of each second test log with successful log results, calculating a difference value between the log record time of each second test log with successful log results and the current time, and determining a second test log with the smallest difference value with the current time to obtain a target test log.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring the total number of service function types required to be queried in a query request;
Determining the regression coverage rate of the service functions according to the preset total number of the service functions, the first log number and the second log number;
determining regression passing rate according to the first log number and the total number of service function types;
and obtaining a software quality detection result according to the regression coverage rate and the regression passing rate of the service function.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request;
receiving a first test log set fed back by a log query system, wherein the first test log set is obtained by searching a stored test log by the log query system according to a log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
acquiring a service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
acquiring a regular expression corresponding to the service function type, performing de-duplication processing on the second test log set according to the regular expression, and screening out a target test log set;
Determining log results of all target test logs in the target test log set, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
According to the storage medium for software quality detection, log inquiry is carried out according to the service inquiry request to obtain a first test log set, the first test log set is screened according to the service function identification and the regular expression to obtain a target test log set, and according to the log results of all target test logs in the target test log set, the software quality evaluation parameters are obtained according to the log results, so that the software quality detection results are obtained according to the software quality evaluation parameters. By the method, on the basis that the third-party server has completed software testing, software quality detection is performed according to the service query request and the test log fed back by the third-party server, so that a software quality detection result is obtained, the quality spam of the software of the new version to be deployed is realized, and the quality risk is reduced.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring time parameters, service function identifiers, user accounts and channel numbers in the service query request;
determining a test log time period to be queried according to the time parameter, and determining a query service identifier according to the service function identifier;
generating a log query request according to the test log time period, the query service identifier, the user account and the channel number of the required query, and sending the log query request to a log query system.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a service function type corresponding to the service function identifier;
acquiring log identifiers of all first test logs in a first test log set;
and sorting the first test log set according to the service function identification and the log identification to obtain a second test log set corresponding to the service function type.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining log results of each second test log in the second test log set according to the regular expression;
When a plurality of second test logs corresponding to the same service function type exist in the second test log set, screening the plurality of second test logs according to log results and/or log recording time, and determining target test logs corresponding to the service function types;
when only one second test log corresponding to the service function type exists in the second test log set, a target test log corresponding to the service function type is obtained according to the corresponding second test log.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining log results of a plurality of second test logs corresponding to the same service function type;
when only one second test log with a successful log result exists in each second test log, obtaining a target test log according to the second test log with the successful log result;
when a plurality of second test logs with successful log results exist in each second test log, acquiring log record time of each second test log with successful log results, calculating a difference value between the log record time of each second test log with successful log results and the current time, and determining a second test log with the smallest difference value with the current time to obtain a target test log.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring the total number of service function types required to be queried in a query request;
determining the regression coverage rate of the service functions according to the preset total number of the service functions, the first log number and the second log number;
determining regression passing rate according to the first log number and the total number of service function types;
and obtaining a software quality detection result according to the regression coverage rate and the regression passing rate of the service function.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method of software quality detection, the method comprising:
receiving a service query request carrying a service function identifier, generating and sending a log query request to a log query system according to the service query request;
receiving a first test log set fed back by the log query system, wherein the first test log set is obtained by searching a stored test log by the log query system according to the log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
Acquiring a service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
acquiring a regular expression corresponding to the service function type, and determining a log result of each second test log in the second test log set according to the regular expression;
when a plurality of second test logs corresponding to the same service function type exist in the second test log set, determining log results of the plurality of second test logs corresponding to the same service function type, when only one second test log with a successful log result exists in each second test log, obtaining a target test log according to the second test log with the successful log result, when the plurality of second test logs with the successful log result exist in each second test log, obtaining log record time of the second test log with the successful log result, calculating a difference value between the log record time of the second test log with the successful log result and the current time, and determining the second test log with the smallest difference value with the current time to obtain the target test log;
When only one second test log corresponding to the service function type exists in the second test log set, obtaining a target test log corresponding to the service function type according to the corresponding second test log;
determining log results of all target test logs, counting the first log number of which the log results are successful and the second log number of which the log results are failed, obtaining software quality evaluation parameters according to the first log number and the second log number, and obtaining software quality detection results according to the software quality evaluation parameters.
2. The method of claim 1, wherein generating and sending a log query request to a log query system based on the service query request comprises:
acquiring time parameters, service function identifiers, user accounts and channel numbers in the service query request;
determining a test log time period to be queried according to the time parameter, and determining a query service identifier according to the service function identifier;
generating a log query request according to the test log time period of the required query, the query service identification, the user account and the channel number, and sending the log query request to a log query system.
3. The method of claim 1, wherein the obtaining the service function type corresponding to the service function identifier, and the screening the second test log set corresponding to the service function type from the first test log set comprises:
acquiring a service function type corresponding to the service function identifier;
acquiring log identifiers of all first test logs in the first test log set;
and sorting the first test log set according to the service function identifier and the log identifier to obtain a second test log set corresponding to the service function type.
4. The method of claim 1, wherein the obtaining a software quality assessment parameter from the first log number and the second log number, and obtaining a software quality detection result from the software quality assessment parameter comprises:
acquiring the total number of service function types required to be queried in the query request;
determining the regression coverage rate of the service functions according to the preset total number of the service functions, the first log number and the second log number;
determining a regression passing rate according to the first log number and the total number of service function types;
And obtaining a software quality detection result according to the regression coverage rate of the service function and the regression passing rate.
5. An apparatus for software quality detection, the apparatus comprising:
the first receiving module is used for receiving a service query request carrying a service function identifier, generating and sending a log query request to the log query system according to the service query request;
the second receiving module is used for receiving a first test log set fed back by the log query system, the first test log set is obtained by searching a stored test log by the log query system according to the log query request, and the test log is obtained by executing a preset test case by a third-party server and feeding back the test case;
the screening module is used for acquiring the service function type corresponding to the service function identifier, and screening a second test log set corresponding to the service function type from the first test log set;
the duplicate removal module is used for acquiring regular expressions corresponding to the service function types, determining the log results of each second test log in the second test log set according to the regular expressions, determining the log results of the second test logs corresponding to the same service function types when a plurality of second test logs corresponding to the same service function types exist in the second test log set, obtaining a target test log according to the successful second test log of the log results when only one second test log corresponding to the service function type exists in each second test log, obtaining the log record time of each log result as the successful second test log when a plurality of second test logs exist in each second test log, calculating the difference value between the log record time of each log result as the successful second test log and the current time, determining the second test log with the smallest difference value to the current time, and obtaining the target test log according to the corresponding second test log corresponding to the service function type when only one second test log corresponding to the service function type exists in the second test log set;
The processing module is used for determining the log result of each target test log, counting the first log number with the log result being successful and the second log number with the log result being failed, obtaining a software quality evaluation parameter according to the first log number and the second log number, and obtaining a software quality detection result according to the software quality evaluation parameter.
6. The apparatus of claim 5, wherein the first receiving module is further configured to obtain a time parameter, a service function identifier, a user account, and a channel number in the service query request, determine a test log time period for a desired query according to the time parameter, determine a query service identifier according to the service function identifier, generate a log query request according to the test log time period for the desired query, the query service identifier, the user account, and the channel number, and send the log query request to a log query system.
7. The apparatus of claim 5, wherein the screening module is further configured to obtain a service function type corresponding to the service function identifier, obtain log identifiers of each first test log in the first test log set, and sort the first test log set according to the service function identifier and the log identifiers to obtain a second test log set corresponding to the service function type.
8. The apparatus of claim 5, wherein the processing module is further configured to obtain a total number of service function types required to be queried in the query request, determine a service function regression coverage according to a preset total number of service functions, the first log number and the second log number, determine a regression passing rate according to the first log number and the total number of service function types, and obtain a software quality detection result according to the service function regression coverage and the regression passing rate.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 4 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
CN201910849762.1A 2019-09-09 2019-09-09 Method, device, computer equipment and storage medium for detecting software quality Active CN110727567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910849762.1A CN110727567B (en) 2019-09-09 2019-09-09 Method, device, computer equipment and storage medium for detecting software quality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910849762.1A CN110727567B (en) 2019-09-09 2019-09-09 Method, device, computer equipment and storage medium for detecting software quality

Publications (2)

Publication Number Publication Date
CN110727567A CN110727567A (en) 2020-01-24
CN110727567B true CN110727567B (en) 2024-02-02

Family

ID=69218018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910849762.1A Active CN110727567B (en) 2019-09-09 2019-09-09 Method, device, computer equipment and storage medium for detecting software quality

Country Status (1)

Country Link
CN (1) CN110727567B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190817B (en) * 2019-12-23 2022-09-06 深圳平安医疗健康科技服务有限公司 Method and device for processing software defects
CN112416557B (en) * 2020-11-23 2022-12-30 青岛海尔科技有限公司 Method and device for determining call relation, storage medium and electronic device
CN112559333B (en) * 2020-12-10 2022-05-20 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN112860583A (en) * 2021-03-29 2021-05-28 中信银行股份有限公司 Test comprehensiveness detection method, device, equipment and storage medium based on log
CN113282471B (en) * 2021-05-17 2022-09-27 多点(深圳)数字科技有限公司 Equipment performance testing method and device and terminal equipment
CN113434135B (en) * 2021-06-28 2023-06-16 青岛海尔科技有限公司 Method and device for determining call repeatability of interface, storage medium and electronic device
CN113656293A (en) * 2021-08-05 2021-11-16 上海钧正网络科技有限公司 Data deduplication method and device for flow playback, testing method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101371245A (en) * 2005-07-12 2009-02-18 维兹博麦哲思公司 Distributed capture and aggregation of dynamic application usage information
CN103793315A (en) * 2012-10-29 2014-05-14 Sap股份公司 Software development quality monitoring and improving system and method
CN105224446A (en) * 2014-05-26 2016-01-06 腾讯科技(深圳)有限公司 A kind of test case screening technique and device, server
CN105260292A (en) * 2015-10-09 2016-01-20 中国人民财产保险股份有限公司 Log recording method, apparatus and system
CN107133177A (en) * 2017-05-12 2017-09-05 郑州云海信息技术有限公司 A kind of automated test frame

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8949673B2 (en) * 2012-05-23 2015-02-03 Sap Se Software systems testing interface

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101371245A (en) * 2005-07-12 2009-02-18 维兹博麦哲思公司 Distributed capture and aggregation of dynamic application usage information
CN103793315A (en) * 2012-10-29 2014-05-14 Sap股份公司 Software development quality monitoring and improving system and method
CN105224446A (en) * 2014-05-26 2016-01-06 腾讯科技(深圳)有限公司 A kind of test case screening technique and device, server
CN105260292A (en) * 2015-10-09 2016-01-20 中国人民财产保险股份有限公司 Log recording method, apparatus and system
CN107133177A (en) * 2017-05-12 2017-09-05 郑州云海信息技术有限公司 A kind of automated test frame

Also Published As

Publication number Publication date
CN110727567A (en) 2020-01-24

Similar Documents

Publication Publication Date Title
CN110727567B (en) Method, device, computer equipment and storage medium for detecting software quality
JP7441582B2 (en) Methods, devices, computer-readable storage media and programs for detecting data breaches
CN110245034B (en) Service metric analysis based on structured log patterns of usage data
US20230360513A1 (en) Adaptive severity functions for alerts
CN110366727B (en) Multi-signal analysis for damaged range identification
US20180373885A1 (en) Hybrid on-premises/software-as-service applications
KR20190109427A (en) Ongoing Learning for Intrusion Detection
CN107733968B (en) Application information pushing method and device, computer equipment and storage medium
CN110008117A (en) Page test method, device, computer equipment and storage medium
US11722503B2 (en) Responsive privacy-preserving system for detecting email threats
US9436553B2 (en) Recovering usability of cloud based service from system failure
US11119843B2 (en) Verifying application behavior based on distributed tracing
WO2021084020A1 (en) Detection of security threats in a network environment
CN110830500B (en) Network attack tracking method and device, electronic equipment and readable storage medium
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN116776390A (en) Method, device, storage medium and equipment for monitoring data leakage behavior
US11258806B1 (en) System and method for automatically associating cybersecurity intelligence to cyberthreat actors
CN112307477A (en) Code detection method, device, storage medium and terminal
US10198415B2 (en) Webform monitoring
CN113138960A (en) Data storage method and system based on cloud storage space adjustment
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN112506800A (en) Method, apparatus, device, medium and program product for testing code
US9485242B2 (en) Endpoint security screening
CN110222290B (en) Page generation method and device, computer equipment and storage medium
US20210111941A1 (en) Scalable subscriptions for virtual collaborative workspaces

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant