CN105159831A - Method for automatically monitoring quality of software code - Google Patents

Method for automatically monitoring quality of software code Download PDF

Info

Publication number
CN105159831A
CN105159831A CN201510545190.XA CN201510545190A CN105159831A CN 105159831 A CN105159831 A CN 105159831A CN 201510545190 A CN201510545190 A CN 201510545190A CN 105159831 A CN105159831 A CN 105159831A
Authority
CN
China
Prior art keywords
code
information
quality
source code
data
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.)
Pending
Application number
CN201510545190.XA
Other languages
Chinese (zh)
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 Group Co Ltd
Original Assignee
Inspur 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 Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN201510545190.XA priority Critical patent/CN105159831A/en
Publication of CN105159831A publication Critical patent/CN105159831A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method for automatically monitoring the quality of a software code, and belongs to the technical field of computer software. According to the method, a mode of direct connection with an SVN code server is adopted, so that the effect of capturing all change information of the code can be ensured and the efficiency of code quality analysis is improved; a change code is detected by using Checkstyle, FindBugs and Sonar code detection tools, so that the one-sidedness and limitation of manual code quality analysis are avoided; and by updating information of code monitoring personnel as a foundation of obtaining a monitoring personnel list through code change information and receiving a user list through change code quality information, supervisors only need to focus on monitoring of parts in charge, the continuity and traceability of code quality monitoring are improved, and the one-sidedness and limitation of code monitoring caused by insufficient overall cognition of the supervisors to a system are also avoided.

Description

A kind of software code quality automatic monitoring method
Technical field
The present invention discloses a kind of software code quality automatic monitoring method, belongs to computer software technical field.
Background technology
Software code is exactly the source file that the language supported of programmer's developing instrument writes out.It is the arrangement of one group of orderly numeral or letter, is the symbol representing Subject and attribute thereof.
Software code quality is exactly a kind of unified standard that code is write, and allows code have readable line, clear thinking.High-quality code all possesses readability, maintainable and these three features of modifiability.Readable: succinctly to have again the code explained in detail.Maintainable: in a software life-cycle, the time and efforts of 80% spends in maintenance phase.For the maintainability of code, code is convenient to the change with post code flexibly.Modifiability: can change according to the requirement of client, namely write code can change the requirement reaching client accordingly.In the tide of current informatization, OO large scale system application is more and more extensive, be applied to the industry-by-industries such as education, traffic, medical treatment, government gradually, the effect played in society is also more and more important, meanwhile, system itself also becomes more and more huger, becomes increasingly complex.The quality of these large scale systems application is directly determined by the quality of system software code.Current Software Industry, outsourcing development and maintenance also develop into new trend just gradually, cause system source code dispersion geographically, and independently developer, in the exploitation of whole system, only has independent limited cognition.When complexity, huge source code changes, rely on the control that original indivedual developers carry out code quality by modes such as code Review and become unable to do what one wishes, accumulate over a long period and can bring harmful effect to system, and then cause the decline of entire system code quality.The invention provides a kind of software code quality automatic monitoring method, changed by the server automated acquisition code of direct-connected SVN, code quality detection is carried out in robotization, solve the awkward situation that code quality supervisor is deficient in energy in this way, and then ensure that the quality of code is had been further upgraded.
Summary of the invention
The present invention is directed to when complicated and huge source code changes time, rely on the control that original indivedual developers carry out code quality by modes such as code Review and become unable to do what one wishes, accumulate over a long period and can bring harmful effect to system, and then cause the problem of decline of entire system code quality, a kind of software code quality automatic monitoring method is provided, changed by the server automated acquisition code of direct-connected SVN, code quality detection is carried out in robotization, largely solve the awkward situation that code quality supervisor is deficient in energy in this way, and then provide guarantee for the quality of code is improved.
The concrete scheme that the present invention proposes is:
A kind of software code quality automatic monitoring method, by monitoring software source code SVN server, timing carries out variation scanning and quality analysis to software source code, in time code quality Data Integration is sent to monitor staff, is specially:
Code variations scanning and quality analysis: monitoring server is directly connected software source code SVN server, obtain the bibliographic structure of SVN source code, periodically transition information scanning is carried out to SVN storehouse in SVN server, obtain the code variations information in sense cycle, code quality analysis is carried out to the code of variation, obtains the transition information of code and the qualitative data of its correspondence;
Code quality information integration and transmission: code variations information data is resolved, upgrade source code structured data, and preserve the qualitative data of variation code, the source code data after itself and renewal are integrated into according to the bibliographic structure of source code on SVN server and change code quality information and the user sending to setting;
Database purchase: the relevant information of software source code in SVN server preserved in a database, as data basis.When wherein code variations scanning and quality analysis are analyzed for source code transition information, source code variation type can be judged, the change of source code structure can be obtained according to source code variation type, according to these change synchronous maintenance source code structural informations.
The described code to variation carries out code quality analysis employing and uses Checkstyle, FindBugs, Sonar code quality testing tool to detect successively.Standard unified is in the industry used to carry out quality analysis to code.
While described renewal source code structured data, upgrade code monitoring personal information, as the basis by code variations acquisition of information monitor staff's list and variation code quality receives information user list.
Described code quality information integration with send in the source code data after upgrading and the qualitative data changing code are integrated into according to the bibliographic structure of source code on SVN server the user that html format sends to setting.
In database purchase SVN server, the relevant information data table of software source code, comprises monitor staff's list, keeper id, title and email information; Source code structural information table, preserves the complete trails of source code, the father path id of source code; Monitor message table, saves the relation of code directory id and monitor staff id in table; Source code transition information table, preserves source code variation time, variation type, variation content and source code catalogue id; Source code quality information table, preserves qualitative data, comprises the transition information id of quality type, concrete data, data generation time and correspondence.Also there are other information tables, such as may there is mail sending information table.
Usefulness of the present invention is: the present invention adopts the mode direct-connected with SVN code server, can ensure all transition information of capturing code, and reduce the scope of code detection further, improves the efficiency that code quality is analyzed; The code detection instruments such as Checkstyle, FindBugs, Sonar are used to detect variation code, standard unified is in the industry used to carry out quality analysis to code, improve the comprehensive, authoritative of code quality analysis, avoid one-sidedness, limitation that artificial code quality is analyzed; By upgrading code monitoring personal information, as the basis by code variations acquisition of information monitor staff's list and variation code quality receives information user list, make supervisor only need to be absorbed in monitoring oneself the part be responsible for, improve continuation, the trackability of code quality monitoring, it also avoid because supervisor is to one-sidedness, the limitation of the code monitoring that entire system cognition causes not simultaneously.
Accompanying drawing explanation
Fig. 1 block schematic illustration of the present invention;
Code quality information integration and transmission flow figure in Fig. 2 the present invention.
Embodiment
A kind of software code quality automatic monitoring method, by monitoring software source code SVN server, timing carries out variation scanning and quality analysis to software source code, in time code quality Data Integration is sent to monitor staff, is specially:
Code variations scanning and quality analysis: monitoring server is directly connected software source code SVN server, obtain the bibliographic structure of SVN source code, periodically transition information scanning is carried out to SVN storehouse in SVN server, obtain the code variations information in sense cycle, code quality analysis is carried out to the code of variation, obtains the transition information of code and the qualitative data of its correspondence;
Code quality information integration and transmission: code variations information data is resolved, upgrade source code structured data, and preserve the qualitative data of variation code, the source code data after itself and renewal are integrated into according to the bibliographic structure of source code on SVN server and change code quality information and the user sending to setting;
Database purchase: the relevant information of software source code in SVN server preserved in a database, as data basis.
Utilize said method, the present invention will be further described by reference to the accompanying drawings.
As described in summary of the invention, main process of the present invention is: code variations scanning and quality analysis, code quality information integration and transmission, database purchase.
Code variations scanning is by being directly connected soft project source code SVN storehouse with quality analysis, periodically to SVN server, transition information scanning is carried out to use SVN command-line tool, obtain the code variations information in sense cycle, code for variation uses ripe code quality analysis tool to carry out code quality analysis, thus obtains the transition information of code and the qualitative data of its correspondence.Represented by accompanying drawing 1 and accompanying drawing 2, code quality monitoring in backstage can, according to certain cycle, use SVN command-line tool to obtain the transition information of source code on SVN server.
And when analyzing for source code transition information, source code variation type can be judged, the change of source code structure can be obtained according to source code variation type, according to these change synchronous maintenance source code structural informations.
To the source code of variation, the code quality testing tool of these maturations of Checkstyle, FindBugs, Sonar is used to detect successively, use standard unified in the industry to carry out quality analysis to code, and the qualitative data after detecting is saved in code quality information table, store in a database.
Code quality information integration and transmission main process are as shown in Figure 2, when after completion code variation scanning and quality analysis, corresponding qualitative data to be obtained for the transition information of code, Data Integration is carried out to source code transition information and corresponding qualitative data, html format can be integrated into, and the code of variation and the code comparison of last revision are shown, highlighted display is carried out so that user checks to changing unit.To the qualitative data of code, classification can be carried out according to the classification of quality analysis and show.
For reduced data, the source code structural information corresponding according to code variations information, obtains corresponding code variations information relationship list, data is used the mode of mail to send to relation personnel.
Database is that realization of the present invention provides data basis.The relevant information data table of software source code in database purchase SVN server, comprises the bibliographic structure information storing source code in SVN server, and each catalogue pays close attention to personnel's configuration information; The transition information of source code and corresponding quality information; Mail sending information etc.
Keeper id, title and email information is needed, following interface in monitor staff's list:
The complete trails of source code, the father path id of source code is preserved, following interface in source code structural information table:
The relation of code directory id and monitor staff id is saved, following interface in monitor message table:
Obtain the monitor staff id that source code not only will obtain current path, also will obtain father path monitor staff id; Source code variation time, variation type, variation content and source code catalogue id is preserved, following interface in source code transition information table:
Preserve qualitative data in source code quality information table, comprise the transition information id of quality type, concrete data, data generation time and correspondence, following interface:
Preserve mail sending information in mail sending information table, comprise mail id, Mail Contents, addressee, theme, transmission state, creation-time and transmitting time, complete preservation mail sending record, following interface:
Tables of data in above database, stores the bibliographic structure information of source code in SVN server, and each catalogue pays close attention to personnel's configuration information; The transition information of source code and corresponding quality information; Mail sending information etc.

Claims (5)

1. a software code quality automatic monitoring method, is characterized in that by monitoring software source code SVN server, and timing carries out variation scanning and quality analysis to software source code, in time code quality Data Integration is sent to monitor staff, is specially:
Code variations scanning and quality analysis: monitoring server is directly connected software source code SVN server, obtain the bibliographic structure of SVN source code, periodically transition information scanning is carried out to SVN storehouse in SVN server, obtain the code variations information in sense cycle, code quality analysis is carried out to the code of variation, obtains the transition information of code and the qualitative data of its correspondence;
Code quality information integration and transmission: code variations information data is resolved, upgrade source code structured data, and preserve the qualitative data of variation code, the source code data after itself and renewal are integrated into according to the bibliographic structure of source code on SVN server and change code quality information and the user sending to setting;
Database purchase: the relevant information of software source code in SVN server preserved in a database, as data basis.
2. a kind of software code quality automatic monitoring method according to claim 1, is characterized in that the described code to variation carries out code quality analysis employing and uses Checkstyle, FindBugs, Sonar code quality testing tool to detect successively.
3. a kind of software code quality automatic monitoring method according to claim 1 and 2, while it is characterized in that described renewal source code structured data, upgrade code monitoring personal information, as the basis by code variations acquisition of information monitor staff's list and variation code quality receives information user list.
4., according to a kind of software code quality automatic monitoring method according to claim 3, in it is characterized in that described code quality information integration and sending, the source code data after upgrading and the qualitative data changing code are integrated into according to the bibliographic structure of source code on SVN server the user that html format sends to setting.
5. a kind of software code quality automatic monitoring method according to claim 4, is characterized in that the relevant information data table of software source code in database purchase SVN server, comprises monitor staff's list, keeper id, title and email information; Source code structural information table, preserves the complete trails of source code, the father path id of source code; Monitor message table, saves the relation of code directory id and monitor staff id in table; Source code transition information table, preserves source code variation time, variation type, variation content and source code catalogue id; Source code quality information table, preserves qualitative data, comprises the transition information id of quality type, concrete data, data generation time and correspondence.
CN201510545190.XA 2015-08-31 2015-08-31 Method for automatically monitoring quality of software code Pending CN105159831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510545190.XA CN105159831A (en) 2015-08-31 2015-08-31 Method for automatically monitoring quality of software code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510545190.XA CN105159831A (en) 2015-08-31 2015-08-31 Method for automatically monitoring quality of software code

Publications (1)

Publication Number Publication Date
CN105159831A true CN105159831A (en) 2015-12-16

Family

ID=54800693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510545190.XA Pending CN105159831A (en) 2015-08-31 2015-08-31 Method for automatically monitoring quality of software code

Country Status (1)

Country Link
CN (1) CN105159831A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677317A (en) * 2015-12-25 2016-06-15 北京奇虎科技有限公司 Method and apparatus for generating code documentation
CN106528427A (en) * 2016-11-24 2017-03-22 上海携程商务有限公司 Code quality checking method and system
CN106776270A (en) * 2016-11-11 2017-05-31 努比亚技术有限公司 A kind of code detection method, device and terminal
CN107688541A (en) * 2017-09-15 2018-02-13 广州酷狗计算机科技有限公司 File reviewing method, device, server and computer-readable recording medium
CN109359028A (en) * 2018-08-22 2019-02-19 平安科技(深圳)有限公司 Code quality monitoring method, device, computer equipment and storage medium
CN109508204A (en) * 2018-11-15 2019-03-22 四川长虹电器股份有限公司 A kind of front-end code quality determining method and device
CN109976994A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 White-box testing method, apparatus, the computer equipment of Java project
WO2019200701A1 (en) * 2018-04-17 2019-10-24 平安科技(深圳)有限公司 Configuration management method and apparatus, terminal device and storage medium
CN109359028B (en) * 2018-08-22 2024-05-03 平安科技(深圳)有限公司 Code quality monitoring method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5119377A (en) * 1989-06-16 1992-06-02 International Business Machines Corporation System and method for software error early detection and data capture
CN103473075A (en) * 2013-09-23 2013-12-25 迈普通信技术股份有限公司 Code change control system and method
CN103985003A (en) * 2013-12-25 2014-08-13 北京安码科技有限公司 Novel method and apparatus for supporting automatic monitoring of software engineering quality

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5119377A (en) * 1989-06-16 1992-06-02 International Business Machines Corporation System and method for software error early detection and data capture
CN103473075A (en) * 2013-09-23 2013-12-25 迈普通信技术股份有限公司 Code change control system and method
CN103985003A (en) * 2013-12-25 2014-08-13 北京安码科技有限公司 Novel method and apparatus for supporting automatic monitoring of software engineering quality

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677317A (en) * 2015-12-25 2016-06-15 北京奇虎科技有限公司 Method and apparatus for generating code documentation
CN106776270A (en) * 2016-11-11 2017-05-31 努比亚技术有限公司 A kind of code detection method, device and terminal
CN106528427A (en) * 2016-11-24 2017-03-22 上海携程商务有限公司 Code quality checking method and system
CN107688541A (en) * 2017-09-15 2018-02-13 广州酷狗计算机科技有限公司 File reviewing method, device, server and computer-readable recording medium
CN109976994A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 White-box testing method, apparatus, the computer equipment of Java project
WO2019200701A1 (en) * 2018-04-17 2019-10-24 平安科技(深圳)有限公司 Configuration management method and apparatus, terminal device and storage medium
CN109359028A (en) * 2018-08-22 2019-02-19 平安科技(深圳)有限公司 Code quality monitoring method, device, computer equipment and storage medium
CN109359028B (en) * 2018-08-22 2024-05-03 平安科技(深圳)有限公司 Code quality monitoring method, device, computer equipment and storage medium
CN109508204A (en) * 2018-11-15 2019-03-22 四川长虹电器股份有限公司 A kind of front-end code quality determining method and device
CN109508204B (en) * 2018-11-15 2021-08-06 四川长虹电器股份有限公司 Front-end code quality detection method and device

Similar Documents

Publication Publication Date Title
CN105159831A (en) Method for automatically monitoring quality of software code
US20200264759A1 (en) Horticultural care tracking, validation and verification
CN105528294B (en) The method and system that a kind of interface testing use-case automatically generates
CN104461671A (en) Method and system for periodically managing code modification report
US20180213046A1 (en) Organization, Analysis, and Management of Digital Interactions on Networked Computers
CN105677332A (en) Software developing requirement management system
CN101859303A (en) Metadata management method and management system
US10990359B2 (en) Use and advancements of assistive technology in automation for the visually-impaired workforce
CN109961156A (en) A kind of substation equipment point detection system development approach
CN115712623A (en) Batch data fault-tolerant acquisition method based on capture metadata change
CN116662441A (en) Distributed data blood margin construction and display method
CN109343863B (en) Interface configuration method and system for HDFS (Hadoop distributed File System) permission
CN110032570A (en) A kind of spatial data dynamic update system based on B/S framework
CN114185791A (en) Method, device and equipment for testing data mapping file and storage medium
CN101931525A (en) Information security management resource positioning method and system
CN102426588A (en) Product collaborative design supporting method based on key factor
CN115599679A (en) Test rule base updating method and device, electronic equipment and storage medium
CN115309802A (en) User distribution thermodynamic diagram acquisition method and device, electronic equipment and storage medium
CN100409625C (en) Method for realizing executable test set in EPA protocol conformance test
CN103092841A (en) Method and device for processing data
Epelde et al. Quality of data measurements in the big data era: Lessons learned from MIDAS project
CN111209322A (en) Financial information acquisition and processing system and method
CN104462463A (en) JavaScript data access method based on SQL template
CN104881455A (en) Structural difference processing method and system based on MYSQL
CN204423422U (en) Based on the information collection apparatus of Internet of Things

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151216