Defect retrieval method and system for software development testing
By analyzing defect keywords, synonyms and related scenarios are obtained, combined search and scene search are carried out in existing defects, and the problem of inaccurate defect search in the existing technology is solved, and efficient and accurate defect search is achieved.
Patent Information
- Application Number
- CN202411097285.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-02-28
AI Technical Summary
Existing defect search methods may not be able to find relevant defects during accurate searching, and there are too many fuzzy query results, which cannot accurately find existing defects, resulting in difficult to guarantee the quality of the software.
By receiving keywords related to defects, analyzing them to obtain synonyms and associated scenarios, and performing combined searches and scene searches in existing defects, improving the accuracy and efficiency of searches.
It realizes accurate search of related defects among a large number of existing defects, avoids omissions of accurate searches and excessive results of fuzzy queries, and significantly improves the accuracy and utilization of search results.
Smart Images

Figure CN119537198A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development and testing, and in particular, to a defect retrieval method and system, a computer-readable storage medium, and a program product for software development and testing. Background Art
[0002] Defect retrieval is an important part of software development and testing process, which aims to identify and fix various problems in software products.
[0003] Existing defect retrieval methods mainly include: using the unique identifier (ID or number) of the defect to directly find a specific defect record; or using keywords for fuzzy query. However, the above existing defect retrieval schemes may result in the situation where the precise search fails to find the result and the fuzzy query results are too many. Summary of the invention
[0004] The inventor of the present application realized that when analyzing and retrieving existing defects (i.e., known defects), the current defect retrieval method only performs fuzzy matching on the input keywords, while the related defect titles in many actual systems may contain synonymous keywords. The analysis of a defect is essentially to eliminate this type of defect. For example, the retrieval of existing defects in the software system development stage itself focuses on how to avoid defects that have already occurred in other systems in the same or similar scenario development.
[0005] In addition, the inventor of this application also realized that defects belong to the existing R&D assets of the information system, and the desired results of searching for defects at different stages of R&D are different. The industry has not had a good solution to this problem, resulting in the value of existing defects not being fully utilized. In the process of software development and testing, accurately finding existing defects is crucial to ensuring software quality.
[0006] According to one aspect of the present application, a defect retrieval method for software development testing is provided, the method comprising: receiving keywords related to defects; analyzing the keywords to obtain synonyms and associated scenarios of the keywords; and performing combined retrieval and / or scenario retrieval in existing defects based on the keywords, the synonyms of the keywords and the associated scenarios.
[0007] As a supplement or alternative to the above solution, in the above method, receiving keywords related to the defect includes: receiving a user input field, the field including one or more keywords.
[0008] As a supplement or alternative to the above solution, in the above method, receiving keywords related to the defect includes: receiving keywords from a prevention module, wherein the prevention module scans test cases in a testing process to extract the keywords.
[0009] As a supplement or alternative to the above-mentioned scheme, in the above-mentioned method, analyzing the keyword to obtain synonyms and associated scenarios of the keyword includes: using a data construction module to pre-construct a synonym data set and a scenario data set by scanning interface specifications of different systems; and determining the synonyms and associated scenarios of the keyword from the pre-constructed synonym data set and scenario data set based on the received keyword.
[0010] As a supplement or alternative to the above solution, in the above method, the associated scenario includes the scenario to which the defect belongs and the scenario related to the defect.
[0011] As a supplement or replacement for the above-mentioned scheme, in the above-mentioned method, based on the keywords, synonyms of the keywords and the associated scenarios, performing combined retrieval and / or scene retrieval in the existing defects includes: based on the keywords and synonyms of the keywords, performing keyword retrieval and / or keyword combined retrieval in the existing defects; and based on the associated scenarios, performing scene retrieval in the existing defects.
[0012] As a supplement or replacement for the above scheme, in the above method, based on the keywords, synonyms of the keywords and the associated scenarios, performing combined retrieval and / or scenario retrieval in the existing defects includes: adopting different retrieval methods according to different retrieval sources.
[0013] As a supplement or alternative to the above solution, in the above method, when the keyword is received from the prevention module, a scene search is performed in the existing defects to obtain a first search result.
[0014] As a supplement or alternative to the above solution, the above method also includes: notifying the tester of the first search result.
[0015] As a supplement or replacement for the above solution, in the above method, the synonym data set and the scenario data set are pre-built in the memory or cache.
[0016] As a supplement or replacement for the above-mentioned scheme, in the above-mentioned method, using the data construction module to pre-construct a synonym data set and a scenario data set by scanning the interface specifications of different systems includes: using the data construction module to scan the interface specifications; using the data construction module to segment all interface fields; using the data construction module to cyclically compare the ambiguous distance L between each field; and when the ambiguous distance between the first field and the second field is less than a preset threshold, using the first field and the second field as candidate synonym data.
[0017] As a supplement or alternative to the above solution, in the above method, the preset threshold is adjustable and is less than or equal to 1 / 2.
[0018] As a supplement or replacement for the above solution, in the above method, the ambiguity distance L is determined according to the following formula:
[0019]
[0020] in,
[0021] And wherein D represents the distance difference between the corresponding keywords of the two fields, i and j are the order of the corresponding keywords in their respective fields, and n and m are the total number of keywords contained in the first field and the second field.
[0022] As a supplement or alternative to the above solution, in the above method, when the keyword only appears in the first field but not in the second field, j takes the value of 0.
[0023] According to another aspect of the present application, a defect retrieval system for software development testing is provided, the system including a retrieval module, the retrieval module being configured to: receive keywords related to defects; analyze the keywords to obtain synonyms and associated scenarios of the keywords; and perform combined retrieval and / or scenario retrieval in existing defects based on the keywords, the synonyms of the keywords and the associated scenarios.
[0024] As a supplement or alternative to the above solution, in the above system, the retrieval module is configured to: receive a user input field, where the field includes one or more keywords.
[0025] As a supplement or replacement for the above solution, the above system further includes: a prevention module, which is used to scan the test cases in the testing process to extract keywords, wherein the retrieval module is configured to receive the keywords from the prevention module.
[0026] As a supplement or replacement for the above-mentioned scheme, the above-mentioned system also includes: a data construction module, which is used to pre-construct a synonym data set and a scenario data set by scanning the interface specifications of different systems; wherein the retrieval module is configured to determine the synonyms and associated scenarios of the keyword from the synonym data set and scenario data set pre-constructed by the data construction module based on the received keyword.
[0027] As a supplement or alternative to the above solution, in the above system, the associated scenario includes the scenario to which the defect belongs and the scenario related to the defect.
[0028] As a supplement or alternative to the above-mentioned scheme, in the above-mentioned system, the retrieval module is configured to: perform keyword retrieval and / or keyword combination retrieval in the existing defects based on the keywords and synonyms of the keywords; and perform scenario retrieval in the existing defects based on the associated scenarios.
[0029] As a supplement or replacement for the above solution, in the above system, the retrieval module is configured to adopt different retrieval methods according to different retrieval sources.
[0030] As a supplement or alternative to the above solution, in the above system, the retrieval module is configured to: upon receiving the keyword from the prevention module, perform a scenario search in the existing defects to obtain a first retrieval result.
[0031] As a supplement or alternative to the above solution, in the above system, the prevention module is configured to: notify the tester of the first retrieval result.
[0032] As a supplement or replacement for the above solution, in the above system, the synonym data set and the scene data set are pre-built in the memory or cache.
[0033] As a supplement or alternative to the above scheme, in the above system, the data construction module is configured to: scan the interface specification; segment all interface fields; cyclically compare the ambiguous distance L between each field; and when the ambiguous distance between the first field and the second field is less than a preset threshold, use the first field and the second field as candidate synonym data.
[0034] As a supplement or alternative to the above solution, in the above system, the preset threshold is adjustable and is less than or equal to 1 / 2.
[0035] As a supplement or replacement for the above solution, in the above system, the ambiguity distance L is determined according to the following formula:
[0036] in,
[0037] And wherein D represents the distance difference between the corresponding keywords of the two fields, i and j are the order of the corresponding keywords in their respective fields, and n and m are the total number of keywords contained in the first field and the second field.
[0038] As a supplement or alternative to the above solution, in the above system, when the keyword only appears in the first field but not in the second field, j takes the value of 0.
[0039] According to another aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed by a processor, the processor executes the method as described above.
[0040] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method as described above is implemented.
[0041] The defect retrieval scheme of the embodiment of the present application analyzes the defect keywords to obtain the synonyms and related scenarios of the keywords; and based on the keywords, the synonyms and related scenarios of the keywords, a combination search and / or scenario search is performed in the existing defects. In this way, based on the analysis, matching and combination of user keywords, the combination of defect keywords and the scenarios and related scenarios to which the defects belong are taken into consideration, a more accurate retrieval effect can be achieved, avoiding the situation where the precise search fails to find the results and there are too many fuzzy query results, and the accuracy of the retrieval results is significantly improved.
[0042] In addition, the defect retrieval scheme of the embodiment of the present application fully exploits the value of defects. Defects often belong to specific scenarios. When the keyword search fails, the scenario corresponding to the keyword search is analyzed, and the defects that have occurred in the relevant scenario are retrieved, which can avoid similar defect problems from happening again.
[0043] Furthermore, the defect retrieval scheme of the embodiment of the present application includes a data construction module, and the synonym data set and the scenario data set are pre-constructed in the memory or cache, so that they can be used repeatedly, avoiding multiple database full table matches and making retrieval faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and other objects and advantages of the present application will become more fully apparent from the following detailed description in conjunction with the accompanying drawings, wherein the same or similar elements are represented by the same reference numerals.
[0045] Figure 1 A schematic diagram of a process flow of a defect retrieval method for software development testing according to an embodiment of the present application is shown;
[0046] Figure 2A schematic diagram of the structure of a defect retrieval system for software development testing according to an embodiment of the present application is shown;
[0047] Figure 3 A flowchart of a retrieval module according to an embodiment of the present application is shown;
[0048] Figure 4 A workflow diagram of a data construction module according to an embodiment of the present application is shown;
[0049] Figure 5 A flowchart of a prevention module according to an embodiment of the present application is shown; and
[0050] Figure 6 A schematic diagram showing a retrieval result obtained by using a defect retrieval solution according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] For the purpose of brevity and illustration, the principles of the present application are described herein mainly with reference to its exemplary embodiments. However, those skilled in the art will readily recognize that the same principles are equally applicable to all types of methods and systems for generating and managing reply codes, and that the same or similar principles may be implemented therein, without departing from the true spirit and scope of the present application.
[0052] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0053] Figure 1 FIG. 1 is a flow chart of a defect retrieval method 1000 for software development testing according to an embodiment of the present application. Figure 1 As shown, the defect retrieval method 1000 for software development testing includes:
[0054] In step S110, receiving a keyword related to a defect;
[0055] In step S120, the keyword is analyzed to obtain synonyms and associated scenarios of the keyword; and
[0056] In step S130, based on the keyword, the synonyms of the keyword and the associated scenario, a combined search and / or scenario search is performed in the existing defects.
[0057] In the context of this application, "software development testing" includes a set of activities and strategies designed to discover and fix defects in the software, verify that the software meets the specified requirements, and ensure that the final delivery of the software meets the user's expectations.
[0058] In one or more embodiments, software development testing may include one or more of the following aspects: (1) Test planning: developing a detailed test plan, including test objectives, scope, methods, resources, schedule, and risk assessment; (2) Requirements analysis: understanding and analyzing software requirements to ensure that the test covers all functional and non-functional requirements; (3) Test design: designing test cases and test scenarios to verify various aspects of the software; (4) Unit testing: testing the smallest testable part of the software, usually completed by developers; (5) Integration testing: testing the interfaces between modules to ensure that they can work together; (6) System testing: testing the complete software system to verify that it meets the requirements specifications; (7) Performance testing: evaluating the software's response time, throughput, stability, and scalability; (8) Security testing: ensuring that the software can resist external threats and attacks; (9) Usability testing: verifying whether the software's user interface and user experience are intuitive and easy to use; (10) Compatibility testing: ensuring that the software can work properly in different browsers, operating systems, hardware, and network environments; (11) Regression testing: verifying that the software can work properly in different browsers, operating systems, hardware, and network environments; (12) Testing: Testing after software changes to ensure that the new code does not break existing functions; (12) Automated testing: Use automated testing tools to improve test efficiency and coverage; (13) Continuous integration (CI): Integrate automated testing into the CI process to ensure that each code submission is tested; (14) Test-driven development (TDD): A development practice that writes test cases before writing functional code; (15) Agile testing: A testing method combined with an agile development process that emphasizes rapid feedback and continuous improvement; (16) Defect tracking and management: Use a defect tracking system to record, track, and manage discovered defects; (17) Test reporting: Write a test report that summarizes test results and discovered problems; (18) Test end conditions: Determine the conditions for the end of testing, such as defect rate, test coverage, or time limit; (19) User acceptance testing (UAT): Users participate in testing to ensure that the software meets business requirements and user expectations; (20) Shift testing left and right: Move testing activities forward to the early stages of the development cycle (shift left) and continue monitoring after the software is released (shift right). Software development testing is an ongoing process involving multiple stages and roles. An effective testing strategy can help the team detect problems early, reduce risks, and improve software quality and user satisfaction. As software development methods continue to evolve, testing practices are also constantly evolving and improving to adapt to new technologies and requirements.
[0059] In the context of this application, "defect retrieval" refers to defect retrieval in stock defects (ie, existing defect records), that is, searching for specific defects or defect patterns in a recorded defect library or defect tracking system.
[0060] Existing defect retrieval methods often only perform precise matching on the input keywords, but in reality, related defect titles in many systems may contain synonymous keywords. Therefore, if only the defect retrieval method with precise keyword matching is used, the key points of the test may be missed, resulting in production defects. To solve this problem, some existing defect retrieval methods also perform fuzzy matching on the input keywords, but the results obtained by fuzzy matching in a large number of existing defects may be too many, making it impossible to accurately find related defects.
[0061] Before defect retrieval, it is necessary to determine the keywords related to the defect. For example, the "keywords" can be determined according to the defect characteristics to be retrieved, such as function names, error codes, specific behaviors, etc. In one or more embodiments, the search function of the defect tracking system (such as JIRA, Bugzilla, TestRail) can be used for keyword retrieval. In the defect tracking system, keywords can usually be searched in multiple fields, including title, description, notes, logs, etc.
[0062] like Figure 1 As shown, in step S110, keywords related to the defect are received.
[0063] In one embodiment, step S110 includes: receiving a user input field, wherein the field includes one or more keywords.
[0064] In another embodiment, step S110 includes: receiving keywords from a prevention module, wherein the prevention module scans test cases in the testing process and extracts the keywords. In one or more embodiments, the prevention module may be configured to: scan test cases uploaded in the version, extract keywords for retrieval, remind testers of test points that need to be paid attention to, and initiate notifications (such as sending notification emails, etc.).
[0065] In step S120, the keyword is analyzed to obtain synonyms and associated scenarios of the keyword. Here, synonyms of a keyword refer to words that have similar usage scenarios and express the same or similar meanings. In information retrieval, content analysis, search engine optimization (SEO), or any scenario that requires keyword matching, the use of synonyms can help capture a wider range of relevant information, such as "bank card number" and "card number" are synonyms. When performing defect retrieval, considering the use of synonyms of keywords can improve the coverage and accuracy of the search.
[0066] The associated scenario includes the scenario to which the defect belongs and related scenarios. For example, the keyword "card number decryption" belongs to the "sensitive information decryption" scenario. Here, the "sensitive information decryption" scenario can be one of multiple predetermined scenarios.
[0067] In one embodiment, step S120 includes: using a data construction module to pre-construct a synonym data set and a scenario data set by scanning interface specifications of different systems; and determining synonyms and associated scenarios of the keyword from the pre-constructed synonym data set and scenario data set according to the received keyword.
[0068] In one or more embodiments, the data construction module is responsible for automatically scanning different system interface specifications and constructing a synonym data set; and is responsible for constructing the scope of upward retrieval and manually defining scenarios.
[0069] In one embodiment, using a data construction module to pre-construct a synonym data set and a scenario data set by scanning interface specifications of different systems includes: using a data construction module to scan interface specifications; using the data construction module to segment all interface fields; using the data construction module to cyclically compare the ambiguous distance L between each field; and when the ambiguous distance between the first field and the second field is less than a preset threshold (an adjustable value, which is less than or equal to 1 / 2), using the first field and the second field as candidate synonym data.
[0070] In one embodiment, the ambiguity distance L is determined according to the following formula:
[0071]
[0072] in,
[0073] In the above formula, D represents the distance difference between the corresponding keywords in the two fields, i and j represent the order of the corresponding keywords in their respective fields, and n and m represent the total number of keywords contained in the first field and the second field. When the keyword only appears in the first field but not in the second field, j takes the value of 0.
[0074] In one or more embodiments, the synonym data set and the scene data set are pre-built in the memory or cache. In this way, they can be used repeatedly to avoid multiple database full table matches, thereby making the search faster.
[0075] In step S130, based on the keyword, the synonyms of the keyword and the associated scenarios, a combination search and / or a scenario search is performed in the stock defects. In one embodiment, step S130 includes: based on the keyword and the synonyms of the keyword, a keyword search and / or a keyword combination search is performed in the stock defects; and based on the associated scenarios, a scenario search is performed in the stock defects.
[0076] In one embodiment, step S130 may include: using different search methods according to different search sources (e.g., user input or keywords sent by the prevention module). In one embodiment, when the keyword is received from the prevention module, a scene search is performed in the stock defects to obtain a first search result.
[0077] In one embodiment, "scenario retrieval" refers to retrieval using associated scenarios as keywords. For example, since the keyword "card number decryption" belongs to the "sensitive information decryption" scenario, when performing scenario retrieval, "sensitive information decryption" will be used as the keyword for retrieval.
[0078] although Figure 1 Not shown, in one embodiment, the method 1000 may further include: notifying the tester of the first search result, for example, by sending an email to remind the tester of the test points that need to be paid attention to or possible defects.
[0079] refer to Figure 2 , Figure 2 A schematic diagram of the structure of a defect retrieval system 2000 for software development testing according to an embodiment of the present application is shown.
[0080] like Figure 2 As shown, the defect retrieval system 2000 includes a retrieval module 210, which is configured to: receive keywords related to defects; analyze the keywords to obtain synonyms and associated scenarios of the keywords; and perform combined retrieval and / or scenario retrieval in existing defects based on the keywords, the synonyms of the keywords and the associated scenarios.
[0081] In the context of this application, "software development testing" includes a set of activities and strategies designed to discover and fix defects in the software, verify that the software meets the specified requirements, and ensure that the final delivery of the software meets the user's expectations.
[0082] In one or more embodiments, software development testing may include one or more of the following aspects: (1) Test planning: developing a detailed test plan, including test objectives, scope, methods, resources, schedule, and risk assessment; (2) Requirements analysis: understanding and analyzing software requirements to ensure that the test covers all functional and non-functional requirements; (3) Test design: designing test cases and test scenarios to verify various aspects of the software; (4) Unit testing: testing the smallest testable part of the software, usually completed by developers; (5) Integration testing: testing the interfaces between modules to ensure that they can work together; (6) System testing: testing the complete software system to verify that it meets the requirements specifications; (7) Performance testing: evaluating the software's response time, throughput, stability, and scalability; (8) Security testing: ensuring that the software can resist external threats and attacks; (9) Usability testing: verifying whether the software's user interface and user experience are intuitive and easy to use; (10) Compatibility testing: ensuring that the software can work properly in different browsers, operating systems, hardware, and network environments; (11) Regression testing: verifying that the software can work properly in different browsers, operating systems, hardware, and network environments; (12) Testing: Testing after software changes to ensure that the new code does not break existing functions; (12) Automated testing: Use automated testing tools to improve test efficiency and coverage; (13) Continuous integration (CI): Integrate automated testing into the CI process to ensure that each code submission is tested; (14) Test-driven development (TDD): A development practice that writes test cases before writing functional code; (15) Agile testing: A testing method combined with an agile development process that emphasizes rapid feedback and continuous improvement; (16) Defect tracking and management: Use a defect tracking system to record, track, and manage discovered defects; (17) Test reporting: Write a test report that summarizes test results and discovered problems; (18) Test end conditions: Determine the conditions for the end of testing, such as defect rate, test coverage, or time limit; (19) User acceptance testing (UAT): Users participate in testing to ensure that the software meets business requirements and user expectations; (20) Shift testing left and right: Move testing activities forward to the early stages of the development cycle (shift left) and continue monitoring after the software is released (shift right). Software development testing is an ongoing process involving multiple stages and roles. An effective testing strategy can help the team detect problems early, reduce risks, and improve software quality and user satisfaction. As software development methods continue to evolve, testing practices are also constantly evolving and improving to adapt to new technologies and requirements.
[0083] In the context of this application, "defect retrieval" refers to defect retrieval in stock defects (ie, existing defect records), that is, searching for specific defects or defect patterns in a recorded defect library or defect tracking system.
[0084] The embodiment of the present application proposes a defect retrieval system 2000 for software development testing, which fully considers the defect keyword combination and the scenario and related scenarios to which the defect belongs, so that relevant defects can be accurately found in a large number of existing defects, and relevant searches can be performed for similar scenarios, effectively avoiding the omission of test points in software development testing and the outflow of production defects.
[0085] In one or more embodiments, the search module 210 is responsible for performing a single search, multiple searches, keyword Cartesian combination search, upward search, type search, etc. on the user input keyword, and returns the search results. In addition, the search module 210 can also display different returned results according to different search sources.
[0086] In addition to the retrieval module 210, Figure 2 As shown, the defect retrieval system 2000 for software development testing may also include: a data construction module 220, which is responsible for automatically scanning different system interface specifications and constructing a synonym data set and a scenario data set.
[0087] In one embodiment, Figure 2 The defect retrieval system 2000 for software development testing shown may also include: a prevention module 230, which is responsible for scanning the test cases in the testing process and reminding the testers of the test points that need to be paid attention to or the possible defects.
[0088] In one embodiment, the search module 210 is configured to: receive a user input field, the field including one or more keywords. For example, the user inputs a field "bank card number decryption", the field including two keywords "bank card number" and "card number decryption".
[0089] In addition to receiving user input fields, in one embodiment, the retrieval module 210 may also be configured to receive keywords from the prevention module 230 , which may be extracted by the prevention module 230 by scanning the test cases in the testing process.
[0090] In one embodiment, the retrieval module 210 is configured to determine, based on the received keyword, synonyms and associated scenarios of the keyword from the synonym data set and scenario data set pre-constructed by the data construction module 220 .
[0091] Here, synonyms of keywords refer to words that have similar usage scenarios and express the same or similar meanings. In information retrieval, content analysis, search engine optimization (SEO), or any scenario that requires keyword matching, the use of synonyms can help capture a wider range of relevant information, such as "bank card number" and "card number" are synonyms. When performing defect retrieval, considering the use of synonyms of keywords can improve the coverage and accuracy of the search.
[0092] The associated scenario includes the scenario to which the defect belongs and related scenarios. For example, the keyword "card number decryption" belongs to the "sensitive information decryption" scenario. Here, the "sensitive information decryption" scenario can be one of multiple predetermined scenarios.
[0093] In one embodiment, the search module 210 is configured to: perform keyword search and / or keyword combination search in the stock defects based on the keywords and synonyms of the keywords; and perform scenario search in the stock defects based on the associated scenarios.
[0094] In one embodiment, the retrieval module 210 is configured to use different retrieval methods according to different retrieval sources. For example, when receiving the keyword from the prevention module 230, the retrieval module 210 is configured to perform a scene search in the existing defects to obtain a first retrieval result, so that the prevention module 230 can notify relevant personnel of the first retrieval result.
[0095] Figure 3 FIG. 2 shows a workflow diagram of the retrieval module 210 according to an embodiment of the present application. Figure 3 As shown, after the user inputs a keyword, the search module starts to perform keyword analysis. After obtaining the synonym analysis results, it is determined whether to perform a keyword combination search and whether to perform a scene search. For example, after performing a synonym analysis on a keyword, if no synonyms of the keyword are found in the synonym data set pre-constructed by the data construction module 220, a combination search will not be performed. For another example, if the scene to which the keyword belongs or the related scene is not found in the scene data set pre-constructed by the data construction module 220, a scene search will not be performed. Of course, the above examples are for reference only and can be changed accordingly according to actual applications.
[0096] Continue to refer Figure 3 In one embodiment, when it is determined to perform a combined search, a Cartesian combined search of keywords (and their synonyms) may be performed. In one embodiment, when it is determined not to perform a combined search, only keywords are used for search. After the keyword search results are obtained, a return display is performed. In one embodiment, when it is determined to perform a scene search, a scene search is performed based on the associated scenes of the keyword, and a return display is performed after the scene search results are obtained.
[0097] In one embodiment, the data construction module 220 is configured to pre-construct a synonym data set and a scenario data set by scanning interface specifications of different systems, and the synonym data set and the scenario data set are pre-constructed in a memory or a cache.
[0098] Figure 4FIG. 2 shows a workflow diagram of the data construction module 220 according to an embodiment of the present application. Figure 4 As shown, in one embodiment, the data construction module 220 is configured to: scan the interface specification; segment all interface fields (keywords are stored accordingly, such as in redis); cyclically compare the ambiguity distance L between each field; and when the ambiguity distance L between the first field N and the second field M is less than or equal to 1 / 2, the first field N and the second field M are taken as candidate synonym data to enter the queue for review. If the ambiguity distance L between the first field N and the second field M is greater than 1 / 2, then continue to compare the ambiguity distance L between other fields.
[0099] Redis (Remote Dictionary Server) is an open source, high-performance key-value database. It is known for its excellent performance, reliability, and flexibility, and is widely used in a variety of scenarios. For example, Redis can be used as a memory cache to store frequently accessed data and reduce the access pressure on the main database.
[0100] In one embodiment, the ambiguity distance L is determined according to the following formula:
[0101] in,
[0102] Where D represents the distance difference between the corresponding keywords in the two fields, i and j represent the order of the corresponding keywords in their respective fields, and n and m represent the total number of keywords contained in the first field N and the second field M. If the keyword is only in the first field N but not in the second field M, j is 0.
[0103] The smaller the ambiguity distance is, the closer the meaning of the scene in which the field is located is. When the two fields are completely different, L has the maximum value L max =(n+1) / 2, since n is an integer not less than 1, so L max The minimum is 1. When the ambiguous distance L is less than or equal to 1 / 2, the system considers the first field N and the second field M to be synonymous. After review, N and M can be included in the synonym set. It should be noted that 1 / 2 is only an example of the preset threshold. The preset threshold is adjustable. The smaller the threshold, the higher the accuracy.
[0104] For example, when the first field N is "card number" and the second field M is "bank card number", the first field N contains only one keyword, namely "card number", so n = 1; the second field contains two keywords "bank" and "card number", so m = 2. The ambiguity distance L between the two fields is 0, which can be regarded as synonymous and pending review. For another example, when the first field N is "debit card number" and the second field M is "credit card number", the first field N contains only two keywords, namely "debit card" and "card number", so n = 2; the second field contains two keywords "credit card" and "card number", so m = 2. The ambiguity distance L between the two fields is 1 / 2, which can be regarded as synonymous and pending review. For another example, when the first field N is "debit card number" and the second field M is "debit card issuing bank number", the first field N contains two keywords, namely "debit card" and "card number", so n = 2; the second field contains three keywords "debit card", "issuing card" and "bank number", so m = 3. The ambiguous distance L between the two fields is 7 / 6, which is greater than a preset threshold (eg, 1 / 2), so the two fields are not synonymous.
[0105] Figure 5 FIG. 2 shows a flowchart of the prevention module 230 according to an embodiment of the present application. Figure 5 As shown, the prevention module 230 is configured to: scan the test cases and extract keywords (words) therefrom, then call the retrieval module 210 to perform scenario retrieval, and finally prompt the test scenarios that need to be considered by email after obtaining the retrieval results.
[0106] Figure 6 The schematic diagram of the search results obtained by the defect search system 2000 using an embodiment of the present application is shown. Assuming that the user inputs the field "bank card number decryption", through keyword analysis (including synonym analysis), it can be known that "bank card number" and "card number" are synonyms, and "card number decryption" belongs to the "sensitive information decryption" scenario (for example, pre-determined by the data construction module 220). Therefore, based on the keyword and the synonyms of the keyword, a combined search can be performed in the stock defects, and finally the following results can be obtained: Figure 6 Multiple defect retrieval results are shown.
[0107] from Figure 6 It can also be seen from the search results that if "bank card number decryption" is used as a keyword for searching, only one defect can be retrieved, that is, the defect numbered 169570. This may lead to the omission of test points and the flow of production defects.
[0108] In addition, since "card number decryption" belongs to the "sensitive information decryption" scenario, further scenario retrieval can be performed based on this associated scenario, thereby reminding testers of the test points that need to be paid attention to. This is more flexible and efficient than existing retrieval solutions, and is more conducive to defect prevention and left shift.
[0109] In summary, the defect retrieval solution for software development testing in the embodiment of the present application has at least the following advantages compared with the prior art:
[0110] 1. Significantly improved accuracy
[0111] The defect retrieval scheme for software development testing in the embodiment of the present application is based on the analysis, matching and combination of user keywords, which can achieve a more accurate retrieval effect, avoid the situation where precise search cannot find any results and there are too many fuzzy query results, and significantly improve the accuracy of the retrieval results.
[0112] (II) Defect Value
[0113] Defects often belong to specific scenarios. When the keyword search fails, we can analyze the scenario corresponding to the keyword search and retrieve the defects that have occurred in the relevant scenario, which can effectively prevent similar defects from happening again.
[0114] (III) High retrieval efficiency
[0115] The defect retrieval solution for software development testing in the embodiment of the present application includes a data construction module, and the scenario data set is pre-constructed in the memory and cache, which can be used repeatedly to avoid multiple database full table matches and make retrieval faster.
[0116] According to another aspect of the present application, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed by a processor, the processor executes the defect retrieval method 1000 for software development testing as described above. The computer-readable medium referred to in the present application includes various types of computer storage media, which can be any available medium that can be accessed by a general or special computer. For example, the computer-readable medium can include RAM, ROM, EPROM, EEPROM, etc. 2 PROM, register, hard disk, removable disk, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or can be used to carry or store the desired program code unit in the form of instruction or data structure and can be accessed by general or special computer, or general or special processor. As used herein, the disk usually copies data magnetically, while the dish uses laser to optically copy data. The above combination should also be included in the protection scope of computer-readable medium. Exemplary storage medium is coupled to the processor so that the processor can read and write information from / to the storage medium. In an alternative solution, the storage medium can be integrated into the processor. The processor and the storage medium can reside in the ASIC. The ASIC can reside in the user terminal. In an alternative solution, the processor and the storage medium can reside in the user terminal as discrete components.
[0117] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Those skilled in the art can think of other feasible changes or substitutions based on the technical scope disclosed in the present application, and such changes or substitutions are all included in the protection scope of the present application. In the absence of conflict, the implementation modes of the present application and the features in the implementation modes can also be combined with each other. The protection scope of the present application shall be subject to the description of the claims.
Claims
1. A defect retrieval method for software development testing, characterized in that: The method comprises: receiving keywords related to the defect; Analyzing the keyword to obtain synonyms and related scenarios of the keyword; and Based on the keywords, synonyms of the keywords and the associated scenarios, a combined search and / or scenario search is performed in the existing defects.
2. The method of claim 1, wherein: Keywords received that are related to the defect include: A user input field is received, the field including one or more keywords.
3. The method of claim 1, wherein: Keywords received that are related to the defect include: A keyword is received from a prevention module, wherein the prevention module extracts the keyword by scanning a test case in a testing process.
4. The method of claim 1, wherein: Analyzing the keyword to obtain synonyms and associated scenarios of the keyword includes: Using the data construction module to pre-build a synonym data set and a scenario data set by scanning interface specifications of different systems; and According to the received keyword, synonyms and associated scenarios of the keyword are determined from pre-built synonym data sets and scenario data sets.
5. The method according to claim 1 or 4, wherein: The associated scenario includes the scenario to which the defect belongs and the scenario related to the defect.
6. The method of claim 1, wherein: Based on the keyword, the synonym of the keyword and the associated scenario, performing a combined search and / or scenario search in the existing defects includes: Based on the keyword and the synonyms of the keyword, perform a keyword search and / or a keyword combination search in the existing defects; and Based on the associated scenario, a scenario search is performed in the existing defects.
7. The method of claim 3, wherein: Based on the keyword, the synonym of the keyword and the associated scenario, performing a combined search and / or scenario search in the existing defects includes: Different search methods are used depending on the search source.
8. The method of claim 7, wherein: When the keyword is received from the prevention module, a scenario search is performed in the stock defects to obtain a first search result.
9. The method of claim 8, further comprising: The tester is notified of the first search result.
10. The method of claim 4, wherein: The synonym data set and the scenario data set are pre-built in the memory or cache.
11. The method of claim 4, wherein: The data building module is used to pre-build synonym data sets and scenario data sets by scanning the interface specifications of different systems, including: Scan interface specifications using data building blocks; Using the data construction module to segment all interface fields; Utilizing the data construction module to cyclically compare the ambiguity distance L between each field; and When the ambiguity distance between the first field and the second field is less than a preset threshold, the first field and the second field are used as candidate synonym data.
12. The method of claim 11, wherein: The preset threshold is adjustable and is less than or equal to 1 / 2.
13. The method of claim 11, wherein: The ambiguity distance L is determined according to the following formula: in, And wherein D represents the distance difference between the corresponding keywords of the two fields, i and j are the order of the corresponding keywords in their respective fields, and n and m are the total number of keywords contained in the first field and the second field.
14. The method of claim 13, wherein: When the keyword only appears in the first field but not in the second field, j takes the value of 0.
15. A defect retrieval system for software development testing, characterized in that: The system comprises a retrieval module, wherein the retrieval module is configured to: receiving keywords related to the defect; Analyzing the keyword to obtain synonyms and related scenarios of the keyword; and Based on the keywords, synonyms of the keywords and the associated scenarios, a combined search and / or scenario search is performed in the existing defects.
16. The system of claim 15, wherein: The retrieval module is configured to: A user input field is received, the field including one or more keywords.
17. The system of claim 15, further comprising: The prevention module is used to scan the test cases in the testing process to extract keywords, wherein the retrieval module is configured to receive the keywords from the prevention module.
18. The system of claim 15, further comprising: A data construction module, used to pre-construct synonym data sets and scenario data sets by scanning interface specifications of different systems; The retrieval module is configured to determine, based on the received keyword, the synonyms and associated scenarios of the keyword from the synonym data set and the scenario data set pre-constructed by the data construction module.
19. The system of claim 15 or 18, wherein: The associated scenario includes the scenario to which the defect belongs and the scenario related to the defect.
20. The system of claim 15, wherein: The retrieval module is configured to: Based on the keyword and the synonyms of the keyword, perform a keyword search and / or a keyword combination search in the existing defects; and Based on the associated scenario, a scenario search is performed in the existing defects.
21. The system of claim 17, wherein: The retrieval module is configured to adopt different retrieval methods according to different retrieval sources.
22. The system of claim 21, wherein: The retrieval module is configured to, upon receiving the keyword from the prevention module, perform a scenario search in the stock defects to obtain a first retrieval result.
23. The system of claim 22, wherein: The prevention module is configured to: The tester is notified of the first search result.
24. The system of claim 18, wherein: The synonym data set and the scenario data set are pre-built in the memory or cache.
25. The system of claim 18, wherein: The data construction module is configured to: Scan interface specification; Segment all interface fields; Circularly compare the ambiguity distance L between each field; and When the ambiguity distance between the first field and the second field is less than a preset threshold, the first field and the second field are used as candidate synonym data.
26. The system of claim 25, wherein: The preset threshold is adjustable and is less than or equal to 1 / 2.
27. The system of claim 25, wherein: The ambiguity distance L is determined according to the following formula: in, And wherein D represents the distance difference between the corresponding keywords of the two fields, i and j are the order of the corresponding keywords in their respective fields, and n and m are the total number of keywords contained in the first field and the second field.
28. The system of claim 27, wherein: When the keyword only appears in the first field but not in the second field, j takes the value of 0.
29. A computer-readable storage medium having instructions stored therein, characterized in that: When the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 14.
30. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.