CN108334448A - Code verification method, apparatus and equipment - Google Patents

Code verification method, apparatus and equipment Download PDF

Info

Publication number
CN108334448A
CN108334448A CN201810059836.7A CN201810059836A CN108334448A CN 108334448 A CN108334448 A CN 108334448A CN 201810059836 A CN201810059836 A CN 201810059836A CN 108334448 A CN108334448 A CN 108334448A
Authority
CN
China
Prior art keywords
code
tested
value
test
function
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.)
Granted
Application number
CN201810059836.7A
Other languages
Chinese (zh)
Other versions
CN108334448B (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.)
Taikang Insurance Group Co Ltd
Taikang Pension Insurance Co Ltd
Original Assignee
Taikang Insurance 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 Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201810059836.7A priority Critical patent/CN108334448B/en
Publication of CN108334448A publication Critical patent/CN108334448A/en
Application granted granted Critical
Publication of CN108334448B publication Critical patent/CN108334448B/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/3604Software analysis for verifying properties of programs
    • G06F11/3616Software analysis for verifying properties of programs using software metrics
    • 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/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A kind of code verification method, apparatus of offer of the embodiment of the present invention and equipment, this method include:Receive the code to be tested and the corresponding test information of the code to be tested that user is uploaded by development department's client;Determine the mass value of the code to be tested;When the mass value for determining the code to be tested is more than first threshold and determines that the test information meets preset requirement, the code to be tested and the test information are sent to test department client, so that the test department tests the code to be tested according to the test information.Code tester efficiency for raising.

Description

