CN107341110B - Tool for modifying and affecting range of software test positioning patch and implementation method - Google Patents

Tool for modifying and affecting range of software test positioning patch and implementation method Download PDF

Info

Publication number
CN107341110B
CN107341110B CN201710561299.1A CN201710561299A CN107341110B CN 107341110 B CN107341110 B CN 107341110B CN 201710561299 A CN201710561299 A CN 201710561299A CN 107341110 B CN107341110 B CN 107341110B
Authority
CN
China
Prior art keywords
metadata
patch
file
tool
component
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
CN201710561299.1A
Other languages
Chinese (zh)
Other versions
CN107341110A (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.)
Inspur Software Group Co Ltd
Original Assignee
Inspur Software Group 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 Inspur Software Group Co Ltd filed Critical Inspur Software Group Co Ltd
Priority to CN201710561299.1A priority Critical patent/CN107341110B/en
Publication of CN107341110A publication Critical patent/CN107341110A/en
Application granted granted Critical
Publication of CN107341110B publication Critical patent/CN107341110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

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

Abstract

The invention discloses a tool for modifying and influencing a software test positioning patch and an implementation method, belonging to the field of software test. The technical scheme is as follows: a tool for modifying and affecting ranges of software testing and positioning patches is characterized by comprising a source code change analysis component, a metadata change analysis component, an SQL normative check component and an intelligent influence function menu summarizing component. The invention also discloses a method for modifying the software test positioning patch and realizing the influence range.

Description

Tool for modifying and affecting range of software test positioning patch and implementation method
Technical Field
The invention relates to the field of software testing, in particular to a tool for modifying and influencing ranges of a software testing positioning patch and an implementation method.
Background
In various application processes of a computer, problems or BUGs, which may also be referred to as BUGs, of various operating systems, application software, and the like are often found, and these BUGs may cause interference when a user uses the operating systems or the software, or cause a reduction in the security performance of the software, so that these BUGs may be fixed by writing some programming languages that can be inserted into a source program, which are referred to as patches.
At present, aiming at patches submitted by developers, the testers can only know test information according to patch modification instructions, other problems cannot be solved when the developers modify the problems, and the situation that the specific content of influence cannot be determined only by the patch information leads to various exploratory tests of the testers, or the content which is not mentioned in the patch containing instructions is missed to cause program error reporting, or the whole tests consume a large amount of time, labor and cost.
Patent document CN102156650B discloses a method and device for implementing automatic patch analysis; wherein the method comprises the following steps: obtaining a patch package; unpacking the patch package, and extracting description information and detection information of the patch; and inputting the description information and the detection information of the patch into a system vulnerability database. But this solution cannot locate patch modifications and scope of influence.
Disclosure of Invention
The technical task of the invention is to provide a tool for modifying and influencing the range of a software test positioning patch and a realization method thereof aiming at the defects, so as to solve the problems that a tester can only perform a required test according to patch information, and the partial test may miss the content which is not mentioned in the description of the patch, thereby causing the error of the program or consuming a large amount of time, labor and cost for the whole test.
The technical scheme adopted by the invention for solving the technical problems is as follows: a tool for modifying and influencing a software test positioning patch comprises a source code change analysis component, a metadata change analysis component, an S QL normative check component and an intelligent influence function menu summarizing component;
the source code change analysis component is used for receiving a patch file transmitted by a user, copying the patch to a specified directory, decompressing, extracting all the request files with dlls as suffixes under a decompression path, and starting to preprocess all the request files;
the metadata change analysis component is used for acquiring a metadata information list contained in the patch by inquiring a product database, acquiring information of an ID, a number, a name, a path and a type aiming at each metadata to form a list and displaying the list on an interface;
the SQL standard checking component is used for capturing all files taking SQL as suffix in the patch files and verifying the grammatical normalization according to a plurality of rules and the regular matching technology;
and the intelligent summary assembly for the affected function menu is used for writing dll, metadata and key information of the function menu list into an independent file, and displaying all menu lists affected by the patch in the summary assembly by reading the file.
A method for realizing software test positioning patch modification and influence range comprises the following steps:
s1, transmitting the patch to an application server, automatically acquiring files of which all suffixes below a decompression folder are dll through a source code change analysis component, and displaying the tree structures of the dll, the class and the method of the new addition, modification and deletion through a reflection mechanism;
s2, automatically calling ILSpy decompilation dll by clicking a node on the tree structure, and automatically displaying a source code difference comparison interface and a source code full-text comparison interface by means of a comparison tool BeyondCompare;
s3, automatically acquiring all metadata files under the decompression folder through the metadata change analysis component, and acquiring a list structure of the contained metadata information through querying a database;
s4, clicking any row of the list, acquiring a function menu corresponding to the metadata by inquiring a database mode, checking the dependency relationship of the metadata, and automatically displaying the content difference of the metadata by means of a comparison tool BeyondCompare;
s5, cutting into an SQL normative checking component, inputting a folder path to be checked, clicking for checking, performing various normative checks according to preset rules in a program, displaying a checking result on a program interface, and realizing advanced prediction of grammatical errors;
and S6, combining the execution results of the steps S1-S5, and automatically forming all function menu lists influenced by the patch by the intelligent influence function menu summarizing component.
Preferably, step S2 performs decompilation processing on dll by automatically starting the decompiler ILSpy by means of UIAutomation automation technology, and finally shows the source code difference comparison information and full-text comparison information corresponding to the class.
Preferably, the metadata information list of step S3 includes an ID, a number, a name, a path, and a type.
Preferably, step S5 captures all files suffixed with sql in the patch file, verifies the syntax normalization in accordance with various rules in conjunction with the canonical matching technique, and displays whether the statement checks pass:
firstly, if the check is passed, displaying a sentence passed by the check;
and secondly, if the check fails, displaying wrong sql statement information.
Compared with the prior art, the tool for modifying and affecting the range of the software test positioning patch and the implementation method thereof have the following beneficial effects:
1. according to the method, the source code change information influenced by the dll file and the content change information influenced by the metadata file are analyzed through processing the patch containing file, the dependency relationship of metadata is clearly shown, the SQL standard inspection is realized by automatically carrying out the normative inspection of statements according to various grammar rules, all function menu lists influenced by the patch are summarized, the targeted test of the patch is realized, the missing test and the full test are prevented, and the reliability of the test is improved;
2. according to the method, a dll file contained in an intelligent retrieval patch and a dll with the same name on a server are subjected to decompiling processing, code differences are automatically analyzed by combining a comparison tool, an affected function menu list is obtained by combining the dll name and product download item information, meanwhile, the affected function menu list is obtained by inquiring product database information by obtaining a metadata information list in the patch, the dependency relationship among metadata is checked, the content differences of new and old metadata are displayed, all files of SQL postfixes in the patch file are captured to be subjected to SQL syntax normative check, all function menu lists affected by the patch are intelligently displayed after all results are analyzed, and a user determines the test range of the patch according to all function menu lists;
3. the invention can enable the testers who do not know the codes to know the test points to be tested, refine the function menu, enable the testers who know the codes to deeply know the source code modification content, and is beneficial to more accurate test; the sql grammar error is identified before patching to avoid the error which can be discovered during updating, the quality of company products is greatly improved, manpower and material resources for regression testing after problem defect repair are greatly saved, and compared with the conventional familiar exploratory testing for patches, the workload is reduced to some extent, and the benefit is improved to some extent.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for implementing software test location patch modification and impact area.
Detailed Description
The invention is further described with reference to the following figures and specific examples.
Example 1
The invention relates to a tool for modifying and influencing a software test positioning patch, which comprises a source code change analysis component, a metadata change analysis component, an SQL normative inspection component and an intelligent collection component for influencing a function menu;
the source code change analysis component is used for receiving a patch file transmitted by a user, copying the patch to a specified directory, decompressing, extracting all the request files with dlls as suffixes under a decompression path, and starting to preprocess all the request files;
the metadata change analysis component is used for acquiring a metadata information list contained in the patch by inquiring a product database, acquiring information of an ID, a number, a name, a path and a type aiming at each metadata to form a list and displaying the list on an interface;
the SQL standard checking component is used for capturing all files taking SQL as suffix in the patch files and verifying the grammatical normalization according to a plurality of rules and the regular matching technology;
and the intelligent summary assembly for the affected function menu is used for writing dll, metadata and key information of the function menu list into an independent file, and displaying all menu lists affected by the patch in the summary assembly by reading the file.
Example 2
As shown in fig. 1, the implementation method of the tool for testing and positioning patch modification and influence range by using software in embodiment 1 includes the following steps:
s1, transmitting the patch to an application server, automatically acquiring files of which all suffixes below a decompression folder are dll through a source code change analysis component, and displaying the tree structures of the dll, the class and the method of the new addition, modification and deletion through a reflection mechanism;
s2, automatically calling ILSpy decompilation dll by clicking a node on the tree structure by means of UIAutomation automation technology, and automatically displaying a source code difference comparison interface and a source code full-text comparison interface by means of a comparison tool BeyondCompare;
s3, automatically acquiring all metadata files under the decompression folder through the metadata change analysis component, and acquiring a list structure of the contained metadata information through querying a database; the metadata information list includes an ID, a number, a name, a path, and a type.
S4, clicking any row of the list, acquiring a function menu corresponding to the metadata by inquiring a database mode, checking the dependency relationship of the metadata, and automatically displaying the content difference of the metadata by means of a comparison tool BeyondCompare;
s5, cutting into the SQL normative checking component, inputting a folder path to be checked, clicking for checking, performing various normative checks according to preset rules in a program, and displaying a checking result on a program interface;
firstly, if the check is passed, displaying a sentence passed by the check;
and secondly, if the check fails, displaying wrong sql statement information.
And S6, combining the execution results of the steps S1-S5, and automatically forming all function menu lists influenced by the patch by the intelligent influence function menu summarizing component.
Example 3
The user first places the patch on the application server side and then starts the tool of embodiment 1.
(1) Firstly calling a first layer component: the source code change analysis component receives a patch file transmitted by a user, then a tool copies the patch to a specified directory and decompresses the patch, meanwhile, a request file with all suffixes being dll in a decompression path is extracted, and then all the request files are preprocessed: and the acquisition server-side homonymous dll is placed below the two folders, information such as classes, methods, attributes and the like in the dll assembly is acquired through a reflection mechanism, then the information of the classes, methods and attributes of the newly added, modified and deleted classes, methods and attributes is automatically analyzed, and meanwhile, a tree list of the change information is displayed. A user can click any node on the tree to obtain a function menu influenced by the dll, and simultaneously, a decompilation tool ILSPy is automatically started by means of the UIAutomation automation technology to decompilate the dll, so that source code difference comparison information and full text comparison information corresponding to the class are displayed finally.
(2) Calling a second layer component of the tool: a metadata change analysis component. Firstly, a product database is inquired to obtain a metadata information list contained in a patch containing metadata file, information such as ID, number, name, path, type and the like is obtained for each metadata to form a list to be displayed on an interface, and a user can click any row of metadata to obtain a function menu list corresponding to the metadata; clicking any row of metadata by a right button to check the dependency relationship between the metadata and other metadata, and further judging which other metadata are influenced by the metadata modification; a user can obtain the change of the new metadata content and the old metadata content by clicking any line, and the display form displays the content difference and similarity by means of a BeyondCompare tool.
(3) Calling a third-layer component of the tool: the SQL specification checks components. And capturing all files taking sql as a suffix in the patch file by the program, and verifying the grammatical normalization by combining a plurality of rules with a regular matching technology. Checking according to the rule, if the check passes, displaying that the check passes, and if the check does not pass, displaying the error sentence content.
(4) Calling a fourth layer component of the tool: influence function menu intelligence and gather the subassembly. Firstly, by executing the first two components, dll, metadata and key information of the function menu list are written into an individual file, and by reading the file, all menu lists influenced by the patch are displayed in a summarizing component.
The present invention can be easily implemented by those skilled in the art from the above detailed description. It should be understood, however, that the present invention is not limited to the three specific embodiments described above. On the basis of the disclosed embodiments, a person skilled in the art can combine different technical features at will, thereby implementing different technical solutions.
In addition to the technical features described in the specification, the technology is known to those skilled in the art.

