CN107179926A - Database software upgrading detecting system and method based on dynamic programming algorithm - Google Patents

Database software upgrading detecting system and method based on dynamic programming algorithm Download PDF

Info

Publication number
CN107179926A
CN107179926A CN201710292110.3A CN201710292110A CN107179926A CN 107179926 A CN107179926 A CN 107179926A CN 201710292110 A CN201710292110 A CN 201710292110A CN 107179926 A CN107179926 A CN 107179926A
Authority
CN
China
Prior art keywords
database
software
sentence
information
dynamic programming
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
CN201710292110.3A
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.)
State Grid Corp of China SGCC
State Grid Sichuan Electric Power Co Ltd
Nari Information and Communication Technology Co
Nanjing NARI Group Corp
Original Assignee
State Grid Corp of China SGCC
State Grid Sichuan Electric Power Co Ltd
Nari Information and Communication Technology Co
Nanjing NARI Group Corp
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 State Grid Corp of China SGCC, State Grid Sichuan Electric Power Co Ltd, Nari Information and Communication Technology Co, Nanjing NARI Group Corp filed Critical State Grid Corp of China SGCC
Priority to CN201710292110.3A priority Critical patent/CN107179926A/en
Publication of CN107179926A publication Critical patent/CN107179926A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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

Abstract

The invention discloses a kind of database software upgrading detecting system and method based on dynamic programming algorithm, method comprises the following steps, according to oriented G- Design dynamic programming algorithm, the shortest path and critical path of database software upgrading are obtained, static test preferentially is carried out to shortest path and critical path;The ROMPaq sentence of software database to be tested is obtained, the change sentence in the ROMPaq sentence is intercepted;Obtain the initialization statement for having issued software database, and extraction database table corresponding with database table name in the change sentence and field information from the initialization statement;Whether executions of the detection change sentence is violated after the constraint information in database table and field information, continue to detect it is described change sentence whether the field type information in matching database table and field information.The present invention improves the software upgrading testing efficiency of database, reduces testing cost, has a good application prospect.

Description

