Background technology
National standard both domestic and external, tissue and experts and scholars have definition to configuration management technology.Such as IEEE " software configuration management planning standard " (IEEE828-1998) being discussed below about SCM:
" software configuration management is made up of the best engineering practice being applicable to all development project, no matter is adopt to develop stage by stage, or adopts rapid prototyping to develop, and even comprises and safeguarding existing software product.SCM improves reliability and the quality of software by following means:
-framework is provided, comprise and identify and control document, code, interface and database content, be applicable to the various stages in software development process.
-mark is provided in the life cycle of whole software and controls document, source code, interface definition and the mechanism of database workpiece;
-methodology satisfying the demands, meet standard, be applicable to the software development and maintenance of project management and other organizational politics is provided;
-be that management and product issue the information that provides support, as the state of baseline, Variation control, test, audit, issue etc.”
At present, the management of configuration item is deposited mainly with file or database data mode, and definition is only limitted to logical definition more, lacks effective technical finesse.Configuration item is deposited mainly with file mode, with such as title, identifier, file status, version, author, date etc. the order name of certain logic.All configuration items are all stored in repository, guarantee that they can not be obscured and lose.Each repository is made up of several sub-projects, and every sub-project is made up of several project configuration items.The inquiry of configuration item, retrieval need specialist tools or operating system to provide, and have part to increase income configuration management tool as SVN at present, can realize the basic operation of WEB1.0 mode, but can only provide as the limited function such as browsed.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of XML configuration item template dynamic customization method, repository is made to have the function of more than WEB2.0, have can be mutual browse, inquire about, the advantage such as retrieval, and adopt XML technology be convenient to realize other configuration managements technological expansion, make the attribute of configuration item and data be convenient to extract, more easily realize the conversion transmission in the system integration.
In order to achieve the above object, the present invention adopts following technical scheme: a kind of configuration item template dynamic customization method based on XML, and its step is as follows:
(1) utilize XMLSCHEMA to define the structure attribute of repository, build the initialization template of repository;
(2) utilize XML technology processing configuration item attribute, and be each configuration item distribution XML property value;
(3) by the combinations of attributes of same class configuration item be an XML compound type property value;
(4) adopt XMLSCHEMA verifying XML property value whether to meet the form regulation of template, if do not meet, go back to step (2), otherwise forward step (5) to;
(5) the property value XML document of configuration item is put into repository;
(6) configuration item itself is copied into repository;
(7) Version Control and search operaqtion that XACML and XQuery technology realizes configuration item property value document is beneficial to.
The attribute of described configuration item comprises: title, identifier, file status, version, author, one or more in the date can Dynamic Customization.
The access control method that described employing XACML technology realizes the Version Control of configuration item property value document is: under current logic access consideration, principal access resource, its conditional, main body, mode, resource are described by property value, can control the XML property value of configuration item easily; Adopt the expression statement of XMLQuery technology, according to XML document key word, can inquire about easily, the XML property value of search configuration item.
The combinations of attributes of described same class configuration item carries out structural categories or combination to configuration item.
Described structural categories or combination comprise: demand configuration item, test configurations item or testing requirement configuration item.
Technical scheme of the present invention adopts the document of XML technology to configuration management system storehouse to unify Dynamic Customization management: the attribute adopting XML Dynamic Customization configuration item, namely adopt XML analytic technique automatically can to add, delete, revise property value, and customization classification can be carried out to the attribute of certain class configuration item; Adopt XMLSCHEMA custom configuration library structure, verify the validity of its configuration item attribute; Adopt the access control method of XML access control policy and access control request/response descriptive language specification-XACML technology, the XML property value of configuration item can be controlled dynamically; XMLQuery technology is a kind of is applicable to the language of various types of XML data source inquiry, is the extremely strong query facility of a kind of function.XQuery technology is adopted to realize the retrieval and inquisition etc. of configuration item document.What the invention enables repository to have a WEB system is convenient to the advantages such as interactive browser, inquiry, search, and namely make configuration item be convenient to the management of WEB interactive mode, the supervisory formatization in configured in one piece storehouse is clearly demarcated, is convenient to realize the expansion of WEB software interface; And adopt XML technology be convenient to realize other configuration managements technological expansion, make the attribute of configuration item and data be convenient to extract, more easily realize the conversion transmission in the system integration.
Embodiment
For the documents such as common Word, Excel, Visio, the filename identifying namely document for information about of each configuration item.Will comprise which information in the mark of each file, be relevant with the character of document.The mark of document may carry several information, as bullets, document name, writes time etc.Such as, the weekly that project produces weekly, adds the time of writing in mark, just very clear, is convenient to like this search and arrange.
Based on a configuration item template dynamic customization method of XML, as shown in Figure 1, comprise the steps:
Step 101 utilizes XMLSCHEMA to define the structure attribute of repository, builds the initialization template of repository.
Only build structural framing, do not comprise configuration item.All documents that software development process is safeguarded from demand analysis to software test should be comprised in Configuration baseline storehouse.In the integrated approach that the repository that present application example provides builds, in implementation procedure, now illustrate how repository test template document customizes.For Software Testing Project template, its initialization template comprises: performance template, functional template and application flow template.Performance template is for different system requirements, arranges the parameter list of performance test.The parameter of performance test comprises the parameter of concurrent user's total quantity, concurrent user's quantity knots modification in time, the performance parameter of database, the parameter of server OS and WEB server.Functional template is for different system requirements, arranges the parameter list of functional test.The parameter of common function test comprises: personal information and unit information.Wherein, personal information comprises: title, character, address and network address etc.Unit information comprises: age, time, contact method, sex etc.Application flow template is generally log in template, logs in template and mainly comprises: the mode of user, password, identifying code, quantity, time, access control, set up data correlation list etc.XMLSCHEMA has abundant dtd-data type definition syntactic structure, can define conventional as character, the length accuracy of numeral and string thereof.And can expansion be combined, can also be used to represent the complex forms such as regular expression.Corresponding XML data value can be generated by the corresponding type syntax that it defines.Such as, many files are comprised for personnel's feedback opinion table of certain repository, to its file attribute, adopt the professional XML handling implements such as XMLSPY, or the programming tools such as MyEclipse, can create XMLSCHEMA repository document framework and comprise following information: 1 other template attributes of performance template 2 functional template 3 application flow template 4 etc.Various test document file and XML configuration item document thereof can be comprised under this framework.
Step 102 is based on XML technology processing configuration item, and is each configuration item distribution XML property value, and is an XML compound type property value by the combinations of attributes of same class configuration item.
Such as, set up XML configuration file and comprise certain feedback file name attribute, personnel's feedback opinion, author property, time attribute etc.These attributes can be combined as a compound type " feedback document elements " and numbering attribute thereof etc.
Step 103 is the form regulations whether XMLSCHEMA verifying XML compound type property value meets template.
Such as, can programme and judge that whether the XML value extracted follows the Format Type of demand consistent with conditional statement.If do not meet, prompting revised context, goes back to step 102 and again obtains configuration entry value, otherwise forward step 104 to.
Step 104 is that the XML compound type property value of configuration item is put into repository.
By the file comprising XML compound type property value after checking, automatically or by hand copy the repository into Software Testing Project.Now, XML compound type property value may be needed to add in index file.
Step 105 is that configuration item itself puts into repository.
Can with procedural copy or manual file is added the file directory of repository under.
Step 106 utilizes XMLXACML and XMLQuery technology to carry out various operation to configuration item, according to access control right, carries out Version Control, amendment, realize the functions such as the retrieval of configuration item.Utilize XML technology to set up corresponding XML document, can associate with testing tool, realize automation mechanized operation.These test document carry out browsing of WWW mode by being convenient to, inquiry and amendment.
As the markup language of self-described, XML can show the various information in heterogeneous data source neatly according to embody rule, comprise the output of data in the exchanges data between application program, structuring and semi-structured document and database.Software merit rating storehouse is the database of the various document information comprised about software development, and each storehouse can be made up of several sub-projects, and every sub-project is made up of several project configuration items, comprises name field and Attribute domain two parts.The name field of configuration item describes the name of certain word, and Attribute domain is the value part of list item, describes relevant properties.Therefore the combination of compound type and simple types in XMLSchema can be used to define the dependence of each information.Element (element) and attribute (attribute) thereof define configuration item, and the configuration structure logicality of definition is strong, top-down clear layer, and name and the attribute information of list item separate and define, and are convenient to process.By the XACML technology across WINDOWS and Linux platform, configuration item resource security access control method can be realized.Specifically describe condition by <XACML:Environment> in XACML, <XACML:Subject> describes main body, <XACML:Resource> describes resource, <XACML:Action> describes access mode, use the element defined in XACML, request can be described as R (Subject formally, Resource, Action, Environment).It can be described access control policy and access control request/response production process, can control according to the attribute of main body, resource, environment and the behavior taked---allow or refusal.In fact, the result returned has four kinds: allow (Permit), refusal (Deny), cannot determine (Indeterminate) and inapplicable (NotApplicable).According to the constraint of XML element property values, realize Version Control, course control method for use.By main 8 kinds of logical expressions and the nesting method thereof of XQuery, can complete easily and set up configuration item table, insert the relevant operation of the various configuration item such as element, search operation, for the user, need not know that realizing details just can be configured item operation simultaneously.
For the Acceptance Test file catalogue structure of system and the work exchange file that comprises, adopt the professional tools such as XMLSPY, or the programming tools such as MyEclipse, set up XMLSchema identifying file, its general frame comprises " first phase examination " element, the value comprising three daughter elements is respectively: 1 " document template ", 2 " database files ", 3 " system source files ", its attribute is all endless number system.
Certain test AC regeneration document Schema general frame comprises " testdocumentNo " element, and value 1 " author " property value comprising four daughter elements is character string type; 2 " date " property value is date type; 3 " documentid " property value is ID; 4 contact methods " mobilephone " property value is 11 bit digital, realizes with regular expression constraint; 5 other template attributes.Other property value can be determined according to demand.
Its correspondence can generate XML document automatically, and such as, the sample comprising an element is as follows:
1 file name attribute: personnel's feedback opinion 01; 2 author property: Nie Nan; 3 time attribute: 2013-12-16; 4 contact method attributes: 13007605726; 5 other attributes etc.
Its follow-up Version Control is by SUNXACML access control function library calling technology, according to author property condition, on-the-fly modify <date> property value and complete demarcation, as determined according to access consideration, author is " Nie Nan ", namely its feedback opinion " 02 can be obtained, 03... " the version time is <date>2014-12-16LEssT.LTssT.L T/date>, <date>2015-12-16LEssT.LTssT.L T/date> etc.
The test feedback result of many people is often comprised in actual work, we can set up XQuery inquiry file exchangedocument.xq, utilize where doc/author=" Nie Nan " conditional statement, retrieval exchangedocument.xml " in comprise author be " Nie Nan ", the output.xml following " test of Nie Nan " of generation.
For above embodiment of the method, the embodiment of the present application additionally provides a kind of configuration item attribute and data extract integrated approach, and realize the conversion transmission in the system integration, its structural representation as shown in Figure 2.
We are in certain system of development in the recent period, realize subsystem data to derive and import XML and configure feedback file and data file and report and submit center system, the data XML then realizing importing center system verifies error correction, center system data investigation mistake the links such as repair data.Be illustrated in fig. 2 shown below.
Step 201, starts to change local configuration item data; Adopt XML technology plug-in unit XStream, build JavaBean object.
Step 202, configuration item data genaration XML file; Explain the node of corresponding message with XStream, then use statement xStream.inXML(message) Object is changed into xml data.
Step 203, compression realization imports and exports process; Adopting java to compress, statement realizes XML document is compressed into ZIP file, and realizes importing and exporting folder function.
Step 204, whether checking attribute format conforms with the regulations.
The XML data of XMLSCHEMA checking transmission is adopted whether to meet the type and form that specify in demand.
Step 205, as do not passed through verification, feedback error information; Design operation interface prompt.
Step 206, is transferred to heterogeneous system by verification and terminates.Design data transmission operational module realizes.
Adopt XML technology plug-in unit, realizing subsystem data derives and imports XML configuration file and data file reports and submits center system, and the data XML then realizing importing center system verifies error correction, center system data investigation mistake the links such as repair data.This system achieves docking of configuration item XML document and Database Systems smoothly, and isomery WEB system often needs to carry out data docking between database, and relevant docking technique comprises a lot, adopts the actual high efficient and reliable of XML technology by contrast.And XML and correlation technique thereof store as cloud data and one of the important technology of Interface integration, the cloud service being also convenient to the system that realizes from now on is upgraded.
Be only specific embodiments of the invention above, but the present invention is not limited thereto, those skilled in the art can think change all should fall into protection scope of the present invention.