Code verification method, apparatus and equipment
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of code verification method, apparatus and equipment.
Background technology
Currently, after software code exploitation is completed, in order to ensure the accuracy of code, code is surveyed by needing Examination.
In the prior art, by the user (hereinafter referred development department) by development department into the exploitation of line code, by testing User's (hereinafter referred test department) in portion is into the test of line code.That is, after development department is complete by code development, by exploitation Code transfers to test department, and informs the achievable function of test department code and test request, by test department according to test request Code is tested.When the code quality that test department is given by development department is poor, test department needs to carry out excessive unnecessary Test, seriously affects testing progress, leads to code tester inefficiency.
Invention content
A kind of code verification method, apparatus of offer of the embodiment of the present invention and equipment, improve code tester efficiency.
In a first aspect, the embodiment of the present invention provides a kind of code verification method, including:
The code to be tested and the corresponding test of the code to be tested that reception user is uploaded by development department's client are believed Breath;
Determine the mass value of the code to be tested;
It is more than first threshold in the mass value for determining the code to be tested and determines that the test information meets default want When asking, the code to be tested and the test information are sent to test department client, so that the test department is according to the survey Examination information tests the code to be tested.
In a kind of possible embodiment, the mass value of the determination code to be tested, including:
Specification detection is carried out to the code to be tested by pre-set specifications detection instrument, with the determination code to be tested Normal value;
Function detection is carried out to the code to be tested, with the function value of the determination code to be tested;
According to the normal value and the function value, the mass value of the code to be tested is determined.
In alternatively possible embodiment, the specification detection includes at least one of following detection:Format is advised Model detection, syntax gauge detection, Naming conventions detection and dependence detection.
It is described that Function detection is carried out to the code to be tested in alternatively possible embodiment, described in determination The function value of code to be tested, including:
Allomeric function detection is carried out to the code to be tested, with the first function value of the determination code to be tested, institute State overall flow of the allomeric function detection for verifying the code to be tested;
Local function detection is carried out to the code to be tested, with the second function value of the determination code to be tested, institute State partial function of the local function detection for verifying the code to be tested;
According to first function value and second function value, the function value of the code to be tested is determined.
It is described according to the normal value and the function value in alternatively possible embodiment, it determines described to be measured The mass value of code is tried, including:
Obtain corresponding first weighted value of the normal value and corresponding second weighted value of the function value;
It is corresponded to according to the normal value, corresponding first weighted value of the normal value, the function value and the function value The second weighted value determine the mass value of the code to be tested.
In alternatively possible embodiment, the determination test information meets preset requirement, including:
Obtain integrity degree and the accuracy of the test information;
When the integrity degree is more than second threshold and the accuracy is more than third threshold value, measurement information is waited for described in determination Meet preset requirement.
In alternatively possible embodiment, the method further includes:
When the mass value for determining the code to be tested is less than or equal to the first threshold, sent to the development department First prompt message, the quality that first prompt message is used to indicate the code to be tested do not meet test request;
And/or
When determining that the test information is unsatisfactory for the preset requirement, the second prompt message is sent to the development department, Second prompt message is used to indicate the test information and is unsatisfactory for the preset requirement.
Second aspect, the embodiment of the present invention provide a kind of code verification device, including receiving module, determining module and transmission Module, wherein
The receiving module is used for, and receives code to be tested that user is uploaded by development department's client and described to be tested The corresponding test information of code;
The determining module is used for, and determines the mass value of the code to be tested;
The sending module is used for, and determines that the mass value of the code to be tested is more than the first threshold in the determining module Value and when determining that the test information meets preset requirement, to the test department client transmission code to be tested and the survey Information is tried, so that the test department tests the code to be tested according to the test information.
In a kind of possible embodiment, the determining module is specifically used for:
Specification detection is carried out to the code to be tested by pre-set specifications detection instrument, with the determination code to be tested Normal value;
Function detection is carried out to the code to be tested, with the function value of the determination code to be tested;
According to the normal value and the function value, the mass value of the code to be tested is determined.
In alternatively possible embodiment, the specification detection includes at least one of following detection:Format is advised Model detection, syntax gauge detection, Naming conventions detection and dependence detection.
In alternatively possible embodiment, the determining module is specifically used for:
Allomeric function detection is carried out to the code to be tested, with the first function value of the determination code to be tested, institute State overall flow of the allomeric function detection for verifying the code to be tested;
Local function detection is carried out to the code to be tested, with the second function value of the determination code to be tested, institute State partial function of the local function detection for verifying the code to be tested;
According to first function value and second function value, the function value of the code to be tested is determined.
In alternatively possible embodiment, the determining module is specifically used for:
Obtain corresponding first weighted value of the normal value and corresponding second weighted value of the function value;
It is corresponded to according to the normal value, corresponding first weighted value of the normal value, the function value and the function value The second weighted value determine the mass value of the code to be tested.
In alternatively possible embodiment, the determining module is specifically used for:
Obtain integrity degree and the accuracy of the test information;
When the integrity degree is more than second threshold and the accuracy is more than third threshold value, measurement information is waited for described in determination Meet preset requirement.
In alternatively possible embodiment, the sending module is additionally operable to, and is waited for described in determining module determination When testing the mass value of code and being less than or equal to the first threshold, the first prompt message is sent to the development department, described the The quality that one prompt message is used to indicate the code to be tested does not meet test request;
And/or
The sending module is additionally operable to, and determines that the test information is unsatisfactory for the preset requirement in the determining module When, the second prompt message is sent to the development department, second prompt message is used to indicate the test information and is unsatisfactory for institute State preset requirement.
Second aspect, the embodiment of the present invention provide a kind of computer readable storage medium, on computer readable storage medium It is stored with computer program, when the computer program is executed by processor, executes above-mentioned first aspect any one of them Method.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including processor and memory, wherein
The memory is for storing program instruction;
The processor is used to read the program instruction in the memory, and according to the program instruction in the memory Execute above-mentioned first aspect any one of them method.
Code verification method, apparatus and equipment provided in an embodiment of the present invention are receiving the to be tested of development department's upload After code and the corresponding test information of code to be tested, the mass value of code to be tested is determined, and determining code to be tested Mass value be more than first threshold and determine that when meeting preset requirement, code to be tested and survey are sent to test department for test information Information is tried, so that test department tests code to be tested according to test information.In above process, generation to be tested is being determined When the mass value of code is more than first threshold and determines that test information meets preset requirement, just code to be tested is sent to test department With test information, it may therefore be assured that the quality for the code to be tested that test department receives reach preset quality requirement, test letter Breath also meets preset requirement, avoids since the quality of code to be tested is excessively poor or test information is unsatisfactory for preset requirement, and Test department is caused to carry out excessive test job, and then the code tester efficiency improved.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Some bright embodiments for those of ordinary skill in the art without having to pay creative labor, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is the application scenarios schematic diagram of code verification method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of code verification method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of the mass value method of determination provided in an embodiment of the present invention code to be tested;
Fig. 4 is the structural schematic diagram of code verification device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the application scenarios schematic diagram of code verification method provided in an embodiment of the present invention, refers to Fig. 1, including open Hair portion client 101, verification system 102 and test department client 103.Wherein, development department's client 101 is usually located at exploitation The personnel in portion, development department can upload code to be tested and test information by development department's client 101 to verification system 102. It, can be to the quality of code to be tested after the code to be tested that verification system 102 receives the transmission of development department's client 101 It is verified, if verifying the off quality of code to be tested, prompt message can be sent to development department, so that development department continues Code quality is improved, if verifying the up-to-standard of code to be tested, code to be tested can be sent to test department client 103.After verification system 102 receives test information, whether can meet preset requirement with validation test information, if discontented Foot then sends prompt message to development department, so that development department continues to improve test information, if satisfied, then to test department client 103 send test information.It, can be according to test after test department client 103 receives code to be tested and test information Information tests code to be tested.
In this application, after development department's completion code exploitation, code to be measured and test information are uploaded to verification system System is verified code to be tested and test information by verification system, in verification system to code to be tested and test information It is verified and then code to be tested and test information is sent to test department, so that test department is treated according to test information Test code is tested.Since verification system verifies code to be tested and test, it may therefore be assured that test department The quality of the code to be tested received reaches preset quality requirement, test information also meets preset requirement, avoids due to waiting for The quality of test code is excessively poor or test information is unsatisfactory for preset requirement, and test department is caused to carry out excessive test job, And then the code tester efficiency improved.
In the following, technical solution shown in the application is described in detail by specific embodiment.Under it should be noted that The several specific embodiments in face can be combined with each other, and for same or analogous content, no longer carry out weight in various embodiments Multiple explanation.
Fig. 2 is the flow diagram of code verification method provided in an embodiment of the present invention.Refer to Fig. 2, this method can be with Including:
The code to be tested and the corresponding test of code to be tested that S201, reception user are uploaded by development department's client are believed Breath.
The executive agent of the embodiment of the present invention can be code verification device, which can be arranged in Fig. 1 Shown in verification system.Optionally, code verification device can be by software realization, alternatively, code verification device can be with Pass through being implemented in combination with for software and hardware.
Optionally, code to be tested is that development department's exploitation is completed, needs the code tested by test department.
Optionally, the corresponding test information of code to be tested refers to the method tested code to be tested and surveyed It tries to need information to be used etc. when code to be tested.
For example, test information may include testing process, test environment, test prioritization, test scope, code to be tested Involved in the information such as account number cipher.Certainly, in actual application, can be set according to actual needs in test information, The embodiment of the present invention is not especially limited this.
Optionally, can code to be tested be set in development department's client and uploads interface and test information upload interface, So that development department can upload interface by code to be tested uploads code to be tested, surveyed by testing information upload interface upload Try information.
Optionally, code to be tested uploads interface and test information uploads interface and can be realized by visualization interface, this Sample, development department easily can upload code to be tested by development department's client.
It should be noted that development department can upload code to be tested and test information simultaneously, can also first upload to be measured Try code, and to code verification to be tested by and then upload test information.The embodiment of the present invention is to uploading generation to be tested It is not especially limited at the time of code and test information.
S202, the mass value for determining code to be tested.
Optionally, the mass value of code to be tested is used to indicate the height of the quality of code to be tested, code to be tested Mass value is higher, and the quality of code to be tested is higher.
Optionally, the processing such as specification verification, functional verification can be carried out to code to be tested, to obtain code to be tested Mass value.
Wherein, for specification verification for verifying whether writing for code to be measured meets rule, functional verification is to be measured for verifying Whether examination code can complete preset function.
It should be noted that being said in the embodiment shown in fig. 3 to the method for the mass value of determination code to be tested Bright, it will not be described herein.
S203, it is more than first threshold in the mass value for determining the code to be tested and determines that test information meets and preset It is required that when, send code to be tested and test information to test department client so that test department according to test information to be tested Code is tested.
Optionally, preset requirement refers to the requirement tested information and need to meet.For example, preset requirement may include test letter The complete information of breath, the correctness etc. for testing information.Certainly, in actual application, it can be set according to actual needs this Preset requirement, the embodiment of the present invention are not especially limited this.
Optionally, when the accuracy that the integrity degree of determining test information is more than second threshold and tests information is more than third When threshold value, then it can determine and wait for that measurement information meets preset requirement.
The integrity degree of test information is used to indicate the integrated degree for the content that test information includes.For example, it is assumed that test It needs to include that the information of 10 types then tests the complete of information when it only includes the information of 8 types to test in information in information Whole degree is 0.8.
The accuracy of test information is used to indicate the order of accuarcy for the content that test information includes.For example, can pass through The format of content etc. that test information includes determines the accuracy of test information.
Optionally, when the mass value for determining code to be tested is less than or equal to first threshold, first is sent to development department Prompt message, the quality that the first prompt message is used to indicate code to be tested do not meet test request.
Optionally, when determining that test information is unsatisfactory for preset requirement, the second prompt message is sent to development department, second carries Show that information is used to indicate test information and is unsatisfactory for preset requirement.
Code verification method provided in an embodiment of the present invention, in the code to be tested and to be tested for receiving development department's upload After the corresponding test information of code, the mass value of code to be tested is determined, and determining that the mass value of code to be tested is more than First threshold and test information is determined when meeting preset requirement, code to be tested and test information are sent to test department, so as to survey Examination portion tests code to be tested according to test information.In above process, determining that the mass value of code to be tested is big In first threshold and when determining that test information meets preset requirement, code to be tested and test information just are sent to test department, because This, it is ensured that the quality for the code to be tested that test department receives reach preset quality requirement, test information also meets preset It is required that avoid due to the quality of code to be tested is excessively poor or test information be unsatisfactory for preset requirement, and cause test department into The excessive test job of row, and then the code tester efficiency improved.
On the basis of any one above-mentioned embodiment, optionally, it can be waited for by following feasible realization method determination The mass value (S202 in embodiment illustrated in fig. 2) for testing code, specifically, embodiment shown in Figure 3.
Fig. 3 is the flow chart of the mass value method of determination provided in an embodiment of the present invention code to be tested.Fig. 3 is referred to, This method may include:
S301, specification detection is carried out to code to be tested by pre-set specifications detection instrument, with determination code to be tested Normal value.
Optionally, pre-set specifications detection instrument can be existing plug-in unit, for example, pre-set specifications detection instrument can be Checkstyle plug-in units etc..
It should be noted that in actual application, pre-set specifications can be selected to detect work according to actual needs, this Inventive embodiments are not especially limited this.
Optionally, specification detection includes at least one of following detection:Format specification detection, syntax gauge detection, life The detection of name specification and dependence detection.
It should be noted that in actual application, specification detection can also include other types of detection, the present invention Embodiment is not especially limited this.
Optionally, the normal value of code to be tested can be determined by following feasible realization method:To code to be tested Format specification detection is carried out, to obtain the format specification value of code to be tested;Syntax gauge detection is carried out to code to be tested, with Obtain the syntax gauge detected value of code to be tested;Specification detection is named to code to be tested, to obtain code to be tested Naming conventions detected value;Dependence detection is carried out to code to be tested, the dependence to obtain code to be tested detects Value;Then it is determined according to format specification value, syntax gauge detected value, Naming conventions detected value, dependence detected value to be tested The normal value of code.
Optionally, format specification value, syntax gauge detected value, Naming conventions detected value, dependence detection can be set The weighted value of value, and according to format specification value, syntax gauge detected value, Naming conventions detected value, dependence detected value and every The corresponding weighted value of one detected value, determines the normal value of code to be tested.
S302, Function detection is carried out to code to be tested, with the function value of determination code to be tested.
Optionally, the function value of code to be tested can be determined by following feasible realization method:To code to be tested Allomeric function detection is carried out, with the first function value of determination code to be tested, allomeric function is detected for verifying code to be tested Overall flow;Local function detection is carried out to code to be tested, with the second function value of determination code to be tested, local function Detect the partial function for verifying code to be tested;According to the first function value and the second function value, code to be tested is determined Function value.
Allomeric function detection refer to verify code to be tested overall flow it is whether correct.Optionally, overall flow is detected Whether can correctly execute, whether detection can obtain expected result etc. by overall flow.
For example, it is assumed that code to be tested for realizing done through network, then allomeric function detection is for detecting whether can be real Now successfully place an order.
Code to be tested includes multiple function modules, local function detection refer to the function module of code to be tested into Capable detection.
For example, it is assumed that code to be tested is for realizing function module use done through network, that code to be tested includes Shopping cart is added in commodity in realizing, then local function detection can be:It detects whether successfully commodity to be added and do shopping Vehicle.
Optionally, can be that weighted value is arranged in the first function value and the second function value, correspondingly, can be according to the first function Value, the second function value, the corresponding weighted value of the first function value, the corresponding weighted value of the second function value determine the work(of code to be tested It can value.
S303, according to normal value and function value, determine the mass value of code to be tested.
Optionally, the mass value of code to be tested can be determined by following feasible realization method:Obtain normal value pair Corresponding second weighted value of the first weighted value and function value answered;According to normal value, corresponding first weighted value of normal value, function Value and corresponding second weighted value of function value determine the mass value of code to be tested.
Fig. 4 is the structural schematic diagram of code verification device provided in an embodiment of the present invention.Fig. 4 is referred to, which can be with Including receiving module 11, determining module 12 and sending module 13, wherein
The receiving module 11 is used for, and receives code to be tested that user is uploaded by development department's client and described to be measured Try the corresponding test information of code;
The determining module 12 is used for, and determines the mass value of the code to be tested;
The sending module 13 is used for, and determines that the mass value of the code to be tested is more than the first threshold in the determining module Value and when determining that the test information meets preset requirement, to the test department client transmission code to be tested and the survey Information is tried, so that the test department tests the code to be tested according to the test information.
Code verification device provided in an embodiment of the present invention can execute technical solution shown in above method embodiment, Realization principle and advantageous effect are similar, are no longer repeated herein.
In a kind of possible embodiment, the determining module 12 is specifically used for:
Specification detection is carried out to the code to be tested by pre-set specifications detection instrument, with the determination code to be tested Normal value;
Function detection is carried out to the code to be tested, with the function value of the determination code to be tested;
According to the normal value and the function value, the mass value of the code to be tested is determined.
In alternatively possible embodiment, the specification detection includes at least one of following detection:Format is advised Model detection, syntax gauge detection, Naming conventions detection and dependence detection.
In alternatively possible embodiment, the determining module 12 is specifically used for:
Allomeric function detection is carried out to the code to be tested, with the first function value of the determination code to be tested, institute State overall flow of the allomeric function detection for verifying the code to be tested;
Local function detection is carried out to the code to be tested, with the second function value of the determination code to be tested, institute State partial function of the local function detection for verifying the code to be tested;
According to first function value and second function value, the function value of the code to be tested is determined.
In alternatively possible embodiment, the determining module 12 is specifically used for:
Obtain corresponding first weighted value of the normal value and corresponding second weighted value of the function value;
It is corresponded to according to the normal value, corresponding first weighted value of the normal value, the function value and the function value The second weighted value determine the mass value of the code to be tested.
In alternatively possible embodiment, the determining module 12 is specifically used for:
Obtain integrity degree and the accuracy of the test information;
When the integrity degree is more than second threshold and the accuracy is more than third threshold value, measurement information is waited for described in determination Meet preset requirement.
In alternatively possible embodiment,
The sending module 13 is additionally operable to, and determines that the mass value of the code to be tested is less than or waits in the determining module When the first threshold, the first prompt message is sent to the development department, first prompt message is used to indicate described wait for The quality of test code does not meet test request;
And/or
The sending module 13 is additionally operable to, and determines that the test information is unsatisfactory for the preset requirement in the determining module When, the second prompt message is sent to the development department, second prompt message is used to indicate the test information and is unsatisfactory for institute State preset requirement.
Code verification device provided in an embodiment of the present invention can execute technical solution shown in above method embodiment, Realization principle and advantageous effect are similar, are no longer repeated herein.
The embodiment of the present invention also provides computer readable storage medium, and computer is stored on computer readable storage medium Program executes method shown in above method embodiment when the computer program is executed by processor.
Fig. 5 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.It refers to Fig. 5, including processor 21, deposits Reservoir 22 and communication bus 23, wherein the communication bus 23 is for realizing the connection between each component, the memory 22 For storing program instruction, the processor 21 is used to read the program instruction in the memory 22, and according to the storage Program instruction in device 22 executes method shown in above-mentioned any embodiment.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer read/write memory medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Finally it should be noted that:The above various embodiments is only to illustrate the technical solution of the embodiment of the present invention, rather than to it Limitation;Although the embodiment of the present invention is described in detail with reference to foregoing embodiments, those skilled in the art It should be understood that:Its still can with technical scheme described in the above embodiments is modified, either to which part or All technical features carries out equivalent replacement;And these modifications or replacements, it does not separate the essence of the corresponding technical solution this hair The range of bright example scheme.

Claims (10)

1. a kind of code verification method, which is characterized in that including:
Receive the code to be tested and the corresponding test information of the code to be tested that user is uploaded by development department's client;
Determine the mass value of the code to be tested;
It is more than first threshold in the mass value for determining the code to be tested and determines that the test information meets preset requirement When, the code to be tested and the test information are sent to test department client, so that the test department is according to the test Information tests the code to be tested.
2. according to the method described in claim 1, it is characterized in that, the mass value of the determination code to be tested, including:
Specification detection is carried out to the code to be tested by pre-set specifications detection instrument, with the rule of the determination code to be tested Typical value;
Function detection is carried out to the code to be tested, with the function value of the determination code to be tested;
According to the normal value and the function value, the mass value of the code to be tested is determined.
3. according to the method described in claim 2, it is characterized in that, specification detection includes at least one in following detection Kind:Format specification detection, syntax gauge detection, Naming conventions detection and dependence detection.
4. according to the method described in claim 2, it is characterized in that, described carry out Function detection to the code to be tested, with Determine the function value of the code to be tested, including:
Allomeric function detection is carried out to the code to be tested, it is described whole with the first function value of the determination code to be tested Body function detects the overall flow for verifying the code to be tested;
Local function detection is carried out to the code to be tested, with the second function value of the determination code to be tested, the office Portion's Function detection is used to verify the partial function of the code to be tested;
According to first function value and second function value, the function value of the code to be tested is determined.
5. according to claim 2-4 any one of them methods, which is characterized in that described according to the normal value and the function Value, determines the mass value of the code to be tested, including:
Obtain corresponding first weighted value of the normal value and corresponding second weighted value of the function value;
According to the normal value, corresponding first weighted value of the normal value, the function value and the function value corresponding Two weighted values determine the mass value of the code to be tested.
6. according to claim 1-4 any one of them methods, which is characterized in that the determination test information meets default It is required that including:
Obtain integrity degree and the accuracy of the test information;
When the integrity degree is more than second threshold and the accuracy is more than third threshold value, wait for that measurement information meets described in determination Preset requirement.
7. according to claim 1-4 any one of them methods, which is characterized in that the method further includes:
When the mass value for determining the code to be tested is less than or equal to the first threshold, first is sent to the development department Prompt message, the quality that first prompt message is used to indicate the code to be tested do not meet test request;
And/or
When determining that the test information is unsatisfactory for the preset requirement, the second prompt message is sent to the development department, it is described Second prompt message is used to indicate the test information and is unsatisfactory for the preset requirement.
8. a kind of code verification device, which is characterized in that including receiving module, determining module and sending module, wherein
The receiving module is used for, and receives code to be tested and the code to be tested that user is uploaded by development department's client Corresponding test information;
The determining module is used for, and determines the mass value of the code to be tested;
The sending module is used for, the determining module determine the code to be tested mass value be more than first threshold and When determining that the test information meets preset requirement, the code to be tested and test letter are sent to test department client Breath, so that the test department tests the code to be tested according to the test information.
9. a kind of computer readable storage medium, which is characterized in that computer program is stored on computer readable storage medium, When the computer program is executed by processor, perform claim requires 1~7 any one of them method.
10. a kind of electronic equipment, which is characterized in that including processor and memory, wherein
The memory is for storing program instruction;
The processor is used to read the program instruction in the memory, and is executed according to the program instruction in the memory Claim 1~7 any one of them method.
CN201810059836.7A 2018-01-22 2018-01-22 Code verification method, device and equipment Active CN108334448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810059836.7A CN108334448B (en) 2018-01-22 2018-01-22 Code verification method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810059836.7A CN108334448B (en) 2018-01-22 2018-01-22 Code verification method, device and equipment

Publications (2)

Publication Number Publication Date
CN108334448A true CN108334448A (en) 2018-07-27
CN108334448B CN108334448B (en) 2021-07-09

Family

ID=62925527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810059836.7A Active CN108334448B (en) 2018-01-22 2018-01-22 Code verification method, device and equipment

Country Status (1)

Country Link
CN (1) CN108334448B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582525A (en) * 2018-10-19 2019-04-05 京信通信系统(中国)有限公司 Test code verification method, verifying device, equipment and storage medium
CN110865934A (en) * 2019-10-08 2020-03-06 北京百度网讯科技有限公司 Code verification method and device, electronic equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2069920A1 (en) * 2006-09-29 2009-06-17 Siemens Aktiengesellschaft Method for the computer-assisted analysis of a software source code
US20110055799A1 (en) * 2009-09-01 2011-03-03 Accenture Global Services Limited Collection and processing of code development information
CN102043709A (en) * 2009-10-22 2011-05-04 上海杉达学院 Software test system
CN102446135A (en) * 2011-12-28 2012-05-09 深圳天源迪科信息技术股份有限公司 Software quality detection method
CN103793315A (en) * 2012-10-29 2014-05-14 Sap股份公司 Software development quality monitoring and improving system and method
CN104636252A (en) * 2015-01-04 2015-05-20 浪潮软件股份有限公司 Online code reviewing method and system based on SonarQube
US20160170859A1 (en) * 2006-05-12 2016-06-16 Phase Change Software Llc Generating and utilizing finite input output models, comparison of semantic models and software quality assurance
US20160253155A1 (en) * 2015-02-27 2016-09-01 The Treeline Company Apparatus and method for metaprogramming platform
CN106201861A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 The detection method of a kind of code quality and device
CN106897059A (en) * 2017-01-23 2017-06-27 中国电力科学研究院 A kind of intelligent grid Dispatching Control System software quality evaluation platform and evaluation method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160170859A1 (en) * 2006-05-12 2016-06-16 Phase Change Software Llc Generating and utilizing finite input output models, comparison of semantic models and software quality assurance
EP2069920A1 (en) * 2006-09-29 2009-06-17 Siemens Aktiengesellschaft Method for the computer-assisted analysis of a software source code
US20110055799A1 (en) * 2009-09-01 2011-03-03 Accenture Global Services Limited Collection and processing of code development information
CN102043709A (en) * 2009-10-22 2011-05-04 上海杉达学院 Software test system
CN102446135A (en) * 2011-12-28 2012-05-09 深圳天源迪科信息技术股份有限公司 Software quality detection method
CN103793315A (en) * 2012-10-29 2014-05-14 Sap股份公司 Software development quality monitoring and improving system and method
CN104636252A (en) * 2015-01-04 2015-05-20 浪潮软件股份有限公司 Online code reviewing method and system based on SonarQube
US20160253155A1 (en) * 2015-02-27 2016-09-01 The Treeline Company Apparatus and method for metaprogramming platform
CN106201861A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 The detection method of a kind of code quality and device
CN106897059A (en) * 2017-01-23 2017-06-27 中国电力科学研究院 A kind of intelligent grid Dispatching Control System software quality evaluation platform and evaluation method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582525A (en) * 2018-10-19 2019-04-05 京信通信系统(中国)有限公司 Test code verification method, verifying device, equipment and storage medium
CN109582525B (en) * 2018-10-19 2022-06-03 京信网络系统股份有限公司 Test code verification method, verification device, equipment and storage medium
CN110865934A (en) * 2019-10-08 2020-03-06 北京百度网讯科技有限公司 Code verification method and device, electronic equipment and readable storage medium
CN110865934B (en) * 2019-10-08 2023-10-27 北京百度网讯科技有限公司 Code verification method, device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN108334448B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN101916087B (en) Diagnostic testing system based on CANoe
CN107329890A (en) Test method and device based on Mock and server
CN111880508A (en) Automatic calibration and test method and device for T-box parameters
CN113407393B (en) Chip verification method, terminal device, verification platform and storage medium
CN107544463A (en) Automatic test method and test device for diagnosis function of vehicle controller
CN108459850B (en) Method, device and system for generating test script
TW201216048A (en) Test system
KR101982504B1 (en) Vehicle to everything communication conforming device
CN114168200B (en) System and method for verifying memory access consistency of multi-core processor
CN113572658A (en) Vehicle control signal testing method and device, electronic equipment and storage medium
CN107038120A (en) A kind of method for testing software and equipment
CN101354667B (en) Method for testing peripheral component interconnect bus level pressure
CN108334448A (en) Code verification method, apparatus and equipment
CN113760718A (en) Automatic testing method and device
CN104050054A (en) Processing method for installation package installation failure and cause determining method and device
CN113225760B (en) Network testing method and equipment
CN110888809B (en) Risk prediction method and device for test task
CN116755024A (en) Method and device for testing electric energy meter communication interface and readable storage medium
KR101862617B1 (en) System of testing iot sensor for power facility management
CN116048051A (en) Timeout verification method, device, equipment and storage medium
KR102016472B1 (en) Method and apparatus for measuring code coverage and computer readable recording medium having program the same
CN112905445B (en) Log-based test method, device and computer system
US20110282607A1 (en) Electrical continuity analyzer
CN111782499B (en) Test case generation method and system
CN112650672A (en) Model testing system, method and device based on Junit

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
TR01 Transfer of patent right

Effective date of registration: 20211105

Address after: Taikang Life Building, 156 fuxingmennei street, Xicheng District, Beijing 100031

Patentee after: TAIKANG INSURANCE GROUP Co.,Ltd.

Patentee after: TAIKANG PENSION INSURANCE Co.,Ltd.

Address before: Taikang Life Building, 156 fuxingmennei street, Xicheng District, Beijing 100031

Patentee before: TAIKANG INSURANCE GROUP Co.,Ltd.

TR01 Transfer of patent right