Claims (5)

1. A tool for modifying and affecting a range of a software test positioning patch is characterized by comprising a source code change analysis component, a metadata change analysis component, an SQL normative check component and an intelligent collection component of an affecting function menu;
the source code change analysis component is used for receiving a patch file transmitted by a user, copying the patch file to a specified directory, decompressing, extracting all request files with dlls as suffixes under a decompression path, and starting to preprocess all the request files;
the metadata change analysis component is used for acquiring a metadata information list contained in the patch file by inquiring a product database, and acquiring information of an ID, a number, a name, a path and a type aiming at each metadata to form a list to be displayed on the interface;
the SQL normalization checking component is used for capturing all files taking SQL as a suffix in the patch files and verifying the syntax normalization by combining a regular matching technology according to a plurality of rules;
the intelligent summary assembly of the affected function menu is used for writing the request file with the suffix dll, the metadata and the key information of the function menu list into an independent file, and displaying all the menu lists affected by the patch file in the summary assembly by reading the file.
2. A method for realizing software test positioning patch modification and influence range is characterized by comprising the following steps:
s1, transmitting the patch file to an application server, automatically acquiring all request files with dlls as suffixes under the decompression folder through a source code change analysis component, and displaying the tree structures of the request files, classes and methods with dlls as newly added, modified and deleted suffixes through a reflection mechanism;
s2, automatically calling a decompilation tool ILSPy decompilation suffix into a dll request file by clicking a node on the tree structure, and automatically displaying a source code difference comparison interface and a source code full-text comparison interface by means of a comparison tool BeyondCompare;
s3, automatically acquiring all metadata files under the decompression folder through the metadata change analysis component, and acquiring a list structure of the contained metadata information through querying a database;
s4, clicking any row of the list, acquiring a function menu corresponding to the metadata by inquiring a database mode, checking the dependency relationship of the metadata, and automatically displaying the content difference of the metadata by means of a comparison tool BeyondCompare;
s5, cutting into the SQL normative checking component, inputting a folder path to be checked, clicking to check, performing various normative checks according to preset rules in a program, and displaying a checking result on a program interface;
and S6, combining the execution results of the steps S1-S5, and automatically forming all function menu lists influenced by the patch by the intelligent influence function menu summarizing component.
3. The method according to claim 2, wherein step S2 is implemented by automatically starting a decompilation tool ILSpy by means of UIAutomation automation technology to decompilate the request file suffixed to dll, so as to finally display the source code difference comparison information and full-text comparison information corresponding to the class.
4. The method as claimed in claim 2, wherein the metadata information list of step S3 includes ID, number, name, path and type.
5. The method as claimed in claim 2, wherein step S5 captures all files with sql as suffix in the patch file, verifies the syntax normalization according to a plurality of rules and a regular matching technique, and displays whether the statement check passes:
firstly, if the check is passed, displaying a sentence passed by the check;
and secondly, if the check fails, displaying wrong sql statement information.
CN201710561299.1A 2017-07-11 2017-07-11 Tool for modifying and affecting range of software test positioning patch and implementation method Active CN107341110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710561299.1A CN107341110B (en) 2017-07-11 2017-07-11 Tool for modifying and affecting range of software test positioning patch and implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710561299.1A CN107341110B (en) 2017-07-11 2017-07-11 Tool for modifying and affecting range of software test positioning patch and implementation method

Publications (2)

Publication Number Publication Date
CN107341110A CN107341110A (en) 2017-11-10
CN107341110B true CN107341110B (en) 2020-01-07

Family

ID=60219123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710561299.1A Active CN107341110B (en) 2017-07-11 2017-07-11 Tool for modifying and affecting range of software test positioning patch and implementation method

Country Status (1)

Country Link
CN (1) CN107341110B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442527B (en) * 2019-08-16 2023-07-18 扬州大学 Automatic repairing method for bug report
CN111445115B (en) * 2020-03-20 2023-10-17 Oppo(重庆)智能科技有限公司 Test item verification method, device, electronic equipment and computer readable storage medium
CN116244168A (en) * 2021-12-08 2023-06-09 华为云计算技术有限公司 Unit test generation method and device and related equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789027A (en) * 2010-03-15 2010-07-28 江苏大学 Metadata management method based on DBMS and metadata server
EP2275929A1 (en) * 2004-05-11 2011-01-19 Microsoft Corporation Efficient software patching
CN102073640A (en) * 2009-11-19 2011-05-25 阿里巴巴集团控股有限公司 Method, system and server for testing structured query language (SQL) statements
CN103744709A (en) * 2014-01-23 2014-04-23 华为技术有限公司 Patch loading method and device
CN105988798A (en) * 2015-02-12 2016-10-05 中兴通讯股份有限公司 Patch processing method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2275929A1 (en) * 2004-05-11 2011-01-19 Microsoft Corporation Efficient software patching
CN102073640A (en) * 2009-11-19 2011-05-25 阿里巴巴集团控股有限公司 Method, system and server for testing structured query language (SQL) statements
CN101789027A (en) * 2010-03-15 2010-07-28 江苏大学 Metadata management method based on DBMS and metadata server
CN103744709A (en) * 2014-01-23 2014-04-23 华为技术有限公司 Patch loading method and device
CN105988798A (en) * 2015-02-12 2016-10-05 中兴通讯股份有限公司 Patch processing method and apparatus