Database software upgrading detecting system and method based on dynamic programming algorithm
Technical field
The present invention relates to software testing technology field, and in particular to a kind of database software liter based on dynamic programming algorithm Level detecting system and method.
Background technology
Generally, computer software is initial in design, because designer considers that comprehensive or program function is not endless It is kind, in the process of running, the problem of continuously emerging new.Some are failures caused by code vulnerabilities, and some are between software and hardware Emerging compatibility issue, also some are new demands that user proposes in use.These problems typically pass through software It is upgraded to the version of renewal to solve, additionally it is possible to improve performance, consummating function strengthens the competitiveness of software.Therefore, software upgrading It is further important in later maintenance, it is indispensable.
A series of versions of research and development of software issue, general to require that higher version supports the upgrading from lowest version, this is just It is software upgrading.Such as some software has issued the 2.0 liang big version of Version 1.0, Version;For Version 1.0 Some patch releases, such as Version 1.0Service Pack 1, Version 1.0Service have been issued respectively again Pack2 etc.;Some patch releases are issued for Version 2.0.(patch release is put aside by taking big edition upgrading as an example), should The software versions of Version 3.0 newly developed need to support that following upgrading path test is as follows:(1) support from 1.0 liters of Version Level arrives Version 3.0;(2) support to be upgraded to Version 3.0 from Version 2.0;(3) support from 1.0 liters of Version Level arrives Version 2.0, then is upgraded to Version 3.0;First two upgrading test path is obvious, latter upgrading test Path is also what is be actually needed, because the versions of Version 2.0 completely newly installed and upgrading what is obtained from Version 1.0 The versions of Version 2.0 can have differences, although this species diversity is often to feel unconspicuous for client, but Database structure in data with often having differences.As can be seen that with the increase of released version, edition upgrading test path Will be more and more.Assuming that issued n (n>=1) individual software version (there is n source version), then issue (n+1)th During software version, it is necessary to test upgrading path number be exactly C (n, 1)+C (n, 2)+C (n, 3)+...+C (n, n)=2^n-1.Separately Outside, if software support several operation systems are combined with type of database, such as in Windows+SQL Server/English, In Linux+Oracle/English, in Solaris+Oracle/English, then on upgrading test path again considers test environment (ω represents test environment number), test path number of combinations is just changed into ω (2^n-1).With increasing for number of versions, road is tested Footpath number can be described as explosive growth.Meanwhile, edition upgrading test is carried out, is required for by some processes (source version After this software installation, the generation of source version software master data and the generation of a certain amount of historical data, escalation process, and upgrading The links such as uniformity test), it is necessary to which the manpower of consumption is compared high with taking server resource.
At present, the test of edition upgrading process substantially successively undergoes three main periods:Upgrade failure period happening with increasing frequency, upgrading Failure proof initial stage, upgrading test return the phase.Edition upgrading test assignment is exactly to find failure, the modification event of upgraded module presence Barrier, validation fault, the updating software release that final output one is externally issued.In the upgrade failure period happening with increasing frequency, failure is more, upgrading Process can not be smoothed out.By facts have proved:Now incision automatic test is inappropriate, now needs tester's essence The heart excavates incipient fault, and automatic test is just cut after version is stablized relatively.Because during edition upgrading, being between each step Serially carry out.Therefore, initial stage is verified in upgrade failure period happening with increasing frequency and upgrade failure, uses a kind of semi-automatic test mode; The recurrence phase is verified in upgrading, full-automatic test mode is used.But, due in upgrade failure period happening with increasing frequency and upgrade failure checking Initial stage, using the semi-automatic test mode manually combined with automation, tests slower.If in upgrading detection (upgrade failure at initial stage Period happening with increasing frequency and upgrade failure verify initial stage), every upgrading path all goes detection, is similarly to the method for exhaustion, detection speed is slower, rises Level program error search efficiency is relatively low, needs a large amount of making times and manpower.
Especially during edition upgrading, database application test is needed under database instance (database positioning) Testing results use-case, and test result is also relevant with database positioning.Identical database structure is remembered in disparate databases data The lower disparate databases state formed of record, can cause the different test outputs of same test use-case, due to upgrading test group of paths Close number exponential increase, the also exponential increase therewith of database positioning number of combinations, in actual test, be also need a large amount of making times with Manpower, cost is very high.
For the technical problem of above-mentioned appearance, the software upgrade path search speed of database is slow during edition upgrading, Testing efficiency is low, the problem of cost is high, is the problem of being currently needed for solving.
The content of the invention
The purpose of the present invention is the software upgrade path search speed for overcoming database during edition upgrading in the prior art Degree is slow, and testing efficiency is low, the problem of cost is high.The upgrading detecting system of the database software based on dynamic programming algorithm of the present invention And method, the software upgrading testing efficiency for solving database is low, the problem of cost is high, and the software upgrading for improving database is surveyed Efficiency is tried, testing cost is reduced, has a good application prospect.
In order to achieve the above object, the technical solution adopted in the present invention is:
A kind of database software upgrading detecting system based on dynamic programming algorithm, it is characterised in that:Including being sequentially connected Design module, the first acquisition module, the second acquisition module and first detection module,
The design module, for according to oriented G- Design dynamic programming algorithm, choosing the most short of database software upgrading Path and critical path, preferentially carry out static test, shortest path and critical path are respectively to shortest path and critical path The minimum value and maximum of each side right value sum on digraph path;
First acquisition module, the ROMPaq sentence for obtaining software database to be tested intercepts the upgrading Change sentence in program statement, the change sentence is the software to be tested for the example transitions for having issued software database The sentence of the example of database;
Second acquisition module, the initialization statement of software database has been issued for obtaining, and from the initialization Database table corresponding with database table famous prime minister in the change sentence and field information, the database table are extracted in sentence And field information includes constraint information and field type information;
First detection module, for whether violating the database table and field in the execution for detecting the change sentence Whether the constraint information in information, and the detection change sentence match the field in the database table and field information Type information.
The foregoing upgrading detecting system of the database software based on dynamic programming algorithm, it is characterised in that:Also include judging Module and the second detection module,
The judge module is connected with the first acquisition module, first detection module respectively, for scanning the upgrading journey Sequence sentence, which whether there is, judges sentence;
Second detection module is connected with judge module, if for the judgement sentence existed, detection correspondence The execution of change sentence whether violate the constraint information.
The foregoing upgrading detecting system of the database software based on dynamic programming algorithm, it is characterised in that:It is described to have issued The software of having issued of software database includes an active version software for software under testing support in the software database to be tested, And issued the version number of software used in software and the software under testing and uniquely determine.
The foregoing upgrading detecting system of the database software based on dynamic programming algorithm, it is characterised in that:It is described to have issued The initialization statement of software database is the database statement that software database to be tested needs to perform.
The foregoing upgrading detecting system of the database software based on dynamic programming algorithm, it is characterised in that:The change language Sentence, at least including one below:INSERT sentences are inserted, DELETE sentences is deleted, updates UPDATE statement, creates CREATE languages Sentence, deletion table DROP sentences, modification ALTER sentences;The constraint information, at least including one below:Primary key, external key are about Beam, unique UNIQUE constraints, inspection CHECK constraints, default DEFAULT definition, permission null value;The field type information, extremely Include one below less:Field type, field Breadth Maximum.
A kind of database software upgrade detection method based on dynamic programming algorithm, it is characterised in that:Comprise the following steps,
Step (A), according to oriented G- Design dynamic programming algorithm, obtains the shortest path and key of database software upgrading Path, preferentially carries out static test, shortest path and critical path are digraph path respectively to shortest path and critical path The path of the minimum and maximum of upper each side right value sum;
Step (B), obtains the ROMPaq sentence of software database to be tested, intercepts the change in the ROMPaq sentence Sentence, the change sentence be issued software database example transitions be the software database to be tested example language Sentence;
Step (C), obtains the initialization statement for having issued software database, and extracted and the change from the initialization statement The corresponding database table of database table name and field information in more sentence, the database table and field information, including about Beam information and field type information;
Step (D), detects whether the execution of the change sentence violates the constraint letter in database table and field information After breath, continue to detect the change sentence whether the field type information in matching database table and field information.
The foregoing database software upgrade detection method based on dynamic programming algorithm, it is characterised in that:Step (B), also It whether there is including the scanning ROMPaq sentence and judge sentence;If the judgement sentence existed, detects the change Whether the execution of sentence violates the constraint information.
The foregoing database software upgrade detection method based on dynamic programming algorithm, it is characterised in that:Step (C), institute State issued software database to have issued software active including the institute that software under testing in the software database to be tested is supported Version software, and issued the version number of software used in software and the software under testing and uniquely determine.
The foregoing database software upgrade detection method based on dynamic programming algorithm, it is characterised in that:It is described to have issued The initialization statement of software database is the database statement that software database to be tested needs to perform.
The foregoing database software upgrade detection method based on dynamic programming algorithm, it is characterised in that:The change language Sentence, at least including one below:INSERT sentences are inserted, DELETE sentences is deleted, updates UPDATE statement, creates CREATE languages Sentence, deletion table DROP sentences, modification ALTER sentences;The constraint information, at least including one below:Primary key, external key are about Beam, unique UNIQUE constraints, inspection CHECK constraints, default DEFAULT definition, permission null value;The field type information, extremely Include one below less:Field type, field Breadth Maximum.
The beneficial effects of the invention are as follows:The present invention based on dynamic programming algorithm database software upgrading detecting system and Method, the software upgrading testing efficiency for solving database is low, the problem of cost is high, improves the software upgrading test of database Efficiency, reduces testing cost, realize rapidly, need not dynamically install and build test environment, can find that database should in advance With the static test of software upgrade procedure mistake, reduce to a certain extent because upgrading path explosive growth causes High cost test input risk, improve path and program error search efficiency, be discovery procedure mistake as early as possible, as early as possible will Updating software release is introduced to the market there is provided ensureing, is had a good application prospect.
Brief description of the drawings
Fig. 1 is the system block diagram of the upgrading detecting system of the database software based on dynamic programming algorithm of the present invention;
Fig. 2 is the flow chart of the database software upgrade detection method based on dynamic programming algorithm of the present invention;
Fig. 3 is the flow chart of third embodiment of the present invention database software upgrade detection method;
Fig. 4 is the scanning software data qurush to be tested of third embodiment of the present invention database software upgrade detection method The flow chart of level program;
Fig. 5 be third embodiment of the present invention database software upgrade detection method scanning issued software database at the beginning of The flow chart of beginning program;
Fig. 6 is the flow of the change statement error detection of third embodiment of the present invention database software upgrade detection method Figure.
Embodiment
Below in conjunction with Figure of description, the present invention is further illustrated.
As shown in figure 1, the upgrading detecting system of the database software based on dynamic programming algorithm of the present invention, including connect successively Design module 1, the first acquisition module 2, the second acquisition module 3 and the first detection module 4 connect,
The design module 1, for according to oriented G- Design dynamic programming algorithm, choosing the most short of database software upgrading Path and critical path, preferentially carry out static test, shortest path and critical path are respectively to shortest path and critical path The minimum value and maximum of each side right value sum on digraph path;
First acquisition module 2, the ROMPaq sentence for obtaining software database to be tested intercepts the upgrading Change sentence in program statement, the change sentence is the software to be tested for the example transitions for having issued software database The sentence of the example of database;
Second acquisition module 3, the initialization statement of software database has been issued for obtaining, and from the initialization Database table corresponding with database table famous prime minister in the change sentence and field information, the database table are extracted in sentence And field information includes constraint information and field type information;
First detection module 4, for whether violating the database table and word in the execution for detecting the change sentence Whether the constraint information in segment information, and the detection change sentence match the word in the database table and field information Segment type information.
It is preferred that the database software upgrading detecting system of the invention based on dynamic programming algorithm, in addition to judge module 5 and second detection module 6,
The judge module 5 is connected with the first acquisition module 2, first detection module 4 respectively, for scanning the upgrading Program statement, which whether there is, judges sentence;
Second detection module 6 is connected with judge module 5, if for the judgement sentence existed, detection pair Whether the execution for the change sentence answered violates the constraint information.
It is preferred that the software of issue for having issued software database include the software database to be tested in it is to be measured The active version software of institute of software support, and issued the version number of software used in software and the software under testing and uniquely determine.
It is preferred that the initialization statement for having issued software database for software database to be tested need perform number According to storehouse sentence.
It is preferred that the change sentence, at least including one below:Insert INSERT sentences, delete DELETE sentences, more New UPDATE statement, establishment CREATE sentences, deletion table DROP sentences, modification ALTER sentences;The constraint information, is at least wrapped Include one below:Primary key, foreign key constraint, unique UNIQUE constraints, inspection CHECK constraints, default DEFAULT are defined, permitted Perhaps null value;The field type information, at least including one below:Field type, field Breadth Maximum.
The upgrading detection module of the database software based on dynamic programming algorithm of the present invention, solves the software liter of database Level search speed is slow, and testing efficiency is low, the problem of cost is high, improves software upgrade path search speed and the test of database Efficiency, reduces testing cost.
Upgraded according to the database software of the above-mentioned database software upgrading detection module based on dynamic programming algorithm and examined Survey method, as shown in Fig. 2 comprise the following steps,
Step (A), according to oriented G- Design dynamic programming algorithm, obtains the shortest path and key of database software upgrading Path, preferentially carries out static test, shortest path and critical path are digraph path respectively to shortest path and critical path The path of the minimum and maximum of upper each side right value sum;
Step (B), obtains the ROMPaq sentence of software database to be tested, intercepts the change in the ROMPaq sentence Sentence, the change sentence be issued software database example transitions be the software database to be tested example language Sentence, this step also whether there is including the scanning ROMPaq sentence judges sentence;If the judgement sentence existed, Whether the execution of the detection change sentence violates the constraint information;
Step (C), obtains the initialization statement for having issued software database, and extracted and the change from the initialization statement The corresponding database table of database table name and field information in more sentence, the database table and field information, including about Beam information and field type information, the software of issue for having issued software database include the software database to be tested The active version software of institute that middle software under testing is supported, and it is unique to have issued the version number of software used in software and the software under testing It is determined that;The initialization statement for having issued software database is the database statement that software database to be tested needs to perform;
Step (D), detects whether the execution of the change sentence violates the constraint letter in database table and field information After breath, continue to detect the change sentence whether the field type information in matching database table and field information.
The change sentence, at least including one below:INSERT sentences are inserted, DELETE sentences is deleted, updates UPDATE statement, establishment CREATE sentences, deletion table DROP sentences, modification ALTER sentences;The constraint information, at least includes One below:Primary key, foreign key constraint, unique UNIQUE constraints, inspection CHECK constraints, default DEFAULT definition, permission Null value;The field type information, at least including one below:Field type, field Breadth Maximum.
The present invention the database software upgrade detection method based on dynamic programming algorithm, realize rapidly, need not move State is installed and builds test environment, the static test of DBAS ROMPaq mistake can be found in advance, certain Reduced in degree due to the risk of high cost test input caused by upgrading path explosive growth, improve path and program Search for errors efficiency, is discovery procedure mistake as early as possible, as early as possible introduces updating software release there is provided ensureing to the market.
Below according to the upgrading detecting system and method for the database software based on dynamic programming algorithm of the present invention, the is introduced The database software upgrade detection method of one embodiment, comprises the following steps,
Step (1), obtains the dynamic programming algorithm of shortest path and critical path, preferential to select shortest path and critical path Footpath carries out static test;
Step (2), obtains software database ROMPaq sentence to be tested, and database is got in the change sentence Table name;
Step (3), obtains and has issued software database initialization statement, obtaining step 2) obtained database table name correspondence Table and field information;
With the presence or absence of sentence is judged before step (4), the change sentence that detecting step (2) is obtained, judge that sentence purpose is Check whether the execution of the change sentence violates correspondence database table and field constraint information that step (3) is obtained;Continue to detect Whether the change sentence that step (3) is obtained violates each field type information of correspondence database table that step (3) is obtained.
Above-mentioned database software upgrade detection method, the step (1) is respectively on shortest path and critical path The path of the minimum and maximum of each side right value sum on digraph path;The step (2) is by number on databases comparison sentence It is changed into the sentence of another example state from a kind of state according to storehouse example, that is, software database example transitions will have been issued For the sentence of new software database example to be tested, change sentence is the core content of database upgrade program statement;It is described Step (2) database upgrade program statement information will be used for the detection process of step (4).
Above-mentioned database software upgrade detection method, the step (3) can be to be tested soft on having issued software Part needs to support the active version software of institute of upgrading, is uniquely determined using software version number;The step (3) is at the beginning of database Beginningization sentence is the database statement that brand-new installation database application software needs to perform;Step (3) database table and word Segment information will be used for the detection process of step (4).
Above-mentioned database software upgrade detection method, the step (4) on judging that sentence is that a kind of selectivity judges, That is if it is determined that statement result is true, then performing databases comparison sentence thereafter;If it is determined that statement result is false, then Databases comparison sentence thereafter is not performed.To ensure the correct execution of databases comparison sentence.
As shown in figure 3, currently preferred second embodiment, including three steps,
Step (11):For the DBAS version to be tested of input, its database upgrade programing change is obtained Sentence, specifically, the database program language can be any one SQL (SQL), and database can be with For all relevant databases.The database upgrade programing change sentence include INSERT, DELETE, UPDATE, CREATE, DROP, ALTER sentence.DBAS to be tested need not be installed, it is only necessary to provide DBAS to be tested File;As shown in figure 4, the schematic flow sheet of above-mentioned steps (11), including four steps:
Step 1101:For the DBAS version to be tested of input, its ROMPaq, the upgrading journey are scanned Sequence is exactly that the software is used for the collection of programs that needs are performed when having issued software version of upgrading;
Step 1102:Database upgrade program statement is obtained in ROMPaq, database upgrade program statement is in step (13) it will be reused in;
Step 1103:Obtain database upgrade programing change sentence;
Step 1104:The interception database table name in database upgrade programing change sentence, the interception process is according to knot Structure query language syntax rule.For example, if in the database upgrade sentence set obtained after scanning ROMPaq, existing One change sentence,
insertintoPM_NEPODEF_TABLE(MOCID,NETYPEID,POID,PON AME,PODES, POTABLENAME) values (' an_port', ' ZXDSL9852V', ' 50009', ' IGMP port statistics ', ' IGMP ports system Meter ', ' ZXDSL9852V_50009'),
According to syntax rule " INSERT INTO table (columns) VALUES (columns Values) ", it can take out Table name PM_NEPODEF_TABLE is taken out, and will be stored up comprising all database upgrade program statement set including the change sentence Deposit standby;
Step (12):For the published data storehouse application software of input, obtain database initialization statement, it is specific and Speech, published data storehouse application software can application software to be tested be supported to rise the need for issued mistake for any one The source version of level, the database initialization program sentence is the number for completely newly installing original execution during the version application software According to library sentence, it is not necessary to install published data storehouse application software, it is only necessary to provide published data storehouse application software text Part, version is positioned according to version number, as shown in figure 5, the schematic flow sheet of step (12), including three steps:
Step 1201:For the published data storehouse application software of input, its installation procedure is scanned.The installation procedure is just It is the collection of programs for needing to perform when the software is used to initially install;
Step 1202:The initialization of the database table name beam search acquisition table obtained in installation procedure according to step 1 Program;
Step 1203:Extract database table and field information, including constraint information and field type information.The constraint letter Breath includes Primary key, foreign key constraint, UNIQUE constraints, CHECK constraints, DEFAULT definition, permission null value;The field class Type information includes field type, field Breadth Maximum, the database table and field information will be used for step (13), citing and Speech, scanning obtains published data storehouse application of software data library initialization program statement, according to database table name PM_NEPODEF_ TABLE locks related initialization program sentence:
According to syntax rule, constraint information and field type information, final result such as following table are extracted
1 displaying:
Table 1
Step (13):With the presence or absence of correct judgement, detecting step (11) before the change sentence that detecting step (11) is obtained Whether obtained change sentence violates the database initialization statement that step (12) is obtained, specifically, and the judgement sentence can To be to judge sentence in arbitrary structures query language, the statement result is true or false, for controlling follow-up one section of sentence Whether perform, as shown in fig. 6, the schematic flow sheet of step (13), including two steps:
Step 1301:Searched in the level program statement set of step (11) the data obtained qurush before correspondence database change sentence Rope judges that sentence purpose is whether the execution for checking the change sentence violates what step (12) was obtained with the presence or absence of sentence is judged Correspondence database table and field constraint information, if it is present further detecting whether effective in the change sentence, that is to say, that Judge its constraint information for whether violating the table that step (12) is obtained;
Step 1302:Changed in step (11) the data obtained storehouse detected in sentence the field value that is directed to whether with step (12) field type and field Breadth Maximum obtained matches, for example, example INSERT INTO table (columns) VALUES (column Values) changes statement error detection, first, in the application software upgrade of testing data storehouse Change sentence in collection of programs
insertintoPM_NEPODEF_TABLE(MOCID,NETYPEID,POID,PON AME,PODES, POTABLENAME) values (' an_port', ' ZXDSL9852V', ' 50009', ' IGMP port statistics ', ' IGMP ports system Meter ', ' ZXDSL9852V_50009') preceding search is with the presence or absence of sentence is judged, such as if there is following sentence:
If exists (select*from PM_NEPODEF_TABLE where NETYPEID='ZXDSL9852V' And MOCID='an_port'and POID='50009'and POTABLENAME='ZXDSL9852V_50009')
Then further whether detection corresponding field includes Primary key,
NETYPEID, MOCID, POID, POTABLENAME, and whether corresponding field value is with changing field value in sentence Type is consistent or the former includes the scope of the latter.In the step, in addition it is also necessary to the word related in detection change sentence Section,
(MOCID, NETYPEID, POID, PONAME, PODES, POTABLENAME) corresponding value ' an_port', ' ZXDSL9852V', ' 50009', ' IGMP port statistics ', ' IGMP port statistics ', ' ZXDSL9852V_50009' type, Whether match on field width with table PM_NEPODEF_TABLE field type information.
In summary, the database software upgrade detection method of the invention based on dynamic programming algorithm, solves data The software upgrading testing efficiency in storehouse is low, the problem of cost is high, improves the software upgrading testing efficiency of database, reduces test Cost, realize rapidly, need not dynamically install and build test environment, can find that DBAS ROMPaq is wrong in advance Static test, is reduced due to high cost test input caused by upgrading path explosive growth by mistake to a certain extent Risk, improve path and program error search efficiency, be discovery procedure mistake as early as possible, as early as possible push updating software release to Market, which is provided, to be ensured, is had a good application prospect.
General principle, principal character and the advantage of the present invention has been shown and described above.The technical staff of the industry should Understand, the present invention is not limited to the above embodiments, the original for simply illustrating the present invention described in above-described embodiment and specification Reason, without departing from the spirit and scope of the present invention, various changes and modifications of the present invention are possible, these changes and improvements It all fall within the protetion scope of the claimed invention.The claimed scope of the invention is by appended claims and its equivalent circle It is fixed.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can select the suitable dynamic programming algorithm of design, be not limited to certain specific optimized algorithm as the case may be, and Realized by the mode of software plus required general hardware platform, naturally it is also possible to by hardware, but in many cases the former It is more preferably embodiment.Understood based on such, technical scheme substantially makes tribute to prior art in other words The part offered can be embodied in the form of software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, CD) in, including some instructions are to cause a station terminal equipment (can be mobile phone, computer, service Device, or the network equipment etc.) perform method described in each embodiment of the invention.
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, above-mentioned storage medium can The program code for performing above-described embodiment method step to be arranged to storage to be used for:
In the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only storage (ROM, Read- Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. It is various can be with the medium of store program codes.
In the present embodiment, the method that processor performs above-described embodiment according to the program code stored in storage medium Step.

Claims (10)

1. the database software upgrading detecting system based on dynamic programming algorithm, it is characterised in that:Including the design being sequentially connected Module, the first acquisition module, the second acquisition module and first detection module,
The design module, for according to oriented G- Design dynamic programming algorithm, choosing the shortest path of database software upgrading And critical path, static test preferentially is carried out to shortest path and critical path, shortest path and critical path are oriented respectively The minimum value and maximum of each side right value sum on figure path;
First acquisition module, the ROMPaq sentence for obtaining software database to be tested intercepts the ROMPaq Change sentence in sentence, the change sentence is the software data to be tested for the example transitions for having issued software database The sentence of the example in storehouse;
Second acquisition module, the initialization statement of software database has been issued for obtaining, and from the initialization statement Middle extraction changes the corresponding database table of database table famous prime minister and field information in sentence with described, the database table and Field information includes constraint information and field type information;
First detection module, for whether violating the database table and field information in the execution for detecting the change sentence Whether interior constraint information, and the detection change sentence match the field type in the database table and field information Information.
2. the database software upgrading detecting system according to claim 1 based on dynamic programming algorithm, it is characterised in that: Also include judge module and the second detection module,
The judge module is connected with the first acquisition module, first detection module respectively, for scanning the ROMPaq language Sentence, which whether there is, judges sentence;
Second detection module is connected with judge module, if for the judgement sentence existed, detecting corresponding change Whether the execution of more sentence violates the constraint information.
3. the database software upgrading detecting system according to claim 1 based on dynamic programming algorithm, it is characterised in that: The software of having issued for having issued software database includes owning that software under testing in the software database to be tested is supported Source version software, and issued the version number of software used in software and the software under testing and uniquely determine.
4. the database software upgrading detecting system according to claim 1 based on dynamic programming algorithm, it is characterised in that: The initialization statement for having issued software database is the database statement that software database to be tested needs to perform.
5. the database software upgrading detecting system according to claim 1 based on dynamic programming algorithm, it is characterised in that: The change sentence, at least including one below:INSERT sentences are inserted, DELETE sentences is deleted, updates UPDATE statement, wound Build CREATE sentences, deletion table DROP sentences, modification ALTER sentences;The constraint information, at least including one below:Major key Constraint, foreign key constraint, unique UNIQUE constraints, inspection CHECK constraints, default DEFAULT definition, permission null value;The field Type information, at least including one below:Field type, field Breadth Maximum.
6. the database software upgrade detection method based on dynamic programming algorithm, it is characterised in that:Comprise the following steps,
Step(A), according to oriented G- Design dynamic programming algorithm, obtain the shortest path and critical path of database software upgrading Footpath, preferentially carries out static test, shortest path and critical path are on digraph path respectively to shortest path and critical path The path of the minimum and maximum of each side right value sum;
Step(B), the ROMPaq sentence of software database to be tested is obtained, the change language in the ROMPaq sentence is intercepted Sentence, it is described change sentence be issued software database example transitions be the software database to be tested example sentence;
Step(C), the initialization statement for having issued software database is obtained, and extracted and the change language from the initialization statement The corresponding database table of database table name and field information in sentence, the database table and field information, including constraint letter Breath and field type information;
Step(D), detect whether the execution of the change sentence is violated after the constraint information in database table and field information, Continue to detect the change sentence whether the field type information in matching database table and field information.
7. the database software upgrade detection method according to claim 6 based on dynamic programming algorithm, it is characterised in that: Step(B), in addition to the ROMPaq sentence is scanned with the presence or absence of judging sentence;If the judgement sentence existed, is examined Whether the execution for surveying the change sentence violates the constraint information.
8. the database software upgrade detection method according to claim 6 based on dynamic programming algorithm, it is characterised in that: Step(C), the software of issue for having issued software database include the software database to be tested in software under testing branch The active version software of institute held, and issued the version number of software used in software and the software under testing and uniquely determine.
9. the database software upgrade detection method according to claim 6 based on dynamic programming algorithm, it is characterised in that: The initialization statement for having issued software database is the database statement that software database to be tested needs to perform.
10. the database software upgrade detection method according to claim 6 based on dynamic programming algorithm, its feature exists In:The change sentence, at least including one below:INSERT sentences are inserted, DELETE sentences is deleted, updates UPDATE languages Sentence, establishment CREATE sentences, deletion table DROP sentences, modification ALTER sentences;The constraint information, at least including it is following it One:Primary key, foreign key constraint, unique UNIQUE constraints, inspection CHECK constraints, default DEFAULT definition, permission null value; The field type information, at least including one below:Field type, field Breadth Maximum.
CN201710292110.3A 2017-04-28 2017-04-28 Database software upgrading detecting system and method based on dynamic programming algorithm Pending CN107179926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710292110.3A CN107179926A (en) 2017-04-28 2017-04-28 Database software upgrading detecting system and method based on dynamic programming algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710292110.3A CN107179926A (en) 2017-04-28 2017-04-28 Database software upgrading detecting system and method based on dynamic programming algorithm

Publications (1)

Publication Number Publication Date
CN107179926A true CN107179926A (en) 2017-09-19

Family

ID=59832061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710292110.3A Pending CN107179926A (en) 2017-04-28 2017-04-28 Database software upgrading detecting system and method based on dynamic programming algorithm

Country Status (1)

Country Link
CN (1) CN107179926A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865829A (en) * 2018-08-28 2020-03-06 北京京东金融科技控股有限公司 Database upgrading method, system, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8275645B2 (en) * 2008-12-17 2012-09-25 Sap Ag Method and system for recursion check and low-level code generation for directed graph
CN104598262A (en) * 2014-11-25 2015-05-06 深圳市腾讯计算机系统有限公司 Method and device for updating mobile application
CN106325902A (en) * 2015-06-24 2017-01-11 中兴通讯股份有限公司 Database software upgrading detection method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8275645B2 (en) * 2008-12-17 2012-09-25 Sap Ag Method and system for recursion check and low-level code generation for directed graph
CN104598262A (en) * 2014-11-25 2015-05-06 深圳市腾讯计算机系统有限公司 Method and device for updating mobile application
CN106325902A (en) * 2015-06-24 2017-01-11 中兴通讯股份有限公司 Database software upgrading detection method and apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张振琳: "《离散数学》", 31 August 2012, 辽宁科学技术出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865829A (en) * 2018-08-28 2020-03-06 北京京东金融科技控股有限公司 Database upgrading method, system, device and storage medium
CN110865829B (en) * 2018-08-28 2024-04-16 京东科技控股股份有限公司 Database upgrading method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11755466B1 (en) Systems and methods for testing a software application
US8032880B2 (en) Multi-branch management for updating software
JP2020510925A (en) Method and apparatus for performing a test using a test case
CN106325902B (en) Database software upgrade detection method and device
US10606570B2 (en) Representing software with an abstract code graph
CN104182335B (en) Method for testing software and device
US9361134B2 (en) Validating translations of externalized content for inclusion in an application
CN104537308B (en) System and method using security audit function is provided
US10635812B2 (en) Method and apparatus for identifying malicious software
CN112181804B (en) Parameter verification method, device and storage medium
CN106325826A (en) Configuration file detection method and apparatus
CN114510722B (en) Static detection method and detection system for incremental code
CN107346284A (en) The detection method and detection means of a kind of application program
US11467824B2 (en) Method and system for fast building and testing software
CN106681783A (en) Detection method and system for SVN code
US6694290B1 (en) Analyzing an extended finite state machine system model
US11663113B2 (en) Real time fault localization using combinatorial test design techniques and test case priority selection
CN107179926A (en) Database software upgrading detecting system and method based on dynamic programming algorithm
CN108664384B (en) Data processing apparatus and data processing method
US8819645B2 (en) Application analysis device
CN116795700A (en) Prepositioning method and device for abnormal faults of interface program
CN117873870A (en) Yum source integrity test method
CN115344491A (en) Code detection method, device, equipment and storage medium
CN117271356A (en) File checking method and device in development stage
CN115470149A (en) Database preprocessing function testing method, device, equipment and storage medium

Legal Events

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

Application publication date: 20170919