CN103914370B - XML (Extensive Markup Language) configuration file based test method and device - Google Patents
XML (Extensive Markup Language) configuration file based test method and device Download PDFInfo
- Publication number
- CN103914370B CN103914370B CN201210591426.XA CN201210591426A CN103914370B CN 103914370 B CN103914370 B CN 103914370B CN 201210591426 A CN201210591426 A CN 201210591426A CN 103914370 B CN103914370 B CN 103914370B
- Authority
- CN
- China
- Prior art keywords
- test
- configuration file
- node
- file
- xml configuration
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides an XML (Extensive Markup Language) configuration file based test method. The XML configuration file based test method comprises the following steps of obtaining a product to be tested, wherein the product to be tested comprises a plurality of function points to be tested; forming an XML configuration file according to the plurality of function points to be tested, wherein the XML configuration file comprises a plurality of test nodes, the test nodes and the function points to be tested are arranged in a one-to-one correspondence mode, every test node comprises a plurality of marker pairs comprising attribute identifications and the content information, and the content information is the information for test items corresponding to the test nodes; obtaining the product to be tested and the XML configuration file through an automated test frame; obtaining the corresponding test codes and the corresponding test item information according to the XML configuration file through the automated test frame; testing the test nodes according to the test items through the automated test frame. The invention also provides an XML configuration file based device. According to the XML configuration file based test method and device, the execution efficiency is high, the accuracy is high, the maintenance is simple and convenient, and the test efficiency of the product can be improved.
Description
Technical field
It is more particularly to a kind of based on expandable mark language XML configuration file the present invention relates to field of computer technology
Method of testing and device
Background technology
Product test is needed in the uncorrelated position deployment file and registry entry specified in a large number, to check the work(of product
Energy.Conventional manually dispose can take and easily error very much, and the method for batch processing script is difficult to safeguard again.Particularly
Having on position increases file and during registry entry, it is more difficult to safeguard.From the foregoing, it will be observed that existing method of testing has efficiency low and standard
The low defect of true property.Perform deployment, test, the inspection work of these files and registry entry by hand, the time more than 60 minutes,
The accuracy for performing cannot also be ensured.
The content of the invention
The purpose of the present invention is intended at least solve one of above-mentioned technological deficiency.
For this purpose, first purpose of the present invention be propose a kind of efficiency high and accuracy it is high based on extensible markup language
The method of testing of speech XML configuration file.Second object of the present invention is to propose that a kind of test based on XML configuration file is filled
Put.
To reach above-mentioned purpose, the embodiment of first aspect present invention is provided one kind and is matched somebody with somebody based on expandable mark language XML
The method of testing of file is put, is comprised the following steps:
Trial product to be measured is obtained, the trial product to be measured includes multiple function points to be tested;
XML configuration file is formed according to the plurality of function point to be tested, wherein, the XML configuration file includes multiple
Test node, wherein, each test node function point to be tested described with is corresponding, and described each test node is including more
Individual mark is right, and the mark is to including attribute-bit and content information, the content information is for test node correspondence
Test item information;
Automated test frame obtains the trial product to be measured and the XML configuration file;
The automated test frame obtains corresponding test node and corresponding test item according to the XML configuration file
Information;And
The automated test frame is tested the test node according to the test item information.
Method of testing based on XML configuration file according to embodiments of the present invention, with advantages below:
(1)Node administration is convenient:One node correspondence One function point, when increasing New function point new node need to be only increased;
When strengthening old function point, new child node is increased in regard to node.
(2)Be uniformly processed, it is directly perceived quick:The XML configuration file is called using script, file generated, file can be carried out
The operations such as inspection, absolute path modification, only changing a script just can play a part of to change all node correspondence results;Such as increase text
Quantity, change target drive of part and registry entry etc..
(3)Support to specify node processing, it is not necessary to using whole nodes, can arbitrarily specify by testing requirement and use, refer to
Using the text of father node when determining.
(4)Function expands extremely simple:When function to be tested has variation, new label position is increased in respective nodes, so
Afterwards label is processed in the script of call XML configuration file.
In one embodiment of the invention, described each function point to be tested includes multiple test positions, described in each
Test point includes a test father node and multiple test child nodes, wherein, each tests child node and a test position pair
Should, and described each test child node includes that corresponding mark is right.
Wherein, the test item includes test file and/or registry entry.The information of the test item includes the test
One or more in path, quantity, type, file size, the prefix name of file, and registry-location, key assignmentses, key
One or more in name, value content.
Further, also include:
The automated test frame is analyzed to obtain the XML by test script to the XML configuration file
The corresponding test item of configuration file;
The automated test frame detects whether the test item is deployed in corresponding position by the test script.
In yet another embodiment of the present invention, described each test child node also includes label, wherein, the label bag
Include default label and increase performance test label.
The embodiment of second aspect present invention provides a kind of test device based on XML configuration file, including:Obtain mould
Block, for obtaining trial product to be measured, the trial product to be measured includes multiple function points to be tested;XML configuration file generation module,
For forming XML configuration file according to the plurality of function point to be tested, wherein, the XML configuration file includes multiple tests
Node, wherein, each test node function point to be tested described with is corresponding, and described each test node includes multiple marks
Note is right, and the mark is to including attribute-bit and content information, the content information is survey corresponding for the test node
The information of examination item;Automated test frame module, for obtaining the trial product to be measured and the XML configuration file, and according to
The XML configuration file obtains corresponding test node and corresponding test item information, and according to the test item information pair
The test node is tested.
Test device based on XML configuration file according to embodiments of the present invention, with advantages below:
(1)Node administration is convenient:One node correspondence One function point, when increasing New function point new node need to be only increased;
When strengthening old function point, new child node is increased in regard to node.
(2)Be uniformly processed, it is directly perceived quick:The XML configuration file is called using script, file generated, file can be carried out
The operations such as inspection, absolute path modification, only changing a script just can play a part of to change all node correspondence results;Such as increase text
Quantity, change target drive of part and registry entry etc..
(3)Support to specify node processing, it is not necessary to using whole nodes, can arbitrarily specify by testing requirement and use, refer to
Using the text of father node when determining.
(4)Function expands extremely simple:When function to be tested has variation, new label position is increased in respective nodes, so
Afterwards label is processed in the script of call XML configuration file.
Further, described each function point to be tested includes multiple test positions, and each described test point includes a survey
Examination father node and multiple test child nodes, wherein, each test child node is corresponding with a test position, and described each test
Child node includes that corresponding mark is right.
Wherein, the test item includes test file and/or registry entry.The information of the test item includes the test
One or more in path, quantity, type, file size, the prefix name of file, and registry-location, key assignmentses, key
One or more in name, value content.
In yet another embodiment of the present invention, the test device based on XML configuration file of the embodiment of the present invention, also wraps
Include:Test script module, for being analyzed to obtain the corresponding test of the XML configuration file to the XML configuration file
, and detect whether the test item is deployed in corresponding position.
In yet another embodiment of the present invention, described each test child node also includes label, wherein, the label bag
Include default label and increase performance test label.
The additional aspect of the present invention and advantage will be set forth in part in the description, and partly will become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Description of the drawings
The above-mentioned and/or additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments
It is substantially and easy to understand, wherein:
Fig. 1 is the flow chart of the method for testing based on XML configuration file according to one embodiment of the invention;
Fig. 2 is the flow chart of the method for testing based on XML configuration file according to another embodiment of the present invention;
Fig. 3 is the schematic diagram of the test device based on XML configuration file according to one embodiment of the invention;And
Fig. 4 is the schematic diagram of the test device based on XML configuration file according to another embodiment of the present invention.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
Following disclosure provides many different embodiments or example is used for realizing the different structure of the present invention.For letter
Change disclosure of the invention, hereinafter the part and setting of specific examples are described.Certainly, they are only merely illustrative, and
Purpose does not lie in the restriction present invention.Additionally, the present invention can in different examples repeat reference numerals and/or letter.It is this heavy
It is again the relation between itself not indicating discussed various embodiments and/or arranging for purposes of simplicity and clarity.This
Outward, the invention provides various specific technique and material example, but those of ordinary skill in the art can be appreciated that
The applicable property of other techniques and/or the use of other materials.In addition, fisrt feature described below second feature it
" on " structure can include that the first and second features be formed as the embodiment of directly contact, it is also possible to including other feature shape
Into the embodiment between the first and second features, such first and second feature may not be directly contact.
In describing the invention, it should be noted that unless otherwise prescribed and limit, term " installation ", " connected ",
" connection " should be interpreted broadly, for example, it may be mechanically connected or electrical connection, or the connection of two element internals, can
Being to be joined directly together, it is also possible to be indirectly connected to by intermediary, for the ordinary skill in the art, can basis
Concrete condition understands the concrete meaning of above-mentioned term.
With reference to explained below and accompanying drawing, it will be clear that these and other aspects of embodiments of the invention.In these descriptions
In accompanying drawing, specifically disclose some particular implementations in embodiments of the invention to represent the enforcement for implementing the present invention
Some modes of the principle of example, but it is to be understood that the scope of embodiments of the invention is not limited.Conversely, the present invention
Embodiment includes all changes, modification and the equivalent fallen in the range of the spirit and intension of attached claims.
Below with reference to Fig. 1 and Fig. 2 being described based on the method for testing of XML configuration file to the embodiment of the present invention.
As shown in figure 1, the method for testing based on XML configuration file of the embodiment of the present invention, comprises the steps:
Step S101, obtains test product.
Test product includes multiple function points to be tested.Specifically, according to demand, big function point to be tested is listed, it is right
Each function point to be tested newly-built father node in xml configuration files;Intra-node, each needs the position of deployment to one
Individual child node
In one embodiment of the invention, each function point to be tested includes multiple test positions.Wherein, each test
Point includes a test father node and multiple test child nodes.Each test child node is corresponding with a test position, and each
Test child node includes that corresponding mark is right.
Further, each test child node also includes label.Wherein, label can include default label and increase performance survey
Test-object label.Wherein, each test child node inside using tag/text labels to definition need deployment file path, quantity,
Type, size, prefix name etc. or the information such as registry-location, key assignmentses, key name, value content.
Step S102, according to multiple function points to be tested XML configuration file is formed.
XML configuration file includes multiple test nodes.Each test node is corresponding with a function point to be tested, and each
Test node includes that multiple marks are right, marks to including attribute-bit and content information, content information is for test node pair
The information of the test item answered.
Step S103, automated test frame obtains trial product to be measured and XML configuration file.
Step S104, automated test frame obtains corresponding test node and corresponding test according to XML configuration file
Item information.
In one embodiment of the invention, test item includes test file and/or registry entry.Wherein, test item
Information includes one or more in path, quantity, type, file size, the prefix name of test file, and registration epi-position
Put, one or more in key assignmentses, key name, value content.
In one embodiment of the invention, step S104 also includes:Automated test frame is by test script to XML
Configuration file is analyzed to obtain the corresponding test item of XML configuration file;Automated test frame is detected by test script
Whether test item is deployed in corresponding position.
Specifically, parse xml document, script according to the hierarchical information of file and the tag/text labels pair of the bottom, really
Determine absolute path(Registry-location), all filenames to be created(The full name of registry key, value, content), file size etc.;From
It is dynamic to generate list, then script sequential processes, dispose on demand;Support disposed by the rule of specified node,
For above-mentioned hierarchical structure and deployment design, parsing script only need to according to certain rule enter row information read and
Process.It is incoming<Trash>、<Track>Or<Registry>During as parameter, script is just in energy automatic deployment xml document
All Files and registry key under corresponding node.If so need not dispose on a large scale, sub-project can be transferred only into
Tag as parameter, such as:<Trash/WindowsPrereadingFiles>, such script can only perform the portion of the sub-project
Administration.
In order that XML file deployment is easier, the script process also function with path intelligently parsing, for XML
File or registry entry purpose deployment path in file, script being capable of automatic decision drive disk, parsing relative path, parsing system
Path of system variable-definition etc..When XML file is write, can with according to the custom of user oneself or its think convenient mode
To fill in routing information.
In file and the details of registry key deployment, file type(The content of registry value)It is to support multinomial
, without the need for newly-built new node, directly exist<type></type>Inside increase type to be disposed to distinguish with separator.
Such as:<type>doc,txt,pdf</type>;
Script is also supported to increase more files and registry information, such as time in XML file, can be with User Defined portion
Administration's time and do not use the script invoked time.File attributes can be hidden, and abandon file permission rank also controllable.
Meanwhile, script can consider and process<Trash/WindowsPrereadingFiles>Attribute under node<
Default>, this is the attribute that the application of the method for testing based on XML configuration file of the present invention needs.By this
The bright method of testing based on XML configuration file, can answer according to application spread and abundant object properties, with suitable
Use demand.In a word, the extensibility of script is very abundant, flexible, and application prospect is very wide.
Step S105, automated test frame is tested test node according to test item information.
According to XML configuration file, whether deployment file, registry entry put in place right needed for script inspection.Inspection performs spy
After determining function, whether corresponding file existence is correct, and supports all node inspections of whole xml document, while supporting single
Individual child node inspection and single father node inspection, wherein father node include big quantum nodes.Also, according to XML configuration file, pin
Originally can random test product appellative function.
Without the need for any modification when being integrated into inside automated test frame, parsing XML is directly called in automation framework
The code of configuration file, it is not necessary to which any extra input is capable of achieving functional test automation.
The postrun file of product some functions and registry entry state, zero cost can be checked using XML configuration file
Hold the inspection link that test must be completed.Also, check time-consuming being less than 1 minute.During manual execution, the workload of hand inspection
It is suitable with these files, registry entry are disposed, can be directly integrated and enter automated test frame, without the need for any change,
So as to the efficiency and quality of test greatly improved.
Below the hierarchical relationship of the test node of this step is illustrated by taking Tables 1 and 2 as an example.
Table 1 shows the hierarchical relationship of node.The root node that table 1 is used includes three child nodes, correspondence practical application
Three objects, are required to dispose corresponding document case registry key in these three objects.In above three child node, per height
Node is again comprising next layer of child node.
Table 1
Table 2 shows next layer included under each child node of child node.As shown in table 2:Trash child nodes are contained
Multiple subordinate's child nodes, each child node is the sub-project in this patent practical application, and deployment is needed in sub-project
Specific file or registry key.
Table 2
By taking Trash/WindowsPrereadingFiles in table 2 as an example, the child node subordinate<TargetFile>For
The node of lowest level, contains specific file deployment information:Position, quantity, size, file prefix name, type etc.;Simultaneously
Also pass through herein<Default>Label marked the attribute of this project, and attribute can be with infinite expanding;
Table 3 gives certain Registry Subkeys purpose lowest level of nodes information, with file except that, in node
Information is for registry key.
Table 3
By the way that hierarchical structure of the present invention and node deployment is set forth above, the present invention can be for various files and registry entry
Purpose deployment requirements, carry out infinite expanding, application.Because only needing to just add sport, increase by increasing upper level of child nodes
Bottom child node information or attribute etc. can just increase the behavioral characteristic of specific file and registry key and large project.
Below with reference to Fig. 2 being described in detail based on the method for testing of XML configuration file to the embodiment of the present invention.
Step S201, analyzes testing requirement.
Step S202, writes XML file.
Step S203, the deployment and test based on XML file, for conventional requirement increases, execution step S204, for spy
Different demand growth, execution step S205;
Step S204, when conventional requirement increases, safeguards XML file, is then back to step S202.
Step S2041, increases testing requirement, when having new function point, increases new father node or child node.
Step S2042, when old function needs to strengthen, find corresponding node is carried out to the text contents in corresponding tag
Modification.
Step S205, when specific demand is supported, safeguards XML file, is then back to step S202.
Step S2051, increases default deployment logic, and some project acquiescences of demand the inside need test, then unification is added
" Default " label, directly uses the rule of these nodes when script calls xml document, be not in omit.
Step S2052, increases performance test deployment logic, and demand the inside needs the only part that execution performance is tested to save
Point, inside plus " PerfTest " label, only processes node, the deployment performance detection environment of tape label when script is called.This
When deployment can ignore in rule the quantity of file and registry entry, size are specified, to meet performance test demand.
Step S2053, " specified file " deployment logic needs to use specified title in testing, specifies the file of size
Or registry entry, the tag of modification expression quantity is -1, represents unique.
Step S206, automatic test is integrated.
It should be noted that specific function expands low with maintenance cost during demand growth, current maximal workload is once
Safeguard and be less than 10 minutes.
Method of testing based on XML configuration file according to embodiments of the present invention, using XML node mode organization need portion
The file and registration table of administration, each node is product One function point to be tested, using tag/text marks to needing to record
Want deployment information.To all of node, processed using same script file, so as to one-touch, accurate generation is owned
Need the file and registry key of deployment.Additionally, the present invention creates on demand initial XML configuration file, parsing XML configuration texts
Part performs deployment task, in being integrated into automated test frame.Xml document is safeguarded according to specific demand and conventional requirement, so as to
Improve the accuracy of efficiency and deployment.
Additionally, the innovative point and advantage of the method for testing based on XML configuration file of the present invention are also embodied in:
(1)Node administration is convenient:One node correspondence One function point, when increasing New function point new node need to be only increased;
When strengthening old function point, new child node is increased in regard to node.
(2)Be uniformly processed, it is directly perceived quick:The XML configuration file is called using script, file generated, file can be carried out
The operations such as inspection, absolute path modification, only changing a script just can play a part of to change all node correspondence results;Such as increase text
Quantity, change target drive of part and registry entry etc..
(3)Support to specify node processing, it is not necessary to using whole nodes, can arbitrarily specify by testing requirement and use, refer to
Using the text of father node when determining.
(4)Function expands extremely simple:When function to be tested has variation, new label position is increased in respective nodes, so
Afterwards label is processed in the script of call XML configuration file.
To sum up, the XML configuration file orderliness of the method for testing based on XML configuration file of the invention is clear, logicality is strong,
Deployment file and registry entry are rapid, accurate.Additionally, can complete all to map out the work within 2 minutes.When actually used,
It is high, easy maintenance special with fast, accuracy rate is performed, very significantly improve the testing efficiency of product.
The embodiment of second aspect present invention provides a kind of test device based on XML configuration file.
As shown in figure 3, the test device 300 based on XML configuration file of the embodiment of the present invention include acquisition module 310,
XML configuration file generation module 320 and automated test frame module 330.
Specifically, acquisition module 310 is used to obtain trial product to be measured.Wherein, trial product to be measured includes multiple work(to be tested
Can point.Each function point to be tested includes multiple test positions, and each test point includes a test father node and multiple tests
Child node.Wherein, each test child node is corresponding with a test position, and each test child node includes corresponding mark
It is right.
Further, each test child node also includes label.Wherein, label includes default label and increases performance test mark
Sign.
XML configuration file generation module 320 is connected with acquisition module 310, for being formed according to multiple function points to be tested
XML configuration file.
Wherein, XML configuration file includes multiple test nodes.Each test node is corresponding with a function point to be tested,
And each test node includes that multiple marks are right.Mark to including attribute-bit and content information, wherein content information be for
The information of the corresponding test item of test node.
Automated test frame module 330 is connected respectively with acquisition module 310 and XML configuration file generation module 320, uses
In acquisition trial product to be measured and XML configuration file, and corresponding test node and corresponding test are obtained according to XML configuration file
Item information, and test node is tested according to test item information.
In one embodiment of the invention, test item includes test file and/or registry entry.The packet of test item
Include one or more in path, quantity, type, file size, the prefix name of test file, and registry-location, key assignments
One or more in type, key name, value content.
As shown in figure 4, the test device 300 based on XML configuration file of the embodiment of the present invention also includes test script mould
Block 340.Wherein, test script module 340 respectively with XML configuration file generation module 320 and automated test frame module 330
It is connected, for being analyzed to XML configuration file to obtain the corresponding test item of XML configuration file, and whether detects test item
It is deployed in corresponding position.
Specifically, test script module 340 is according to the hierarchical information of file and the tag/text labels pair of the bottom, it is determined that
Absolute path(Registry-location), all filenames to be created(The full name of registry key, value, content), file size etc.;Automatically
Generate list, then script sequential processes, dispose on demand;Support disposed by the rule of specified node,
For above-mentioned hierarchical structure and deployment design, test script module 340 only need to carry out letter according to certain rule
Breath reads and processes.It is incoming<Trash>、<Track>Or<Registry>During as parameter, script just can automatic deployment
All Files and registry key in xml document under corresponding node.If so need not dispose on a large scale, can only pass
Enter the tag of sub-project as parameter, such as:<Trash/WindowsPrereadingFiles>, such script can only perform the son
The deployment of project.
In order that XML file deployment is easier, the script of test script module 340 is processed and also have path intelligently solution
The function of analysis, for the file in XML file or registry entry purpose deployment path, script being capable of automatic decision drive disk, solution
Analysis relative path, path of resolution system variable-definition etc..When XML file is write, can be according to the custom of user oneself
Or it thinks convenient mode to fill in routing information.
In file and the details of registry key deployment, file type(The content of registry value)It is to support multinomial
, without the need for newly-built new node, directly exist<type></type>Inside increase type to be disposed to distinguish with separator.
Such as:<type>doc,txt,pdf</type>;
Script is also supported to increase more files and registry information, such as time in XML file, can be with User Defined portion
Administration's time and do not use the script invoked time.File attributes can be hidden, and abandon file permission rank also controllable.
Meanwhile, script can consider and process<Trash/WindowsPrereadingFiles>Attribute under node<
Default>, this is the attribute that the application of the method for testing based on XML configuration file of the present invention needs.By this
The bright method of testing based on XML configuration file, can answer according to application spread and abundant object properties, with suitable
Use demand.In a word, the extensibility of script is very abundant, flexible, and application prospect is very wide.
Test device based on XML configuration file according to embodiments of the present invention, using XML node mode organization need portion
The file and registration table of administration, each node is product One function point to be tested, using tag/text marks to needing to record
Want deployment information.To all of node, processed using same script file, so as to one-touch, accurate generation is owned
Need the file and registry key of deployment.Additionally, the present invention creates on demand initial XML configuration file, parsing XML configuration texts
Part performs deployment task, in being integrated into automated test frame.Xml document is safeguarded according to specific demand and conventional requirement, so as to
Improve the accuracy of efficiency and deployment.
Additionally, the innovative point and advantage of the method for testing based on XML configuration file of the present invention are also embodied in:
(1)Node administration is convenient:One node correspondence One function point, when increasing New function point new node need to be only increased;
When strengthening old function point, new child node is increased in regard to node.
(2)Be uniformly processed, it is directly perceived quick:The XML configuration file is called using script, file generated, file can be carried out
The operations such as inspection, absolute path modification, only changing a script just can play a part of to change all node correspondence results;Such as increase text
Quantity, change target drive of part and registry entry etc..
(3)Support to specify node processing, it is not necessary to using whole nodes, can arbitrarily specify by testing requirement and use, refer to
Using the text of father node when determining.
(4)Function expands extremely simple:When function to be tested has variation, new label position is increased in respective nodes, so
Afterwards label is processed in the script of call XML configuration file.
To sum up, the XML configuration file orderliness of the method for testing based on XML configuration file of the invention is clear, logicality is strong,
Deployment file and registry entry are rapid, accurate.Additionally, can complete all to map out the work within 2 minutes.When actually used,
It is high, easy maintenance special with fast, accuracy rate is performed, very significantly improve the testing efficiency of product.
In flow chart or here any process described otherwise above or method description are construed as, expression includes
It is one or more for realizing specific logical function or process the step of the module of code of executable instruction, fragment or portion
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussion suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
In flow charts expression or here logic described otherwise above and/or step, for example, are considered use
In the order list of the executable instruction for realizing logic function, in may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment(As computer based system, the system including processor or other can hold from instruction
The system of row system, device or equipment instruction fetch and execute instruction)Use, or with reference to these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass
The dress that defeated program is used for instruction execution system, device or equipment or with reference to these instruction execution systems, device or equipment
Put.The more specifically example of computer-readable medium(Non-exhaustive list)Including following:With the electricity that one or more are connected up
Connecting portion(Electronic installation), portable computer diskette box(Magnetic device), random access memory(RAM), read-only storage
(ROM), erasable edit read-only storage(EPROM or flash memory), fiber device, and portable optic disk is read-only deposits
Reservoir(CDROM).In addition, computer-readable medium can even is that the paper that can thereon print described program or other are suitable
Medium, because for example by carrying out optical scanner to paper or other media edlin, interpretation can then be entered or if necessary with it
His suitable method is processed to electronically obtain described program, in being then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realizing.For example, if realized with hardware, and in another embodiment, can be with well known in the art
Any one of row technology or their combination are realizing:With for realizing the logic gates of logic function to data-signal
Discrete logic, the special IC with suitable combinational logic gate circuit, programmable gate array(PGA), scene
Programmable gate array(FPGA)Deng.
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
Suddenly the hardware that can be by program to instruct correlation is completed, and described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
Additionally, each functional unit in each embodiment of the invention can be integrated in a processing module, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a module.Above-mentioned integrated mould
Block both can be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The integrated module is such as
Fruit is realized and as independent production marketing or when using using in the form of software function module, it is also possible to be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means to combine specific features, structure, material or spy that the embodiment or example are described
Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not
Necessarily refer to identical embodiment or example.And, the specific features of description, structure, material or feature can be any
One or more embodiments or example in combine in an appropriate manner.
Although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with
Understanding can carry out various changes, modification, replacement to these embodiments without departing from the principles and spirit of the present invention
And modification, the scope of the present invention is by claims and its is equal to limit.
Claims (4)
1. a kind of method of testing based on expandable mark language XML configuration file, it is characterised in that comprise the following steps:
Trial product to be measured is obtained, the trial product to be measured includes multiple function points to be tested;
XML configuration file is formed according to the plurality of function point to be tested, wherein, the XML configuration file includes multiple tests
Node, wherein, each test node function point to be tested described with is corresponding, and described each test node includes multiple marks
Note is right, and the mark is to including attribute-bit and content information, the content information is survey corresponding for the test node
The information of examination item;
Automated test frame obtains the trial product to be measured and the XML configuration file;
The automated test frame obtains corresponding test node and corresponding test item letter according to the XML configuration file
Breath;And
The automated test frame is tested the test node according to the test item information, wherein, it is described each
Function point to be tested includes multiple test positions, and each described test point includes a test father node and multiple tests son section
Point, wherein, each test child node is corresponding with a test position, and described each test child node includes corresponding mark
Right, the test item includes test file and/or registry entry, and the information of the test item includes the road of the test file
Footpath, quantity, type, file size, prefix name, and registry-location, key assignmentses, key name and value content, wherein, the side
Method also includes:
The automated test frame is analyzed to obtain the XML configurations by test script to the XML configuration file
The corresponding test item of file;
The automated test frame detects whether the test item is deployed in corresponding position by the test script, its
In, specifically include:
Parsing XML file, script according to the hierarchical information of file and the tag/text labels pair of the bottom, determine absolute path,
All filenames to be created, file size;Automatically generate list, then script sequential processes, dispose on demand.
2. the method for testing of XML configuration file is based on as claimed in claim 1, it is characterised in that described each test son section
Point also includes label, wherein, the label includes default label and increases performance test label.
3. a kind of test device based on XML configuration file, it is characterised in that include:
Acquisition module, for obtaining trial product to be measured, the trial product to be measured includes multiple function points to be tested;
XML configuration file generation module, for forming XML configuration file according to the plurality of function point to be tested, wherein, it is described
XML configuration file includes multiple test nodes, wherein, each test node function point to be tested described with is corresponding, and institute
Stating each test node includes that multiple marks are right, and to including attribute-bit and content information, the content information is the mark
For the information of the corresponding test item of the test node;
Automated test frame module, for obtaining the trial product to be measured and the XML configuration file, and according to the XML
Configuration file obtains corresponding test node and corresponding test item information, and according to the test item information to the test
Node is tested, wherein, described each function point to be tested includes multiple test positions, and each described test point includes one
Test father node and multiple test child nodes, wherein, each test child node is corresponding with a test position, and described each survey
Swab node includes that corresponding mark is right, and the test item includes test file and/or registry entry, the information of the test item
Path, quantity, type including the test file, file size, prefix name, and registry-location, key assignmentses, key name
With value content, wherein, the test device also includes:
Test script module, for being analyzed to obtain the corresponding test of the XML configuration file to the XML configuration file
, and detect whether the test item is deployed in corresponding position, wherein, specifically for:
Parsing XML file, script according to the hierarchical information of file and the tag/text labels pair of the bottom, determine absolute path,
All filenames to be created, file size;Automatically generate list, then script sequential processes, dispose on demand.
4. the test device of XML configuration file is based on as claimed in claim 3, it is characterised in that described each test son section
Point also includes label, wherein, the label includes default label and increases performance test label.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210591426.XA CN103914370B (en) | 2012-12-31 | 2012-12-31 | XML (Extensive Markup Language) configuration file based test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210591426.XA CN103914370B (en) | 2012-12-31 | 2012-12-31 | XML (Extensive Markup Language) configuration file based test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103914370A CN103914370A (en) | 2014-07-09 |
CN103914370B true CN103914370B (en) | 2017-05-10 |
Family
ID=51040072
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210591426.XA Active CN103914370B (en) | 2012-12-31 | 2012-12-31 | XML (Extensive Markup Language) configuration file based test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103914370B (en) |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106301993A (en) * | 2015-06-12 | 2017-01-04 | 中兴通讯股份有限公司 | A kind of method and apparatus of test router |
CN106855835B (en) * | 2015-12-08 | 2020-04-07 | 中国航空工业第六一八研究所 | XML technology-based power-on self-detection method for flight control system |
CN107231337B (en) * | 2016-03-25 | 2020-05-22 | 阿里巴巴集团控股有限公司 | Verification method and device applied to financial messages |
CN106227652B (en) * | 2016-07-12 | 2019-05-28 | 合一网络技术(北京)有限公司 | Automated testing method and system |
CN106502896B (en) * | 2016-10-21 | 2019-08-23 | 武汉斗鱼网络科技有限公司 | A kind of generation method and device of function test code |
CN106886421A (en) * | 2017-04-07 | 2017-06-23 | 广东浪潮大数据研究有限公司 | A kind of method that configuration file unification based on Python is replaced |
CN107315681A (en) * | 2017-06-09 | 2017-11-03 | 上海爱优威软件开发有限公司 | Application program self-starting test system, medium and method |
CN108399125B (en) * | 2018-02-08 | 2021-06-22 | 深圳壹账通智能科技有限公司 | Automatic testing method and device, computer equipment and storage medium |
CN108521350A (en) * | 2018-03-16 | 2018-09-11 | 重庆邮电大学 | A kind of industrial gateway equipment automatization test method driving script based on XML |
CN109214172B (en) * | 2018-09-20 | 2021-08-31 | 郑州云海信息技术有限公司 | Method and device for acquiring key value name of valid registry |
CN109558290B (en) * | 2018-11-12 | 2023-06-02 | 平安科技(深圳)有限公司 | Server, interface automatic test method and storage medium |
CN109976828B (en) * | 2019-03-12 | 2022-04-22 | 北京奇艺世纪科技有限公司 | Method and device for configuring file |
CN110069277A (en) * | 2019-03-16 | 2019-07-30 | 平安普惠企业管理有限公司 | Using loading method, using online equipment, storage medium and device |
CN111930606A (en) * | 2019-05-13 | 2020-11-13 | 阿里巴巴集团控股有限公司 | Automatic generation method of data processing flow test report and related device |
CN111382437A (en) * | 2020-03-03 | 2020-07-07 | 思客云(北京)软件技术有限公司 | Defect detection method, device and computer readable storage medium based on configuration analysis engine |
CN111737109A (en) * | 2020-05-20 | 2020-10-02 | 山东鲸鲨信息技术有限公司 | Cluster file system testing method and device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567164A (en) * | 2011-12-23 | 2012-07-11 | 中国科学院自动化研究所 | Instruction set batch testing device and method for processor |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8707263B2 (en) * | 2010-04-19 | 2014-04-22 | Microsoft Corporation | Using a DSL for calling APIS to test software |
-
2012
- 2012-12-31 CN CN201210591426.XA patent/CN103914370B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567164A (en) * | 2011-12-23 | 2012-07-11 | 中国科学院自动化研究所 | Instruction set batch testing device and method for processor |
Non-Patent Citations (1)
Title |
---|
基于XML的自动化测试系统技术研究及实现;潘晓隽;《中国优秀硕士学位论文全文数据库》;20101015;正文第2-57页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103914370A (en) | 2014-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103914370B (en) | XML (Extensive Markup Language) configuration file based test method and device | |
CN104166619B (en) | The performance test methods and terminal of application program | |
US8930919B2 (en) | Modernization of legacy software systems based on modeled dependencies | |
CN107957957A (en) | The acquisition methods and device of test case | |
CN104572321B (en) | The method and apparatus for testing selection based on control criterion | |
Butcher et al. | Efficient enumeration and hierarchical classification of planar simple-jointed kinematic chains: Application to 12-and 14-bar single degree-of-freedom chains | |
CN104516813B (en) | The choosing method and device of the test node of Webpage | |
US8504968B2 (en) | Method to determine high level power distribution and interface problems in complex integrated circuits | |
CN105824746A (en) | Method and device for automatically generating test scheduling based on use case dependencies | |
CN101719095A (en) | Method and device for managing regression testing | |
WO2020184070A1 (en) | Model generation method, model generation device, and program | |
CN108415846A (en) | A kind of method and apparatus generating minimal automation test use cases | |
CN103744415B (en) | Subway CBTC system detection method and device | |
CN106059853A (en) | Network connectivity test method and device | |
CN109753286A (en) | A method of the code method based on functional label counts its call number | |
CN109213645A (en) | A kind of method and apparatus of distributed memory system performance test | |
US20200151582A1 (en) | Ascriptive and descriptive entities for process and translation: a limited iterative ontological notation | |
US7352170B2 (en) | Exhaustive diagnosis of bridging defects in an integrated circuit including multiple nodes using test vectors and IDDQ measurements | |
CN107844413A (en) | A kind of method of testing and device | |
CN103729410A (en) | Check-box-provided tree structure catalogue construction method and device based on Flash technology | |
CN101794223A (en) | Design method of WADE service message architecture | |
CN106940648A (en) | A kind of method, equipment and the test system of automatic loading test item | |
CN108287787A (en) | A kind of object change impact analysis method and system based on tense | |
Capelo et al. | Automated mathematical modeling from experimental data: An application to material science | |
CN107741905B (en) | Test case, analytic model thereof, execution method, storage medium and processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |