CN113641573B - Program analysis software automatic test method and system based on revision log - Google Patents

Program analysis software automatic test method and system based on revision log Download PDF

Info

Publication number
CN113641573B
CN113641573B CN202110844566.2A CN202110844566A CN113641573B CN 113641573 B CN113641573 B CN 113641573B CN 202110844566 A CN202110844566 A CN 202110844566A CN 113641573 B CN113641573 B CN 113641573B
Authority
CN
China
Prior art keywords
analysis result
version
minimum code
code rule
rule unit
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
CN202110844566.2A
Other languages
Chinese (zh)
Other versions
CN113641573A (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.)
Anhui Zhongke Guochuanggao Trusted Software Co ltd
Original Assignee
Anhui Zhongke Guochuanggao Trusted Software 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 Anhui Zhongke Guochuanggao Trusted Software Co ltd filed Critical Anhui Zhongke Guochuanggao Trusted Software Co ltd
Priority to CN202110844566.2A priority Critical patent/CN113641573B/en
Publication of CN113641573A publication Critical patent/CN113641573A/en
Application granted granted Critical
Publication of CN113641573B publication Critical patent/CN113641573B/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/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • 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/368Test management for test version control, e.g. updating test cases to a new software version
    • 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/3692Test management for test results analysis

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)
  • Stored Programmes (AREA)

Abstract

The invention discloses a program analysis software automatic test method and a system based on a revision log, wherein the method comprises the following steps: acquiring a minimum code rule unit in a software code; acquiring a first version and a second version of a software code, and acquiring a specific change type of a minimum code rule unit which is changed in the second version compared with the first version; executing a first version and a second version of the program analysis software code to obtain a first analysis result and a second analysis result respectively; judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit or not, and judging whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type or not; the minimum code rule unit with the judging result of no is used as the key investigation content, so that the rationality, the high efficiency, the accuracy and the degree of automation of the key and non-key division of software test investigation are improved, and the test efficiency is improved.

Description

Program analysis software automatic test method and system based on revision log
Technical Field
The invention relates to the technical field of program testing, in particular to a program analysis software automatic testing method and system based on a revision log.
Background
Program analysis software consists of numerous program analysis rules, each of which is relatively independent, but there are also cases where the same support code is multiplexed. Each development cycle can repair or newly add a plurality of program analysis rules, reconstruct and perfect some supporting codes, and because of the characteristics of software, the influence of code modification is far greater than the range expected by developers, and therefore, if only the new or repaired rules are tested, the functional integrity and stability of the new version cannot be ensured. However, the number of rules of the program analysis software is usually huge, and if all the rules need to be tested one by one, the workload is huge, and many test works are ineffective.
With the continuous development and perfection of software engineering, more and more companies now adopt iterative and agile development modes to replace traditional waterfall development, which also causes the development period of software to become shorter and shorter, and the test work required to be done before the software is released is more and more frequent. And aiming at different links and different testing key points, the software is required to be tested in various aspects such as smoke test, regression test, system test, performance test and the like. Considering that the number of rules is increased along with iterative updating of the program analysis software version, the software functions are also increased, and the testing workload of all the testing links is also increased. Balancing test work, reducing invalid test and repeated test work of testers, and improving test efficiency becomes more and more important in the development cycle of whole program analysis software.
Program analysis software existing test protocols: manually collecting revision logs of new versions during testing in each development period through manual testing of testers and partial automatic testing tools, and finding out a list of rule changes from the revision logs to serve as a key check object of the test; other non-altering rules are used as non-focus screening objects. The rules of the key investigation are tested preferentially, and more detailed investigation is conducted through more software projects to conduct more comprehensive testing; for non-key checking rules, the rules still need to be checked through a part of software items, and whether the rules introduce new problems due to modification is verified. After all the major investigation rules and the non-major investigation rules are detected, all the testing work of the program analysis software for the rules is completed.
The existing test scheme has the disadvantage that the rule which is not changed and is not influenced by the code modification of the current development period cannot be effectively distinguished, so that a plurality of ineffective test works are increased. In addition, the existing test scheme cannot effectively identify which rules need to be subjected to major investigation and which rules do not need to be subjected to major investigation for the repaired and newly added rules. This results in a problem of enormous test workload and low test efficiency. In addition, the whole test scheme does not fully utilize an automatic test technology, so that the repeatability of test work cannot be reduced, and the test efficiency cannot be improved.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a program analysis software automatic test method and a system based on a revision log, which are used for effectively identifying which rules need to be checked with emphasis and which rules do not need to be checked with emphasis, reducing the test workload of testers, improving the test automation degree and the test efficiency,
In order to solve the above problems, the following solutions have been proposed:
The first aspect of the application discloses a program analysis software automatic test method based on a revision log, which comprises the following steps:
acquiring a minimum code rule unit in the program analysis software code;
Acquiring a first version and a second version of the program analysis software code, and acquiring a specific change type of a minimum code rule unit which is changed in comparison with the first version in the second version, wherein the second version is a version modified by the first version;
executing a first version and a second version of the program analysis software code based on a reference test set to respectively obtain a first analysis result and a second analysis result of each minimum code rule unit in each version;
Judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit or not, and judging whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type or not;
and when the judging result is negative, taking the corresponding minimum code rule unit as the key investigation content, and when the judging result is positive, taking the corresponding minimum code rule unit as the non-key investigation content.
As a further optimization of the above solution, for the non-focused review content, the method further includes: and if the corresponding minimum code rule unit belongs to the minimum code rule unit which is changed compared with the first version, taking the corresponding minimum code rule unit as the slight investigation content, otherwise, not carrying out investigation on the corresponding minimum code rule unit.
As a further optimization of the above-described scheme, the minimum code rule unit is obtained by dividing the program analysis software code in 1 rule as a basic unit.
As a further optimization of the above solution, the minimum code rule unit in the second version, which is changed compared with the first version, includes addition, modification and deletion of the minimum code rule unit, and the specific change type of the minimum code rule unit in the second version includes: repairing false alarm, repairing missing report, repairing performance, only reconstructing code and not affecting false alarm, missing report and performance.
As a further optimization of the above solution, the obtaining the first analysis result and the second analysis result of each minimum code rule unit in each version includes:
obtaining a first execution result and a second execution result obtained by executing the first version and the second version of the program analysis software code based on the benchmark test set;
acquiring alarm quantity parameters, alarm occurrence position parameters and execution time consumption of each minimum code rule unit in the execution result based on the first execution result and the second execution result;
the first analysis result and the second analysis result of each minimum code rule unit in each version are obtained based on the alarm number parameter and the execution time consumption of each minimum code rule unit.
As a further optimization of the above solution, each alarm occurrence position parameter includes a number of a minimum code rule unit where each alarm occurrence position is located.
As a further optimization of the above solution, determining whether the second analysis result meets the preset normal result range corresponding to the minimum code rule unit and whether the change of the second analysis result compared with the first analysis result meets the normal change range caused by the specific change type includes:
(1) Acquiring preset normal result range data of all the minimum code rule units in the second version;
(2) Judging whether a second analysis result of the minimum code rule unit is matched with the data in the range of the preset normal result, if so, entering the step (3), otherwise, entering the step (4);
(3) Step (6) is carried out on the minimum code rule unit which is not changed compared with the first version in the second version, step (4) is carried out on the minimum code rule unit which is changed compared with the first version in the second version, the specific change type of the minimum code rule unit which is changed and the change data of the second analysis result compared with the first analysis result are obtained, and if the change data does not match the preset normal change range data corresponding to the specific change type, step (5) is carried out, otherwise;
(4) Taking the minimum code rule unit as a key investigation content;
(5) Taking the minimum code rule unit as light investigation content;
(6) The minimum code rule unit is regarded as non-checking content.
As a further optimization of the above solution, the preset normal variation range data corresponding to the specific variation type includes:
If the specific change type is repair false alarm, the normal change range data is as follows: the number of alarms in the second analysis result is smaller than that of the first analysis result, the alarm information in the second analysis result is in the alarm information range of the first analysis result, and the analysis time consumption in the second analysis result is not obviously different from that of the first analysis result;
If the specific change type is repair report missing, the normal change range data is: the number of alarms in the second analysis result is more than that of the first analysis result, the alarm information in the second analysis result completely covers the alarm information of the first analysis result, and the analysis time consumption in the second analysis result has no obvious difference with the first analysis result;
If the specific change type is repair performance, the normal change range data is: the analysis time consumption in the second analysis result is less than that of the first analysis result, and the alarm information of the second analysis result is consistent with the first analysis result;
If the specific change type is only code reconstruction, the normal change range data is: the analysis time consumption in the second analysis result is not obviously different from that of the first analysis result, and the alarm information of the second analysis result is consistent with that of the first analysis result;
If the specific change type is a mixture of repair false alarm and repair missing alarm, the normal change range data is as follows: the second analysis result contains alarm information which is not contained in the first analysis result, and the first analysis result contains alarm information which is not contained in the second analysis result;
If the specific change type is a mixture of multiple change types, the normal change range data is as follows: and combining the normal variation range data corresponding to each variation type.
As a further optimization of the above solution, the program analysis software automated test method based on the revision log further includes:
based on the minimum code rule unit in the major investigation content, the minor investigation content and the non-investigation content, test report data is generated, wherein the test report comprises data in the form of text and diagrams.
The second aspect of the application discloses a program analysis software automatic test system based on revision logs, comprising:
The minimum code rule unit is used for acquiring the minimum code rule unit in the program analysis software code;
The new version revision log obtaining unit is used for obtaining a first version and a second version of the program analysis software code, and obtaining a specific change type of a minimum code rule unit which is changed in comparison with the first version in the second version, wherein the second version is a version modified by the first version;
the analysis result acquisition unit is used for executing the first version and the second version of the program analysis software code based on the reference test set to respectively acquire a first analysis result and a second analysis result of each minimum code rule unit in each version;
The analysis result analysis unit is used for judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit and whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type;
And the investigation content classification unit is used for taking the corresponding minimum code rule unit as the key investigation content when the analysis result analysis unit outputs no, and taking the corresponding minimum code rule unit as the non-key investigation content when the judgment result is yes.
The program analysis software automatic test method and system based on the revision log have the following beneficial effects:
1. Version management is carried out on the program analysis software codes by using a minimum code rule unit, the change content in the new version and the old version of the codes is managed by using an independent minimum unit, the analysis result is compared with the first analysis result based on the second analysis result of the new version and the old version, the analysis result is initially compared and judged, the test range of the program analysis software is effectively reduced, the rules to be detected are more reasonably classified, the test key of testers is more reasonable, and the overall test effect is improved.
2. The comparison result of the alarm quantity in the execution result of the reference test set of the new version and the old version and the execution time-consuming parameter is used for determining which program analysis software codes of the new version need major investigation and which need minor investigation, and which do not need investigation, so that the test scope of the rule set which needs to be checked in the program analysis software is effectively reduced, and the test rule set in the test scope is more reasonably divided: and the minimum code rule unit with abnormal comparison results is included in the key investigation range, and the minimum code rule unit with normal comparison results is included in the non-key investigation range. Thereby greatly reducing the testing workload of the testers and improving the testing efficiency. Meanwhile, the human resource allocation of the test is more reasonable, the test period is shortened, and the test effect and quality are improved.
3. In the programming implementation stage of the new version development cycle of the software code, a code revision management specification is set, when the code is revised and submitted, revision notes are provided according to a specific specification format, the notes comprise revised rule numbers and corresponding function points, all code changes are submitted in a mode of combining the revision notes of the specific specification in an independent minimum unit, and data support is provided for subsequent automatic testing.
Drawings
FIG. 1 is a flow chart of a method for automated testing of program analysis software based on a revision log according to an embodiment of the present application;
FIG. 2 is a block diagram of the architecture of a revision log based program analysis software automated test system in accordance with an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the application discloses a program analysis software automatic test method based on a revision log, which specifically comprises the following steps:
Obtaining a minimum code rule unit in the program analysis software code, wherein the minimum code rule unit is obtained by dividing the program analysis software code by taking 1 rule as a basic unit, and preferably, the minimum code rule unit comprises 1 rule;
Acquiring a first version and a second version of a program analysis software code, and acquiring a specific change type of a minimum code rule unit which is changed compared with the first version in the second version, wherein the second version is a modified version of the first version;
executing a first version and a second version of the program analysis software code based on a reference test set to respectively obtain a first analysis result and a second analysis result of each minimum code rule unit in each version;
Judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit or not, and judging whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type or not;
and when the judging result is negative, taking the corresponding minimum code rule unit as the key investigation content, and when the judging result is positive, taking the corresponding minimum code rule unit as the non-key investigation content.
In this embodiment, in a programming implementation stage in a new version development cycle of a software code, revising the software code complies with a preset code revision management specification, including:
1. managing code changes by a code version control tool;
2. All code revisions need to be split into minimum units as much as possible, i.e. refined to revisions for one rule, for several specific functional points, including: rule implementation (new addition), repair false alarm, repair missing report, performance repair or code reconstruction;
3. When the code is modified and submitted, providing revised notes according to a specific specification format, wherein the notes comprise modified rule numbers and corresponding function points;
At the automated test tool end, code modification and submission specifications through the implementation phase described above:
1. obtaining a revision log of program analysis software in a current development period, wherein the revision log comprises:
1.1, a rule number which is newly added;
1.2 repairing the rule number of the false alarm;
1.3 repairing the rule number of the missing report;
1.4 rule number of repair performance;
1.5, only code reconstruction, and rule numbering which does not affect false alarm, missing report and performance improvement;
2. Program analysis software of the current version and the last version is executed through the benchmark test set, and analysis results of the two times are collected, wherein the method comprises the following steps:
2.1 alarming number of each rule;
2.2 positional information of each piece of alarm information;
2.3 time consuming per rule.
In the embodiment, at a code warehouse end, all code changes are submitted in an independent minimum unit mode by combining revision notes of a specific specification based on a code revision management specification of a version control tool, so that data support is provided for subsequent automatic tests;
Analyzing the code revision management specification of the software through a program based on version control to form a set of test methods for classifying the test range and the test key of the rule and filtering and displaying the test result after the comparison of the test result based on the revision log and the new version and the old version;
In this embodiment, version management is performed on the program analysis software code by using a minimum code rule unit, variation content in new and old versions of the code is managed by using an independent minimum unit, and based on comparison between a second analysis result and a first analysis result of the new and old versions, comparison and judgment are performed on the analysis result preliminarily, so that the test range of the program analysis software is effectively reduced, the rules to be detected are more reasonably classified, the test key of a tester is more reasonable, and the overall test effect is improved.
Compared with the prior art that the manual test of the tester is combined with a part of automatic test tools, the modified rule is roughly used as a key investigation object, and other non-modified rules are used as non-key investigation objects.
Optionally, for non-focused content, the method further includes: and if the corresponding minimum code rule unit belongs to the minimum code rule unit which is changed compared with the first version, taking the corresponding minimum code rule unit as the slight investigation content, otherwise, not carrying out investigation on the corresponding minimum code rule unit.
In this embodiment, the non-focus investigation content is further divided, so that invalid test work on the program analysis software code is further reduced, and the test efficiency is further improved.
In this embodiment, the program analysis software code is divided by taking 1 rule as a basic unit, so as to obtain an independent minimum unit, improve the revision management efficiency of each new version of the program analysis software code, and facilitate the subsequent classification of the investigation key and non-key of the independent minimum unit, i.e. the division of the investigation range in the new version of the program analysis software.
Optionally, the minimum code rule unit in the second version, compared with the first version, includes addition, modification and deletion of the minimum code rule unit, and the specific change type of the minimum code rule unit includes: repairing false alarm, repairing missing report, repairing performance, only reconstructing code and not affecting false alarm, missing report and performance.
In this embodiment, the specific change type of the minimum code rule unit includes: new addition of the minimum code rule unit, functional repair (repair false alarm, repair missing report), repair performance, code-only reconstruction, and the like of the minimum code rule unit.
Optionally, in the above method, obtaining a first analysis result and a second analysis result of each minimum code rule unit in each version includes:
obtaining a first execution result and a second execution result obtained by executing the first version and the second version of the program analysis software code based on the benchmark test set;
Acquiring alarm quantity parameters, alarm occurrence position parameters and execution time consumption of each minimum code rule unit in the execution result based on the first execution result and the second execution result, wherein each alarm occurrence position parameter comprises the number of the minimum code rule unit in which each alarm occurrence position is located;
the first analysis result and the second analysis result of each minimum code rule unit in each version are obtained based on the alarm number parameter and the execution time consumption of each minimum code rule unit.
In this embodiment, by comparing the number of alarms in the execution results of the reference test set of the new version (second version) and the old version (first version) with the execution time-consuming parameters, it is determined which program analysis software codes of the new version need major investigation and which need minor investigation, and which do not need investigation, so that the test scope of rule sets to be checked in the program analysis software is effectively reduced, and the test rule sets in the test scope are more reasonably divided: and the minimum code rule unit with abnormal comparison results is included in the key investigation range, and the minimum code rule unit with normal comparison results is included in the non-key investigation range. Thereby greatly reducing the testing workload of the testers and improving the testing efficiency. Meanwhile, the human resource allocation of the test is more reasonable, the test period is shortened, and the test effect and quality are improved.
In the above method, determining whether the second analysis result accords with the preset normal result range corresponding to the minimum code rule unit and whether the change of the second analysis result compared with the first analysis result accords with the normal change range caused by the specific change type includes:
(1) Acquiring preset normal result range data of all minimum code rule units in the second version, wherein all the minimum code rule units comprise newly added minimum code rule units in the second version and original minimum code rule units in the first version;
(2) Judging whether a second analysis result of the minimum code rule unit is matched with the data in the range of the preset normal result, if so, entering the step (3), otherwise, entering the step (4);
(3) Step (6) is carried out on the minimum code rule unit which is not changed compared with the first version in the second version, step (4) is carried out on the minimum code rule unit which is changed compared with the first version in the second version, the specific change type of the minimum code rule unit which is changed and the change data of the second analysis result compared with the first analysis result are obtained, and if the change data does not match the preset normal change range data corresponding to the specific change type, step (5) is carried out, otherwise;
(4) Taking the minimum code rule unit as a key investigation content;
(5) Taking the minimum code rule unit as light investigation content;
(6) The minimum code rule unit is regarded as non-checking content.
In this embodiment, the second analysis result of the second version is analyzed twice in step (2) and step (3), so that all the minimum code rule units in the program analysis software code are classified more comprehensively and more reasonably, compared with the manual test of a tester and partial automatic test tool in the prior art, the modified rule is roughly used as the key check object of the test, other non-modified rules are used as the non-key check objects, and the non-key check rules are still checked by a part of software items, whether new problems are introduced in the verification rules due to modification are verified, in this embodiment, the non-modified minimum code rule units in the second version are classified into key check content and non-check content according to the matching result in step (2) and step (3), and the modified minimum code rule units are classified into key check content and light check content, so that the key and non-key classification speed of the check content and the accuracy of classification are improved.
The preset normal variation range data corresponding to the specific variation type comprises:
If the specific change type is repair false alarm, the normal change range data is as follows: the number of alarms in the second analysis result is smaller than that of the first analysis result, the alarm information in the second analysis result is in the alarm information range of the first analysis result (namely, the first analysis result comprises all alarm information in the second analysis result, specifically, the alarm information can be determined by comparing and analyzing the position information of all alarm information in the first analysis result and the second analysis result), and the analysis time consumption in the second analysis result is not obviously different from that of the first analysis result;
If the specific change type is repair report missing, the normal change range data is: the number of alarms in the second analysis result is more than that of the first analysis result, the alarm information in the second analysis result completely covers the alarm information of the first analysis result, and the analysis time consumption in the second analysis result has no obvious difference with the first analysis result;
If the specific change type is repair performance, the normal change range data is: the analysis time consumption in the second analysis result is less than that of the first analysis result, and the alarm information of the second analysis result is consistent with the first analysis result;
If the specific change type is only code reconstruction, the normal change range data is: the analysis time consumption in the second analysis result is not obviously different from that of the first analysis result, and the alarm information of the second analysis result is consistent with that of the first analysis result;
If the specific change type is a mixture of repair false alarm and repair missing alarm, the normal change range data is as follows: the second analysis result has alarm information which is not found in the first analysis result, and the first analysis result has alarm information which is not found in the second analysis result, namely the intersection of the alarm information of the first analysis result and the alarm information of the second analysis result is not empty, the union is more than the alarm information of the first analysis result, and the union is more than the alarm information of the second analysis result;
If the specific change type is a mixture of multiple change types, the normal change range data is as follows: and combining the normal variation range data corresponding to each variation type.
The automatic testing method of the program analysis software based on the revision log further comprises the following steps:
based on the minimum code rule unit in the major investigation content, the minor investigation content and the non-investigation content, test report data is generated, wherein the test report comprises data in the form of text and diagrams.
In this embodiment, based on the classification results of various investigation contents for the minimum code rule unit, the problem types (i.e., the specific cases of mismatch in the steps (2) and (3)) and the difference result details are output, and corresponding test report files and charts are generated, so that the test, development and project management personnel can conveniently review and track. A simple and clear test report is generated through one key, so that personnel such as research, development, design and product/project managers can participate in the test work, product problems can be exposed earlier and more and timely repaired, and the quality assurance of program analysis software products is greatly enhanced.
Based on the program analysis software automatic test method based on the revision log provided by the embodiment of the application, the embodiment of the application correspondingly discloses a program analysis software automatic test system based on the revision log, which comprises the following steps:
The minimum code rule unit is used for acquiring the minimum code rule unit in the program analysis software code;
The new version revision log obtaining unit is used for obtaining a first version and a second version of the program analysis software code, and obtaining a specific change type of a minimum code rule unit which is changed in comparison with the first version in the second version, wherein the second version is a version modified by the first version;
the analysis result acquisition unit is used for executing the first version and the second version of the program analysis software code based on the reference test set to respectively acquire a first analysis result and a second analysis result of each minimum code rule unit in each version;
The analysis result analysis unit is used for judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit and whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type;
And the investigation content classification unit is used for taking the corresponding minimum code rule unit as the key investigation content when the analysis result analysis unit outputs no, and taking the corresponding minimum code rule unit as the non-key investigation content when the judgment result is yes.
The specific principle and the execution process in the program analysis software automation test system based on the revision log disclosed in the above embodiment of the present application are the same as those in the program analysis software automation test method based on the revision log disclosed in the above embodiment of the present application, and the corresponding parts in the program analysis software automation test method based on the revision log disclosed in the above embodiment of the present application are referred to, and are not described here again.
The present invention is not limited to the above-described specific embodiments, and various modifications may be made by those skilled in the art without inventive effort from the above-described concepts, and are within the scope of the present invention.

Claims (9)

1. A program analysis software automated test method based on a revision log, comprising:
acquiring a minimum code rule unit in the program analysis software code;
Acquiring a first version and a second version of the program analysis software code, and acquiring a specific change type of a minimum code rule unit which is changed in comparison with the first version in the second version, wherein the second version is a version modified by the first version;
executing a first version and a second version of the program analysis software code based on a reference test set to respectively obtain a first analysis result and a second analysis result of each minimum code rule unit in each version;
Judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit or not, and judging whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type or not;
when the judging result is negative, the corresponding minimum code rule unit is taken as the key investigation content, and when the judging result is positive, the corresponding minimum code rule unit is taken as the non-key investigation content;
The determining whether the second analysis result accords with the preset normal result range corresponding to the minimum code rule unit and whether the change of the second analysis result compared with the first analysis result accords with the normal change range caused by the specific change type includes:
(1) Acquiring preset normal result range data of all the minimum code rule units in the second version;
(2) Judging whether a second analysis result of the minimum code rule unit is matched with the data in the range of the preset normal result, if so, entering the step (3), otherwise, entering the step (4);
(3) Step (6) is carried out on the minimum code rule unit which is not changed compared with the first version in the second version, step (4) is carried out on the minimum code rule unit which is changed compared with the first version in the second version, the specific change type of the minimum code rule unit which is changed and the change data of the second analysis result compared with the first analysis result are obtained, and if the change data does not match the preset normal change range data corresponding to the specific change type, step (5) is carried out, otherwise;
(4) Taking the minimum code rule unit as a key investigation content;
(5) Taking the minimum code rule unit as light investigation content;
(6) The minimum code rule unit is regarded as non-checking content.
2. The automated test method of program analysis software based on a revision log of claim 1, further comprising, for the non-focused review: and if the corresponding minimum code rule unit belongs to the minimum code rule unit which is changed compared with the first version, taking the corresponding minimum code rule unit as the slight investigation content, otherwise, not carrying out investigation on the corresponding minimum code rule unit.
3. The automated test method of program analysis software based on a revision log according to claim 2, wherein the minimum code rule unit is obtained by dividing the program analysis software code in 1 rule base unit.
4. The automated test method of program analysis software based on a revision log of claim 3, wherein the minimum code rule unit of the second version that is changed compared to the first version comprises addition, modification, deletion of the minimum code rule unit, and wherein the specific change type of the minimum code rule unit that is changed comprises: repairing false alarm, repairing missing report, repairing performance, only reconstructing code and not affecting false alarm, missing report and performance.
5. The automated test method of program analysis software based on a revision log of claim 4, wherein the obtaining the first analysis result and the second analysis result for each minimum code rule unit in each version comprises:
obtaining a first execution result and a second execution result obtained by executing the first version and the second version of the program analysis software code based on the benchmark test set;
acquiring alarm quantity parameters, alarm occurrence position parameters and execution time consumption of each minimum code rule unit in the execution result based on the first execution result and the second execution result;
the first analysis result and the second analysis result of each minimum code rule unit in each version are obtained based on the alarm number parameter and the execution time consumption of each minimum code rule unit.
6. The automated test method of program analysis software based on a revision log of claim 5, wherein each of the alert occurrence location parameters includes a number of a minimum code rule element in which each of the alert occurrence locations is located.
7. The automated testing method of program analysis software based on a revision log according to claim 6, wherein the preset normal variation range data corresponding to the specific change type comprises:
If the specific change type is repair false alarm, the normal change range data is as follows: the number of alarms in the second analysis result is smaller than that of the first analysis result, the alarm information in the second analysis result is in the alarm information range of the first analysis result, and the analysis time consumption in the second analysis result is not obviously different from that of the first analysis result;
If the specific change type is repair report missing, the normal change range data is: the number of alarms in the second analysis result is more than that of the first analysis result, the alarm information in the second analysis result completely covers the alarm information of the first analysis result, and the analysis time consumption in the second analysis result has no obvious difference with the first analysis result;
If the specific change type is repair performance, the normal change range data is: the analysis time consumption in the second analysis result is less than that of the first analysis result, and the alarm information of the second analysis result is consistent with the first analysis result;
If the specific change type is only code reconstruction, the normal change range data is: the analysis time consumption in the second analysis result is not obviously different from that of the first analysis result, and the alarm information of the second analysis result is consistent with that of the first analysis result;
If the specific change type is a mixture of repair false alarm and repair missing alarm, the normal change range data is as follows: the second analysis result contains alarm information which is not contained in the first analysis result, and the first analysis result contains alarm information which is not contained in the second analysis result;
If the specific change type is a mixture of multiple change types, the normal change range data is as follows: and combining the normal variation range data corresponding to each variation type.
8. The automated test method of program analysis software based on a revision log of claim 2, further comprising:
based on the minimum code rule unit in the major investigation content, the minor investigation content and the non-investigation content, test report data is generated, wherein the test report comprises data in the form of text and diagrams.
9. A revision log based program analysis software automated test system, comprising:
The minimum code rule unit is used for acquiring the minimum code rule unit in the program analysis software code;
The new version revision log obtaining unit is used for obtaining a first version and a second version of the program analysis software code, and obtaining a specific change type of a minimum code rule unit which is changed in comparison with the first version in the second version, wherein the second version is a version modified by the first version;
the analysis result acquisition unit is used for executing the first version and the second version of the program analysis software code based on the reference test set to respectively acquire a first analysis result and a second analysis result of each minimum code rule unit in each version;
The analysis result analysis unit is used for judging whether a second analysis result accords with a preset normal result range corresponding to the minimum code rule unit and whether the change of the second analysis result compared with the first analysis result accords with a normal change range caused by the specific change type;
The investigation content classification unit is used for taking the corresponding minimum code rule unit as important investigation content when the output of the analysis result analysis unit is no, and taking the corresponding minimum code rule unit as non-important investigation content when the judgment result is yes;
the analysis result analysis unit performs the steps of:
(1) Acquiring preset normal result range data of all the minimum code rule units in the second version;
(2) Judging whether a second analysis result of the minimum code rule unit is matched with the data in the range of the preset normal result, if so, entering the step (3), otherwise, entering the step (4);
(3) Step (6) is carried out on the minimum code rule unit which is not changed compared with the first version in the second version, step (4) is carried out on the minimum code rule unit which is changed compared with the first version in the second version, the specific change type of the minimum code rule unit which is changed and the change data of the second analysis result compared with the first analysis result are obtained, and if the change data does not match the preset normal change range data corresponding to the specific change type, step (5) is carried out, otherwise;
(4) Taking the minimum code rule unit as a key investigation content;
(5) Taking the minimum code rule unit as light investigation content;
(6) The minimum code rule unit is regarded as non-checking content.
CN202110844566.2A 2021-07-26 2021-07-26 Program analysis software automatic test method and system based on revision log Active CN113641573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110844566.2A CN113641573B (en) 2021-07-26 2021-07-26 Program analysis software automatic test method and system based on revision log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110844566.2A CN113641573B (en) 2021-07-26 2021-07-26 Program analysis software automatic test method and system based on revision log

Publications (2)

Publication Number Publication Date
CN113641573A CN113641573A (en) 2021-11-12
CN113641573B true CN113641573B (en) 2024-05-07

Family

ID=78418319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110844566.2A Active CN113641573B (en) 2021-07-26 2021-07-26 Program analysis software automatic test method and system based on revision log

Country Status (1)

Country Link
CN (1) CN113641573B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116244168A (en) * 2021-12-08 2023-06-09 华为云计算技术有限公司 Unit test generation method and device and related equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309804A (en) * 2013-04-08 2013-09-18 中国电子科技集团公司第十研究所 Automatic code rule checking platform
CN103425572A (en) * 2012-05-24 2013-12-04 腾讯科技(深圳)有限公司 Code analyzing method and system
CN105302710A (en) * 2014-07-03 2016-02-03 腾讯科技(深圳)有限公司 Method and apparatus for determining test case in need of regression testing
CN109857431A (en) * 2019-01-11 2019-06-07 平安科技(深圳)有限公司 Code revision method and device, computer-readable medium and electronic equipment
CN110245081A (en) * 2019-05-31 2019-09-17 厦门美柚信息科技有限公司 Generate the method and device of minimum test scope
CN110389896A (en) * 2019-06-18 2019-10-29 中国平安人寿保险股份有限公司 Code automated analysis and test method, device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8132157B2 (en) * 2008-01-17 2012-03-06 International Business Machines Corporation Method of automatic regression testing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425572A (en) * 2012-05-24 2013-12-04 腾讯科技(深圳)有限公司 Code analyzing method and system
CN103309804A (en) * 2013-04-08 2013-09-18 中国电子科技集团公司第十研究所 Automatic code rule checking platform
CN105302710A (en) * 2014-07-03 2016-02-03 腾讯科技(深圳)有限公司 Method and apparatus for determining test case in need of regression testing
CN109857431A (en) * 2019-01-11 2019-06-07 平安科技(深圳)有限公司 Code revision method and device, computer-readable medium and electronic equipment
CN110245081A (en) * 2019-05-31 2019-09-17 厦门美柚信息科技有限公司 Generate the method and device of minimum test scope
CN110389896A (en) * 2019-06-18 2019-10-29 中国平安人寿保险股份有限公司 Code automated analysis and test method, device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
规范化嵌入式软件自测试方法;王泉;;计算机工程与设计(第10期);全文 *

Also Published As

Publication number Publication date
CN113641573A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
AlOmar et al. On the impact of refactoring on the relationship between quality attributes and design metrics
Maldonado et al. Detecting and quantifying different types of self-admitted technical debt
US8312440B2 (en) Method, computer program product, and hardware product for providing program individuality analysis for source code programs
Martinez et al. Coming: A tool for mining change pattern instances from git commits
CN109002391B (en) Method for automatically detecting embedded software interface test data
CN109784758B (en) Engineering quality supervision early warning system and method based on BIM model
CN112817865A (en) Coverage precision test method and system based on componentized distributed system
Bigonha et al. The usefulness of software metric thresholds for detection of bad smells and fault prediction
CN114510722B (en) Static detection method and detection system for incremental code
CN106933572B (en) Measurement model based on LLVM intermediate representation program slice
CN113641573B (en) Program analysis software automatic test method and system based on revision log
CN112131116A (en) Automatic regression testing method for embedded software
CN115328784A (en) Agile interface-oriented automatic testing method and system
CN111611154B (en) Regression testing method, device and equipment
CN111258876B (en) Accurate regression testing method and device under micro-service architecture
CN111475408A (en) Quality management method based on code inspection tool
CN113672517A (en) Code checking method and device, electronic equipment and medium
Kauhanen et al. Regression test selection tool for python in continuous integration process
CN111767205A (en) Online detection method and system supporting task splitting
Yan et al. Revisiting the correlation between alerts and software defects: A case study on myfaces, camel, and cxf
CN116627804A (en) Test method, system, electronic equipment and storage medium based on artificial intelligence
CN114490413A (en) Test data preparation method and device, storage medium and electronic equipment
CN115373984A (en) Code coverage rate determining method and device
Steidl et al. How do java methods grow?
CN114168408A (en) Inspection method and system based on Internet of things, electronic equipment and storage medium

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