CN107678957A - A kind of Net silver code automatic checking method and device - Google Patents

A kind of Net silver code automatic checking method and device Download PDF

Info

Publication number
CN107678957A
CN107678957A CN201710873617.8A CN201710873617A CN107678957A CN 107678957 A CN107678957 A CN 107678957A CN 201710873617 A CN201710873617 A CN 201710873617A CN 107678957 A CN107678957 A CN 107678957A
Authority
CN
China
Prior art keywords
code
variable
sentence
checked
conditional
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
CN201710873617.8A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201710873617.8A priority Critical patent/CN107678957A/en
Publication of CN107678957A publication Critical patent/CN107678957A/en
Pending legal-status Critical Current

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/3604Software analysis for verifying properties of programs
    • G06F11/3616Software analysis for verifying properties of programs using software metrics

Abstract

The invention provides a kind of Net silver code automatic checking method and device, methods described to include:Target specification sentence is extracted from the development specifications of Net silver code, design specification and production defect;Wherein, the target specification sentence includes having mandatory order specification sentence, the specification sentence of suggestiveness, at least one of the specification sentence for having causal inference relation;Obtain the conditional-variable in the target specification sentence and/or logical variable and check rule to generate;The code to be checked of user's input is received, the code to be checked includes at least one of java codes, xml codes, sql codes, sh codes;Contained conditional-variable and/or processing logic are obtained in code to be checked, judges whether the conditional-variable in the code to be checked and/or processing logic with described check in rule corresponding conditional-variable and/or to handle logic consistent;As inconsistent, the conditional-variable in the code to be checked inconsistent with checking rule and/or processing logic are recorded and alarmed.

Description

A kind of Net silver code automatic checking method and device
Technical field
The present invention relates to code development technical field, more particularly to a kind of Net silver code automatic checking method and device.
Background technology
With enriching constantly for software product function, designing points and development specifications are more and more, meanwhile, new person and foreign aid Addition, cause the learning cost of coding criterion to be lifted, the cost of code and normalized checking also accordingly increases.And manually carry out generation By virtue of experience, omission risk be present, generally require high professional level, experienced old employee could have found asking for relatively deep in code Walkthrough Topic, but experienced old employee hours are also limited, it is impossible to participate in the Walkthrough of all tasks.Also, existing code check technology Mainly based on hand inspection, it is low to rely on experience, the Walkthrough efficiency of inspection personnel, and easily omits.
To solve the above problems, helping new person and foreign aid quickly to grasp coding criterion, reduce code development difficulty, generation is improved The efficiency of code check, reduces and omits risk, it is necessary to develop a kind of new code check scheme.
The content of the invention
In order to solve the above technical problems, the embodiments of the invention provide a kind of Net silver code automatic checking method and dress Put.
On the one hand, the embodiments of the invention provide a kind of Net silver code automatic checking method, methods described to include:
Target specification sentence is extracted from the development specifications of Net silver code, design specification and production defect;Wherein, the mesh Mark specification sentence, specification sentence, the specification language of tool causal inference relation of suggestiveness that specification sentence includes having mandatory order At least one of sentence;
Obtain the conditional-variable in the target specification sentence and/or logical variable and check rule to generate;
The code to be checked of user's input is received, the code to be checked includes java codes, xml codes, sql codes, sh generations At least one of code;
Conditional-variable contained in code to be checked and/or processing logic are obtained, judges that the condition in the code to be checked becomes Whether amount and/or processing logic are consistent with corresponding conditional-variable and/or processing logic in the inspection rule;
As inconsistent, the conditional-variable in the code to be checked inconsistent with checking rule and/or processing logic are remembered Record and alarm.
In one embodiment, the conditional-variable includes the noun in target specification sentence, and the logical variable includes Processing logic in target specification sentence.
In one embodiment, the development specifications and design specification include:Naming conventions, declarative specifications, specifications of annotation, In constant specification, bean definition standards, affairs specification, script specification, daily record specification, abnormality processing specification and Junit specifications It is at least one.
In one embodiment, the conditional-variable in the target specification sentence and/or logical variable are obtained to generate inspection Rule is looked into, including:
According to the target specification sentence be applicable scene, precondition and violate after influence and specification species, by institute State the conditional-variable in target specification sentence and/or logical variable checks rule as criterion, generation;
Wherein, the specification species includes wrong class specification, warning class specification and prompts class specification, and priority drops successively It is low.
In one embodiment, the content recorded includes:Check that path, name of code to be checked, error line number, mistake are retouched At least one of state.
On the other hand, the embodiment of the present invention additionally provides a kind of Net silver code automation inspection device, and described device includes:
Extraction unit, for extracting target specification language from the development specifications of Net silver code, design specification and production defect Sentence;Wherein, the target specification sentence pushes away including having the specification sentence of mandatory order, the specification sentence of suggestiveness, tool cause and effect At least one of specification sentence by relation;
Check rule generating unit, for obtain conditional-variable in the target specification sentence and/or logical variable with Generation checks rule;
UI units, for receive user input code to be checked, the code to be checked include java codes, xml codes, At least one of sql codes, sh codes;
Code checking unit, for obtaining conditional-variable contained in code to be checked and/or processing logic, treated described in judgement Whether conditional-variable and/or processing logic in inspection code patrol with corresponding conditional-variable and/or processing in the inspection rule Collect consistent;
Alarm-logging unit, for when the conditional-variable in the code to be checked and/or processing logic whether with the inspection When looking into rule corresponding conditional-variable and/or inconsistent processing logic, by the code to be checked inconsistent with checking rule Conditional-variable and/or processing logic are recorded and alarmed.
In one embodiment, the conditional-variable includes the noun in target specification sentence, and the logical variable includes Processing logic in target specification sentence.
In one embodiment, the development specifications and design specification include:Naming conventions, declarative specifications, specifications of annotation, In constant specification, bean definition standards, affairs specification, script specification, daily record specification, abnormality processing specification and Junit specifications It is at least one.
In one embodiment, check that rule generating unit is specifically used for:
According to the target specification sentence be applicable scene, precondition and violate after influence and specification species, by institute State the conditional-variable in target specification sentence and/or logical variable checks rule as criterion, generation;
Wherein, the specification species includes wrong class specification, warning class specification and prompts class specification, and priority drops successively It is low.
In one embodiment, the content recorded includes:Check that path, name of code to be checked, error line number, mistake are retouched At least one of state.
The embodiment of the present invention plays supervisory role for the execution and inspection of Net silver code development design specification, while reduces volume Code cost;Development efficiency is improved, checks that efficiency runs through whole batch by being brought up to during 1000 line codes/people 2 hours by original Code;Also, Net silver code is checked using the embodiment of the present invention, the quality of Net silver product is significantly improved.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of Net silver code automatic checking method provided in an embodiment of the present invention;
Fig. 2 is the structural representation of Net silver code automation inspection device provided in an embodiment of the present invention;
Fig. 3 is the dialog box schematic diagram of selection engineering project provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram provided in an embodiment of the present invention being marked in sidebar;
Fig. 5 is the schematic diagram provided in an embodiment of the present invention being marked in marker assemblies panel;
Fig. 6 is the schematic diagram provided in an embodiment of the present invention being marked in the console.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
Before code development is finished, tested, it usually needs manually normalized checking is carried out to code, during hand inspection Entirely by rule of thumb, omission risk be present.Therefore, in order to improve Code Review efficiency, reduce and omit risk, the embodiment of the present invention provides A kind of method and device of code automation inspection, described in face embodiment specific as follows.
Fig. 1 is a kind of schematic flow sheet of code automatic checking method provided in an embodiment of the present invention, as shown in figure 1, This method mainly includes the following steps that:
Step 101, target specification sentence is extracted from the development specifications of Net silver code, design specification and production defect.Its In, the target specification sentence includes the specification sentence, the specification sentence of suggestiveness, tool causal inference relation for having mandatory order Specification sentence.
, can be current according to judgement is remitted with the presence or absence of some specific words in a certain sentence when extracting target specification sentence Whether sentence is the specification sentence to be extracted (that is, target specification sentence), on different types of specification sentence, specific vocabulary There is difference in selection, described in face content specific as follows.
For example, the specification sentence for having mandatory order refers to comprising rule that the vocabulary such as, must forbid, can not avoid, be sure to Model sentence, such code requirement must be followed strictly and performed, once violating this specification, will cause the program of running the code Generation significant problem, therefore there is limit priority in inspection.
Suggestiveness specification sentence, which refers to exist, to be recommended, suggests or do not recommend, it is not recommended that implication specification sentence, such as comprising The sentence of vocabulary such as need, suggest, recommending, the specification sentence requirement comprising such vocabulary represents best practices, optimal usage, If tested code violates such code requirement, functional issues will not be caused to program and system, but might have NOT function Can property defect, code performance, O&M, High Availabitity, customer experience or other in terms of be likely to result in inconvenience.
Specification sentence with clear and definite causal inference relation refer to comprising for example " when ... then ... ", " if ... so ... " Deng and other similar to the specification sentence of word, the sentence comprising such vocabulary, which represents, sets certain causality, if Code violates such code requirement, will not cause functional impact to program and the system for running the program, but may drop Low execution efficiency.Such as:For circulations are general it is not recommended that more than 3 layer depths, if it exceeds 4 layers, may it not influence functionally, But from performance perspective, it may result in the problems such as execution efficiency declines.Again such as:The use of database connection, is connected to use After the completion of the reference of ResultSet, Statement, Connection to object must be closed in finnaly, otherwise may Resource is caused not discharge, extreme case is to cause resource exhaustion.Also various file streams, Socket streams, after the completion of read-write, InputStream and outputStream must be closed, otherwise resource can be caused to discharge in time.
Step 102, the conditional-variable in the target specification sentence and/or logical variable are obtained and checks rule to generate.
In one embodiment, above-mentioned conditional-variable includes the noun in target specification sentence, and logical variable includes mesh Mark the processing logic in specification sentence., can be by institute in the specification sentence when analyzing the target specification sentence extracted Comprising noun correspond in the conditional-variable of program, comprising verb correspond in the processing logic of program, such as bar Part judgement, circulation etc..
Such as:
Rule:In database connection pool persistence.xml, maxIdle value and maxActive value are equal.
We can extract vocabulary:
Verb:It is equal
Noun 1:persistence.xml
Noun 2:MaxIdle value
Noun 3:MaxAcitve value
So our rule is exactly:
1st, file is found according to filename " persistence.xml "
2nd, maxIdle value is obtained
3rd, maxActive value is obtained
4th, judged:if(maxIdle!=maxActive)
5th, throw exception, log etc. act
Step 103, the code to be checked of user's input is received.The code to be checked includes java codes, xml codes, sql generations At least one of code, sh codes.
Step 104, conditional-variable contained in code to be checked and/or processing logic are obtained, is judged in the code to be checked Conditional-variable and/or processing logic whether with it is described check rule in corresponding conditional-variable and/or processing logic it is consistent.
After code to be checked is received, scanning includes all codes that can be performed and compile such as java, xml, sql, sh, Determine whether violate check rule part, only when conditional-variable all in code to be checked, processing logic respectively with inspection Corresponding conditional-variable, processing logic difference are consistent in rule, just can determine that code to be checked meets the development specifications of Net silver code And design specification, in the absence of production defect, terminate to check (step 106).
Step 105, as inconsistent, the conditional-variable in the code to be checked inconsistent with checking rule and/or processing are patrolled Collect and recorded and alarmed.
The embodiment of the present invention plays supervisory role for the execution and inspection of Net silver code development design specification, while reduces volume Code cost;Development efficiency is improved, checks that efficiency runs through whole batch by being brought up to during 1000 line codes/people 2 hours by original Code;Also, Net silver code is checked using the embodiment of the present invention, the quality of Net silver product is significantly improved.
In one embodiment, above-mentioned development specifications, design specification include:Naming conventions, declarative specifications, annotation rule In model, constant specification, bean definition standards, affairs specification, script specification, daily record specification, abnormality processing specification and Junit specifications At least one.
After rule is checked using step 101 and step 102 generation, such as current not more new production design specification, also do not produce Raw new production defect, check that rule can repeatedly use.If over the development of technology, gradually propose that new production is set Specification is counted, generates new production defect, design specification, production defect renewal check gauge can be produced according to caused by these are new Then, more comprehensively to be checked Net silver code.
In one embodiment, after target specification sentence is obtained, when generation checks regular, it usually needs clearly following interior Hold:The applicable scene of the specification, the precondition used, violate the influence after the specification, whether can be with regularization, specification species Deng key content, after clear and definite above content, the conditional-variable in target specification sentence and/or logical variable are marked as judgement Standard, generation check rule.Wherein, above-mentioned specification species includes wrong class specification, warning class specification and prompts class specification, this three kinds The priority of specification reduces successively.When it is implemented, the specification sentence for having mandatory order is generally divided into wrong class specification, The specification sentence of suggestiveness is divided into warning class specification, and the specification sentence for having causal inference relation is divided into prompting class rule Model.
In one embodiment, when whether the conditional-variable in code to be checked and/or processing logic are regular with above-mentioned inspection In corresponding conditional-variable and/or during inconsistent processing logic, it is necessary to by with checking the bar in the inconsistent code to be checked of rule Part variable and/or processing logic recorded and alarmed, the content recorded comprise at least check path, name of code to be checked, One or more in error line number, error description, in order to which developer checks.
The embodiment of the present invention plays supervisory role for the execution and inspection of Net silver code development design specification, while reduces volume Code cost;Development efficiency is improved, checks that efficiency runs through whole batch by being brought up to during 1000 line codes/people 2 hours by original Code;Also, Net silver code is checked using the embodiment of the present invention, the quality of Net silver product is significantly improved. Using the embodiment of the present invention, solve the problems, such as that Net silver code hand inspection efficiency is low, easily omit, while improve Net silver The quality of product.
Based on also being provided with the automatic checking method identical inventive concept of Net silver code shown in Fig. 1, the embodiment of the present invention A kind of Net silver code automation inspection device, as shown in example below.Because the device solves net in the principle of problem and Fig. 1 Silver-colored code automatic checking method is similar, therefore the implementation of the equipment may refer to Fig. 1 Net silver code automatic checking methods Implement, repeat part and repeat no more.
In another embodiment, present invention also offers a kind of silver-colored code automation inspection device, apparatus structure signal As indicated with 2, it mainly includes figure:Extraction unit 201, check rule generating unit 202, UI (user interface) unit 203, code Inspection unit 204 and alarm-logging unit 205.
Wherein, extraction unit 201 is used to extract target from the development specifications of Net silver code, design specification and production defect Specification sentence;Wherein, the target specification sentence includes specification sentence, specification sentence, the tool of suggestiveness for having mandatory order At least one of specification sentence of causal inference relation.
Check that rule generating unit 202 is used to obtain the conditional-variable and/or logical variable in the target specification sentence Rule is checked with generation.
UI units 203 be used for receive user input code to be checked, the code to be checked include java codes, xml codes, At least one of sql codes, sh codes.
Code checking unit 204 is used to obtain conditional-variable contained in code to be checked and/or handles logic, described in judgement Whether conditional-variable in code to be checked and/or processing logic with described check corresponding conditional-variable and/or processing in rule Logic is consistent.
Alarm-logging unit 205 be used for work as the code to be checked in conditional-variable and/or processing logic whether with it is described When checking in rule corresponding conditional-variable and/or inconsistent processing logic, by with checking in the inconsistent code to be checked of rule Conditional-variable and/or processing logic recorded and alarmed.
In one embodiment, the conditional-variable includes the noun in target specification sentence, and the logical variable includes Processing logic in target specification sentence.
In one embodiment, the development specifications and design specification include:Naming conventions, declarative specifications, specifications of annotation, In constant specification, bean definition standards, affairs specification, script specification, daily record specification, abnormality processing specification and Junit specifications It is at least one.
In one embodiment, check that rule generating unit 202 is specifically used for being applicable according to the target specification sentence Influence and specification species after scene, precondition and violation, by the conditional-variable and/or logic in the target specification sentence Variable checks rule as criterion with generation.Wherein, the specification species include wrong class specification, warning class specification and Class specification is prompted, priority reduces successively.
In one embodiment, the content that alarm-logging unit 205 is recorded includes:Check path, name of code to be checked, Malfunction at least one of line number, error description.
Using Net silver code automatic checking method provided in an embodiment of the present invention, said apparatus being designed to, one can The APP applications used in terminal, can also be designed to an Eclipse plug-in units, with the related generation to be checked to Net silver product Code is checked.Preferably to be illustrated to technical solution of the present invention, the embodiment of the present invention is special according to the code of Net silver product Point and exploitation design specification, an Eclipse plug-in units are designed to by above-mentioned Net silver code automation inspection device.Specific design When, plug-in extension is carried out on Eclipse further menu using menu Action (menu action);Then dialog is passed through (dialog box component) carries out engineering selection, supports single choice and multiselect;Optimize customer experience using progress (progress monitoring bar), The mark of inspection result is carried out using marker (marker assemblies);By programming Control, in program norm it is not recommended that using But not the code symbol to report an error is warning (warning) class specification, is for the code symbol clearly forbidden in program norm Error (mistake) class specification, it is info (prompting) class specification for having the code symbol of causal inference relation in program norm; Using console (console) log, record content includes review time, the Program path checked and title, error row Number and specific mistake etc..
When it is implemented, user interface (including menu, button, selection dialog box etc.) selection that user passes through Eclipse The scope of code and some options of inspection etc. are checked, for example, as user is want to being checked in a certain engineering project, it is necessary to first Choose engineering project to be checked, source code scope, test mode, the conditional parameter etc. checked.As user is intended to in AutoHandler Code checked, it is necessary to first choose this engineering project of AutoHandler, select dialog box to can be found in Fig. 3.It is determined that generation After code examination scope, engineering project that code automation inspection plug-in unit selects according to user scans the generation in engineering project to be checked Code, rule is checked according to judging whether code meets inspection rule with reference to default, inspection is prompted and responded after finishing.
Suggestion content includes mark of code etc., can be reminded by marker assemblies, to prompt developer to be detected code hair Warning or error problems have been given birth to, and have prompted whether developer's console outputs daily record etc..The mode of response include with Under it is several:The sidebar that error code row is corresponded in IDE is marked (example as shown in Figure 4);Or in maker panels Being shown in (marker summary information), display content generally includes error description, filename, path, code line, type, Details are with reference to figure 5;Or the path of misprint code and line number in the console, the content with reference to shown in figure 6.
When being checked using the embodiment of the present invention code, emphasis is that the Walkthrough stage, (exploitation was completed, before testing Stage).Traditional code walkthrough take centralization artificial Walkthrough mode be:Developer, Walkthrough personnel etc. are convened in meeting Code walkthrough is carried out in room.This mode takes time and effort, and poor effect.It is using Walkthrough mode of the invention:1) select The machine of Walkthrough.Directly in the local computing of developer or the special Walkthrough computer of group;2) from version control server It is upper to download the code (be the code that all codes or selected part of batch are concerned about) for needing Walkthrough;3) run Automate code check instrument (i.e. above-mentioned code detection plug-in unit);4) inspection result is checked.
Using technical scheme provided in an embodiment of the present invention, execution for the exploitation design specification of Net silver code and check To supervisory role, while reduce coding cost;Each stage of engineering activity is incorporated, forms that " development phase checks oneself-functional test Department spot-check before team's Walkthrough-operation " three-level inspection system;Development efficiency is lifted, by code check efficiency by original 1000 2 hours codes for running through whole batch are brought up to during line code/people, preresearch estimates, Code Review workload are saved about per batch 200 man days, batch production capacity improve about 15%;The quality of Net silver product has been obviously improved, since each batch is applied, same problems The problems such as bug rates are reduced to 0, row lock, ^M no longer occurs.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Apply specific embodiment in the present invention to be set forth the principle and embodiment of the present invention, above example Explanation be only intended to help understand the present invention method and its core concept;Meanwhile for those of ordinary skill in the art, According to the thought of the present invention, there will be changes in specific embodiments and applications, in summary, in this specification Appearance should not be construed as limiting the invention.