Also Published As

Publication number Publication date
CN107341110A (en) 2017-11-10

Similar Documents

Publication Publication Date Title
Wei et al. Pivot: learning api-device correlations to facilitate android compatibility issue detection
US20040044996A1 (en) System and method for verifying installed software
CN108491327B (en) Android application dynamic Receiver component local denial of service vulnerability detection method
CN107341110B (en) Tool for modifying and affecting range of software test positioning patch and implementation method
CN111858242A (en) System log anomaly detection method and device, electronic equipment and storage medium
Zhong et al. Boosting complete-code tool for partial program
CN107391368B (en) Method for analyzing consistency of source code and target code in airborne software
CN106326108A (en) New application testing method and device
KR101582601B1 (en) Method for detecting malignant code of android by activity string analysis
CN115033894B (en) Software component supply chain safety detection method and device based on knowledge graph
CN105068921A (en) App comparative analysis based Android application store credibility evaluation method
CN111736865B (en) Database upgrading method and system
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
CN105183658A (en) Software code testing method and device
CN112540924A (en) Interface automation test method, device, equipment and storage medium
EP3428828A1 (en) System and method for locating and correcting vulnerabilites in a target computer system
CN110704311B (en) Application program testing method and device, electronic equipment and readable storage medium
KR101579175B1 (en) Apparatus and method for detection of repackaging
US10599424B2 (en) Committed program-code management
Lavoie et al. A case study of TTCN-3 test scripts clone analysis in an industrial telecommunication setting
CN114327668A (en) Intelligent parameter configuration method and device based on association mining
CN113031995B (en) Rule updating method and device, storage medium and electronic equipment
TWI735511B (en) Code submission method and equipment
CN114157439A (en) Vulnerability scanning method, computing device and recording medium
CN111506339A (en) Method and device for processing change information of Software Development Kit (SDK)

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