Claims (10)

1. a kind of Net silver code automatic checking method, it is characterised in that methods described includes:
Target specification sentence is extracted from the development specifications of Net silver code, design specification and production defect;Wherein, the target rule Specification sentence that model sentence includes having mandatory order, the specification sentence of suggestiveness, have in the specification sentence of causal inference relation At least one;
Obtain the conditional-variable in the target specification sentence and/or logical variable and check rule to generate;
The code to be checked of user's input is received, the code to be checked is included in java codes, xml codes, sql codes, sh codes At least one;
Obtain in code to be checked contained conditional-variable and/or processing logic, judge conditional-variable in the code to be checked with/ Or whether processing logic is consistent with corresponding conditional-variable and/or processing logic in the inspection rule;
As inconsistent, the conditional-variable in the code to be checked inconsistent with checking rule and/or processing logic are recorded simultaneously Alarm.
2. Net silver code automatic checking method according to claim 1, it is characterised in that the conditional-variable includes mesh The noun in specification sentence is marked, the logical variable includes the processing logic in target specification sentence.
3. Net silver code automatic checking method according to claim 1, it is characterised in that the development specifications and design Specification includes:Naming conventions, declarative specifications, specifications of annotation, constant specification, bean definition standards, affairs specification, script specification, At least one of daily record specification, abnormality processing specification and Junit specifications.
4. Net silver code automatic checking method according to claim 1, it is characterised in that obtain the target specification language Conditional-variable and/or logical variable in sentence check rule to generate, including:
According to the target specification sentence be applicable scene, precondition and violate after influence and specification species, by the mesh Mark the conditional-variable in specification sentence and/or logical variable checks rule as criterion, generation;
Wherein, the specification species includes wrong class specification, warning class specification and prompting class specification, priority reduces successively.
5. Net silver code automatic checking method according to claim 4, it is characterised in that the content recorded includes: Check at least one of path, name of code to be checked, error line number, error description.
6. a kind of Net silver code automation inspection device, it is characterised in that described device includes:
Extraction unit, for extracting target specification sentence from the development specifications of Net silver code, design specification and production defect;Its In, the target specification sentence includes the specification sentence, the specification sentence of suggestiveness, tool causal inference relation for having mandatory order At least one of specification sentence;
Rule generating unit is checked, for obtaining conditional-variable in the target specification sentence and/or logical variable to generate Check rule;
UI units, for receiving the code to be checked of user's input, the code to be checked includes java codes, xml codes, sql generations At least one of code, sh codes;
Code checking unit, for obtaining conditional-variable contained in code to be checked and/or processing logic, judge the generation to be checked Whether conditional-variable and/or processing logic in code check corresponding conditional-variable in rule and/or handle logic one with described Cause;
Alarm-logging unit, for when the conditional-variable in the code to be checked and/or processing logic whether with the check gauge Corresponding conditional-variable and/or during inconsistent processing logic in then, by with checking the condition in the inconsistent code to be checked of rule Variable and/or processing logic are recorded and alarmed.
7. Net silver code automation inspection device according to claim 6, it is characterised in that the conditional-variable includes mesh The noun in specification sentence is marked, the logical variable includes the processing logic in target specification sentence.
8. Net silver code automation inspection device according to claim 6, it is characterised in that the development specifications and design Specification includes:Naming conventions, declarative specifications, specifications of annotation, constant specification, bean definition standards, affairs specification, script specification, At least one of daily record specification, abnormality processing specification and Junit specifications.
9. Net silver code automation inspection device according to claim 6, it is characterised in that check rule generating unit tool Body is used for:
According to the target specification sentence be applicable scene, precondition and violate after influence and specification species, by the mesh Mark the conditional-variable in specification sentence and/or logical variable checks rule as criterion, generation;
Wherein, the specification species includes wrong class specification, warning class specification and prompting class specification, priority reduces successively.
10. Net silver code automation inspection device according to claim 9, it is characterised in that the content recorded includes: Check at least one of path, name of code to be checked, error line number, error description.
CN201710873617.8A 2017-09-25 2017-09-25 A kind of Net silver code automatic checking method and device Pending CN107678957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710873617.8A CN107678957A (en) 2017-09-25 2017-09-25 A kind of Net silver code automatic checking method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710873617.8A CN107678957A (en) 2017-09-25 2017-09-25 A kind of Net silver code automatic checking method and device

Publications (1)

Publication Number Publication Date
CN107678957A true CN107678957A (en) 2018-02-09

Family

ID=61137061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710873617.8A Pending CN107678957A (en) 2017-09-25 2017-09-25 A kind of Net silver code automatic checking method and device

Country Status (1)

Country Link
CN (1) CN107678957A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491884A (en) * 2018-09-26 2019-03-19 平安普惠企业管理有限公司 Code method for testing performance, device, computer equipment and medium
CN109508185A (en) * 2018-11-16 2019-03-22 中国银行股份有限公司 A kind of Code Review method and apparatus
CN110109661A (en) * 2019-05-09 2019-08-09 深圳美美网络科技有限公司 A kind of development approach and development system of service logic
CN110134579A (en) * 2019-01-18 2019-08-16 北京车和家信息技术有限公司 Code check method and apparatus
CN110610389A (en) * 2018-06-14 2019-12-24 上海汽车集团股份有限公司 Target standard determination method and device
CN110688307A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 JavaScript code detection method, apparatus, device and storage medium
CN111752923A (en) * 2020-06-28 2020-10-09 中国银行股份有限公司 Script monitoring method and device
CN112597029A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Standard inspection system, method, device and medium
CN113672517A (en) * 2021-09-06 2021-11-19 网易(杭州)网络有限公司 Code checking method and device, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678118A (en) * 2013-10-18 2014-03-26 北京奇虎测腾科技有限公司 Method and device for compliance detection of Java source code
CN106294164A (en) * 2016-08-15 2017-01-04 中国银行股份有限公司 A kind of code check method and device
CN106371997A (en) * 2016-09-07 2017-02-01 网易(杭州)网络有限公司 Code checking method and device
US20200033952A1 (en) * 2014-09-23 2020-01-30 Fitbit, Inc. Methods, systems, and apparatuses to update screen content responsive to user gestures

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678118A (en) * 2013-10-18 2014-03-26 北京奇虎测腾科技有限公司 Method and device for compliance detection of Java source code
US20200033952A1 (en) * 2014-09-23 2020-01-30 Fitbit, Inc. Methods, systems, and apparatuses to update screen content responsive to user gestures
CN106294164A (en) * 2016-08-15 2017-01-04 中国银行股份有限公司 A kind of code check method and device
CN106371997A (en) * 2016-09-07 2017-02-01 网易(杭州)网络有限公司 Code checking method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110610389A (en) * 2018-06-14 2019-12-24 上海汽车集团股份有限公司 Target standard determination method and device
CN109491884A (en) * 2018-09-26 2019-03-19 平安普惠企业管理有限公司 Code method for testing performance, device, computer equipment and medium
CN109508185A (en) * 2018-11-16 2019-03-22 中国银行股份有限公司 A kind of Code Review method and apparatus
CN110134579A (en) * 2019-01-18 2019-08-16 北京车和家信息技术有限公司 Code check method and apparatus
CN110109661A (en) * 2019-05-09 2019-08-09 深圳美美网络科技有限公司 A kind of development approach and development system of service logic
CN110688307A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 JavaScript code detection method, apparatus, device and storage medium
CN110688307B (en) * 2019-09-09 2023-11-17 国信金宏信息咨询有限责任公司 JavaScript code detection method, device, equipment and storage medium
CN111752923A (en) * 2020-06-28 2020-10-09 中国银行股份有限公司 Script monitoring method and device
CN112597029A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Standard inspection system, method, device and medium
CN113672517A (en) * 2021-09-06 2021-11-19 网易(杭州)网络有限公司 Code checking method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN107678957A (en) A kind of Net silver code automatic checking method and device
US9460408B2 (en) Method and apparatus for generating test scenarios for a set of business rules
CN110764753A (en) Business logic code generation method, device, equipment and storage medium
US6941546B2 (en) Method and apparatus for testing a software component using an abstraction matrix
US6986125B2 (en) Method and apparatus for testing and evaluating a software component using an abstraction matrix
US9372671B2 (en) Modeling and code generation for SQL-based data transformations
US8731896B2 (en) Virtual testbed for system verification test
Barbosa et al. Test case generation from mutated task models
US20170228306A1 (en) Method of, and apparatus for, testing computer hardware and software
CN106776326B (en) Modeling method and system of data analysis model
Chen et al. Automatic fault tree derivation from little-jil process definitions
Schaffner Programming for Experimental Economics: Introducing CORAL-a lightweight framework for experimental economic experiments
Picoco et al. A framework for verifying Dynamic Probabilistic Risk Assessment models
Coppola et al. Maintenance of android widget-based gui testing: A taxonomy of test case modification causes
CN107704389B (en) Page testing method and device
Dalal et al. Software Testing-Three P'S Paradigm and Limitations
Melani Black Box Testing Using Equivalence Partition Method in Sintana Application
Canny et al. Engineering model-based software testing of WIMP interactive applications: a process based on formal models and the SQUAMATA tool
CN112433947A (en) Chaos engineering method and system based on network data
Tang et al. A tool for rejuvenating feature logging levels via git histories and degree of interest
Pruttianan et al. Ontology to guide scenario design to evaluate new technologies for control room modernization
Nagowah et al. Automated complete test case coverage for web based applications
CN115981989A (en) Unit test case generation method, device, equipment and storage medium
Liang et al. Identification of Human Operation Deviation Using a Conformance Checking Technique
CN106649106A (en) Test case generation method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180209