CN107229542A - A kind of method of testing and device - Google Patents
A kind of method of testing and device Download PDFInfo
- Publication number
- CN107229542A CN107229542A CN201610179291.4A CN201610179291A CN107229542A CN 107229542 A CN107229542 A CN 107229542A CN 201610179291 A CN201610179291 A CN 201610179291A CN 107229542 A CN107229542 A CN 107229542A
- Authority
- CN
- China
- Prior art keywords
- test
- script
- configuration
- configuration information
- file
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2289—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention provides a kind of method of testing and device, and this method includes:Script generation instruction is sent to equipment under test;The configuration information file that the first preset format that instruction and business function configuration information are obtained is generated according to the script that the equipment under test is returned is obtained, the configuration information file includes:The configuration information file of chip drives;Compile the test script configuration file of the second preset format of generation automatically according to the configuration information file;The equipment under test is tested according to the test script configuration file.The business function configuration information of learning records on equipment under test is compiled generation test script by the present invention automatically by test main frame, realize the configuration testing to the chip drives function of equipment under test, so that test can depart from business order line, realize the quick test of chip drives function, testing efficiency is improved, is tested oneself the time while saving a large amount of of developer.
Description
Technical field
The present invention relates to integration testing technical field, more particularly to a kind of method of testing and device.
Background technology
Fast development and the diversified development of business with Metropolitan Area Network (MAN), network operator is to accessing and converging
Network equipment quantity and bandwidth demand are growing day by day, while requiring the business work(of integration realization on one device
Can be also more and more.Numerous business functions are integrated in one, and objectively add the complexity of network equipment research and development
Property, also increase the probability of generating function failure in R&D process.In order to ensure product quality, it is desirable to
Research staff is tested product before delivered product.
At present, the software of network equipment research and development of products be typically all it is layering and modular, different aspects
The interface of software through consultation carries out function call.Wherein, between chip drives code and upper-layer service software
Negotiation functionality interface, upper-layer service software calls lower layer chip to drive each functional module by functional interface,
Realize the configuration work of chip.For chip drives research staff, in order to ensure to drive each function mould
The quality of block, it is necessary to which these modules are tested.
Traditional method of testing require each function will developer write test for the interface of the function
Function use-case, by running these use-cases come the correctness of assurance function demand.Traditional method of testing efficiency
Relatively low, one, which is embodied in test function, writes, it is necessary to which research staff takes time to write, compile and debug test
Function;Two are embodied in the quality of these test functions, if that is, these function test coverages are not enough,
Delivery quality can be influenceed, product breaks down to do over again once delivered.
The content of the invention
It is an object of the invention to provide a kind of method of testing and device, driven for solving prior art chips
The problem of method of testing efficiency of dynamic function is low.
To achieve these goals, a kind of system detection method provided in an embodiment of the present invention, including:
Script generation instruction is sent to equipment under test;
Obtain the equipment under test return generates instruction and business function configuration information according to the script
The configuration information file of the first obtained preset format, the configuration information file includes:Chip drives are matched somebody with somebody
Put message file;
Compile the test script configuration file of the second preset format of generation automatically according to the configuration information file;
The equipment under test is tested according to the test script configuration file.
Wherein, before script generation instruction is sent to equipment under test, methods described also includes:
Business function configuration information is sent to the equipment under test.
Wherein, the test script for compiling the second preset format of generation automatically according to the configuration information file
The step of configuration file, including:
Syntax parsing is carried out to the configuration information file, the first Command Line Parsing information is obtained;
The first Command Line Parsing information is preserved with a default syntactic structure;
The the first Command Line Parsing information preserved according to the default syntactic structure is compiled, generation the
The test script configuration file of two preset formats.
It is wherein, described the step of tested according to the test script configuration file the equipment under test,
Including:
Content to the test script configuration file is parsed, and obtains script configuration data stream;
The script configuration data stream is sent to the equipment under test, the chip on the equipment under test is entered
Industry business functional configuration.
The embodiment of the present invention also provides a kind of test device, including:
First sending module, is instructed for sending script generation to equipment under test;
First acquisition module, for obtain that the equipment under test returns according to the script generate instruction and
The configuration information file for the first preset format that business function configuration information is obtained, the configuration information file bag
Include:The configuration information file of chip drives;
Collector, the test for compiling the second preset format of generation automatically according to the configuration information file
Script configuration file;
Test module, for being tested according to the test script configuration file the equipment under test.
Wherein, the test device also includes:
Second sending module, for before script generation instruction is sent to equipment under test, being set to described be tested
Preparation send business function configuration information.
Wherein, the collector includes:
Analyzing sub-module, for carrying out syntax parsing to the configuration information file, obtains the first Command Line Parsing
Information;
Information preserves submodule, for the first Command Line Parsing information to be protected with a default syntactic structure
Deposit;
Submodule is compiled, for the first Command Line Parsing information to being preserved according to the default syntactic structure
It is compiled, generates the test script configuration file of the second preset format.
Wherein, the test module includes:
Script analyzing sub-module, parses for the content to the test script configuration file, obtains pin
This configuration data stream;
Submodule is tested, for the script configuration data stream to be sent to the equipment under test, to the quilt
Chip on measurement equipment carries out business function configuration.
The embodiment of the present invention also provides a kind of method of testing, including:
Obtain the script generation instruction that test main frame is sent;
Business function configuration information is pre-processed according to script generation instruction, and returns to first and is preset
The configuration information file of form is to the test main frame;
Obtain the script configuration data stream that the test main frame is sent;
Business function configuration is carried out to chip according to the script configuration data stream.
Wherein, before the script generation instruction that test main frame is sent is obtained, methods described also includes:
The business function configuration information that the test main frame is sent is obtained, and according to the 3rd preset format to described
Business function configuration information is recorded.
Wherein, business function configuration information is pre-processed according to script generation instruction, and return the
The step of configuration information file of one preset format to test main frame, including:
Instruction set business function configuration information is generated according to the script;
Enter row format conversion to the business function configuration information, obtain the configuration information text of the first preset format
Part;
The configuration information file of first preset format is back to the test main frame.
Wherein, it is described according to the script configuration data stream to chip carry out business function configuration the step of, bag
Include:
Dissection process is carried out to the script configuration data stream, the interface configuration parameter of chip is obtained;
Corresponding chip drives interface function is called according to the interface configuration parameter, the chip is carried out
Business function is configured.
The embodiment of the present invention also provides a kind of test device, including:
Second acquisition module, the script for obtaining test main frame transmission generates instruction;
Pretreatment module, for being pre-processed according to script generation instruction to business function configuration information,
And the configuration information file of the first preset format is returned to the test main frame;
3rd acquisition module, for obtaining the script configuration data stream that the test main frame is sent;
Configuration module, for carrying out business function configuration to chip according to the script configuration data stream.
Wherein, the test device also includes:
4th acquisition module, for before the script generation instruction that test main frame is sent is obtained, obtaining described
The business function configuration information that test main frame is sent, and the business function is configured according to the 3rd preset format
Information is recorded.
Wherein, the pretreatment module includes:
Information aggregate submodule, for generating instruction set business function configuration information according to the script;
Form transform subblock, for entering row format conversion to the business function configuration information, obtains first
The configuration information file of preset format;
Submodule is returned, is led for the configuration information file of first preset format to be back into the test
Machine.
Wherein, the configuration module includes:
Dissection process submodule, for carrying out dissection process to the script configuration data stream, obtains chip
Interface configuration parameter;
Submodule is configured, for calling corresponding chip drives interface function according to the interface configuration parameter,
Business function configuration is carried out to the chip.
The above-mentioned technical proposal of the present invention has the beneficial effect that:
In the such scheme of the present invention, the business function of learning records on equipment under test is matched somebody with somebody by test main frame
The automatic compiling generation test script of confidence breath, realizes the configuration testing to the chip drives function of equipment under test,
So that test can depart from business order line, the quick test of chip drives function is realized, testing efficiency is improved,
The a large amount of of developer are saved simultaneously to test oneself the time.
Brief description of the drawings
Fig. 1 is the basic step schematic diagram of the method for testing of the embodiment of the present invention;
Fig. 2 is the composition structural representation of the test device of the embodiment of the present invention;
Fig. 3 is the basic step schematic diagram of the another method of testing of the embodiment of the present invention;
Fig. 4 is the composition structural representation of the another test device of the embodiment of the present invention;
Fig. 5 is test script product process schematic diagram in the method for testing of the embodiment of the present invention;
Fig. 6 is test script testing process schematic diagram in the method for testing of the embodiment of the present invention;
Fig. 7 is the workflow schematic diagram of specific compiler in host test platform in Fig. 5.
Embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with attached
Figure and specific embodiment are described in detail.
There is provided one kind for the problem of method of testing efficiency of the invention for chip drives function in the prior art is low
System detection method, it is by test main frame that the business function configuration information of learning records on equipment under test is automatic
Compiling generation test script, realizes the configuration testing to the chip drives function of equipment under test so that test can
Disengaging business order line, realizes the quick test of chip drives function, improves testing efficiency, is opened while saving
The a large amount of of hair personnel test oneself the time.
First embodiment
As shown in figure 1, the embodiment of the present invention provides a kind of method of testing, applied to test main frame, including:
Step 11, script generation is sent to equipment under test to instruct;
Step 12, obtain the equipment under test return generates instruction and business function according to the script
The configuration information file for the first preset format that configuration information is obtained, the configuration information file includes:Chip
The configuration information file of driving;
Here, business function configuration information has been pre-saved in equipment under test.
Step 13, the test script of the second preset format of generation is compiled automatically according to the configuration information file
Configuration file;
Step 14, the equipment under test is tested according to the test script configuration file.
The method of testing of the embodiment of the present invention, generation test script, realization pair are compiled by test main frame automatically
The configuration testing of the chip drives function of equipment under test so that test can depart from business order line, realize chip
The quick test of driving function, improves testing efficiency, is tested oneself the time while saving a large amount of of developer.
Further, in the embodiment of the present invention step 11 to equipment under test send script generation instruction before
Methods described may also include:
Step 10, business function configuration information is sent to the equipment under test.
Here, test main frame is sent configuration information to equipment under test by business order line, by equipment under test
Business function configuration information described in learning records.
Step 13 described in the embodiment of the present invention can further comprise:
Step 131, syntax parsing is carried out to the configuration information file, obtains the first Command Line Parsing information;
Here, the file format of configuration information file is the first preset format, can pass through format syntax resolver
To carry out syntax parsing to configuration information file.
Step 132, the first Command Line Parsing information is preserved with a default syntactic structure;
It should be noted that being preserved with a default syntactic structure to the first Command Line Parsing information, after being easy to
The classification of continuous data is preserved.Here, default syntactic structure can be tree, certainly, be not limited only to this
Structure.
Step 133, the first Command Line Parsing information preserved according to the default syntactic structure is compiled
Translate, generate the test script configuration file of the second preset format.
Here, have a variety of to the language that the first Command Line Parsing information carries out script compiling, it is preferable that the present invention
The script compiler language of embodiment is Python scripts.
Step 14 described in the embodiment of the present invention can further comprise:
Step 141, the content to the test script configuration file is parsed, and obtains script configuration data
Stream;
Step 142, the script configuration data stream is sent to the equipment under test, to the equipment under test
On chip carry out business function configuration.
Here, the content of script configuration file is sent in the way of script configuration data stream to equipment under test, quilt
Measurement equipment to chip after parsing of the data stream directly to carrying out test configurations.
So, equipment under test need not provide extra memory space storage test script, need not more pass through quilt
The test script is run on measurement equipment.The memory space of equipment under test is saved, and mitigates the operation of equipment under test
Burden, improves the speed of service.
Explanation is needed exist for, the method for testing of the embodiment of the present invention is applicable to embedded system.
The method of testing of the embodiment of the present invention, by test main frame by the business work(of learning records on equipment under test
Energy configuration information compiles generation test script automatically, realizes that the configuration to the chip drives function of equipment under test is surveyed
Examination so that test can depart from business order line, realizes the quick test of chip drives function, improves test effect
Rate, tests oneself the time while saving a large amount of of developer.
Second embodiment
As shown in Fig. 2 the embodiment of the present invention also provides a kind of test device, applied to test main frame, including:
First sending module 21, is instructed for sending script generation to equipment under test;
First acquisition module 22, is instructed for obtaining being generated according to the script for equipment under test return
And the configuration information file of the first preset format that business function configuration information is obtained, the configuration information text
Part includes:The configuration information file of chip drives;
Here, business function configuration information has been pre-saved in equipment under test.
Collector 23, for compiling the second preset format of generation automatically according to the configuration information file
Test script configuration file;
Test module 24, for being tested according to the test script configuration file the equipment under test.
Further, test device also includes described in the embodiment of the present invention:
Second sending module 20, for before script generation instruction is sent to equipment under test, to the quilt
Measurement equipment sends business function configuration information.
Here, test main frame is sent configuration information to equipment under test by business order line, by equipment under test
Business function configuration information described in learning records.
Specifically, collector 23 described in the embodiment of the present invention may also include:
Analyzing sub-module, for carrying out syntax parsing to the configuration information file, obtains the first Command Line Parsing
Information;
Here, the file format of configuration information file is the first preset format, can pass through format syntax resolver
To carry out syntax parsing to configuration information file.
Information preserves submodule, for the first Command Line Parsing information to be protected with a default syntactic structure
Deposit;
It should be noted that being preserved with a default syntactic structure to the first Command Line Parsing information, after being easy to
The classification of continuous data is preserved.Here, default syntactic structure can be tree, certainly, be not limited only to this
Structure.
Submodule is compiled, for the first Command Line Parsing information to being preserved according to the default syntactic structure
It is compiled, generates the test script configuration file of the second preset format.
Here, have a variety of to the language that the first Command Line Parsing information carries out script compiling, it is preferable that the present invention
The script compiler language of embodiment is Python scripts.
Test module 24 described in the embodiment of the present invention may particularly include:
Script analyzing sub-module, parses for the content to the test script configuration file, obtains pin
This configuration data stream;
Submodule is tested, for the script configuration data stream to be sent to the equipment under test, to the quilt
Chip on measurement equipment carries out business function configuration.
Here, the content of script configuration file is sent in the way of script configuration data stream to equipment under test, quilt
Measurement equipment to chip after parsing of the data stream directly to carrying out test configurations.
So, equipment under test need not provide extra memory space storage test script, need not more pass through quilt
The test script is run on measurement equipment.The memory space of equipment under test is saved, and mitigates the operation of equipment under test
Burden, improves the speed of service.
Explanation is needed exist for, the test device of the embodiment of the present invention is applicable to embedded system.
The test device of the embodiment of the present invention, by test main frame by the business work(of learning records on equipment under test
Energy configuration information compiles generation test script automatically, realizes that the configuration to the chip drives function of equipment under test is surveyed
Examination so that test can depart from business order line, realizes the quick test of chip drives function, improves test effect
Rate, tests oneself the time while saving a large amount of of developer.
3rd embodiment
As shown in figure 3, the embodiment of the present invention also provides a kind of method of testing, applied to equipment under test, including:
Step 31, the script generation instruction that test main frame is sent is obtained;
Step 32, business function configuration information is pre-processed according to script generation instruction, and returned
The configuration information file of the first preset format is returned to the test main frame;
Step 33, the script configuration data stream that the test main frame is sent is obtained;
Here, script configuration data stream can be obtained by test main frame to the Context resolution of test script configuration file
Arrive.
Step 34, business function configuration is carried out to chip according to the script configuration data stream.
Here, business function configuration is carried out to chip by the way of script configuration data stream, tested set can be made
It is standby that extra memory space storage test script need not be provided, more need not be by running the survey on equipment under test
Training sheet.The memory space of equipment under test is saved, and mitigates the operation burden of equipment under test, operation speed is improved
Degree.
The method of testing of the embodiment of the present invention, the script configuration data stream sent by test main frame is set to tested
Standby chip drives function is quickly tested so that test can depart from business order line, improves test effect
Rate, tests oneself the time while saving a large amount of of developer.
Further, step 31 is obtaining the script generation instruction that test main frame is sent in the embodiment of the present invention
Before, the method for testing may also include:
Step 30, the business function configuration information that the test main frame is sent is obtained, and it is default according to the 3rd
Form is recorded to the business function configuration information.
It should be noted that, equipment under test can obtain what the test main frame was sent by receiving business order line
Business function configuration information, here, embedded one section of study journey can be passed through to the record of business function configuration information
Sequence is realized.
Step 32 described in the embodiment of the present invention can further comprise:
Step 321, instruction set business function configuration information is generated according to the script;
Here, business function configuration information has been pre-saved in equipment under test.
Step 322, row format conversion is entered to the business function configuration information, the first preset format is obtained
Configuration information file;
Here, the purpose that row format conversion is entered to the business function configuration information is easy for follow-up test main frame
The compiling of test script is carried out to business function configuration information.
Step 323, the configuration information file of first preset format is back to the test main frame.
Step 34 described in the embodiment of the present invention can further comprise:
Step 341, dissection process is carried out to the script configuration data stream, obtains the interface configuration ginseng of chip
Number;
Explanation is needed exist for, equipment under test carries out dissection process to the script configuration data stream, without
It is after testing results script, to obtain the interface configuration parameter of chip, that is to say, that quilt on the equipment under test
Measurement equipment need not provide extra memory space storage test script, more need not be by being run on equipment under test
The test script.The memory space of equipment under test is saved, and mitigates the operation burden of equipment under test, fortune is improved
Scanning frequency degree.
Step 342, corresponding chip drives interface function is called according to the interface configuration parameter, to institute
State chip and carry out business function configuration.
Explanation is needed exist for, the method for testing of the embodiment of the present invention is applicable to embedded system.
The method of testing of the embodiment of the present invention, the script configuration data stream sent by test main frame is set to tested
Standby chip drives function is quickly tested so that test can depart from business order line, improves test effect
Rate, tests oneself the time while saving a large amount of of developer.
Fourth embodiment
As shown in figure 4, the embodiment of the present invention also provides a kind of test device, applied to equipment under test, including:
Second acquisition module 41, the script for obtaining test main frame transmission generates instruction;
Pretreatment module 42, is carried out in advance for generating instruction according to the script to business function configuration information
Processing, and the configuration information file of the first preset format is returned to the test main frame;
3rd acquisition module 43, for obtaining the script configuration data stream that the test main frame is sent;
Configuration module 44, for carrying out business function configuration to chip according to the script configuration data stream.
Here, business function is carried out to chip by the way of script configuration data stream in configuration module 44 to match somebody with somebody
Put, equipment under test can be made to provide extra memory space storage test script, more need not be by tested
The test script is run in equipment.The memory space of equipment under test is saved, and mitigates the operation of equipment under test and is born
Load, improves the speed of service.
Further, test device also includes described in the embodiment of the present invention:
4th acquisition module 40, for before the script generation instruction that test main frame is sent is obtained, obtaining
The business function configuration information that the test main frame is sent, and according to the 3rd preset format to the business function
Configuration information is recorded.
It should be noted that, equipment under test can obtain what the test main frame was sent by receiving business order line
Business function configuration information, here, embedded one section of study journey can be passed through to the record of business function configuration information
Sequence is realized.
Specifically, pretreatment module 42 described in the embodiment of the present invention may include:
Information aggregate submodule, for generating instruction set business function configuration information according to the script;
Here, business function configuration information has been pre-saved in equipment under test.
Form transform subblock, for entering row format conversion to the business function configuration information, obtains first
The configuration information file of preset format;
Here, the purpose that row format conversion is entered to the business function configuration information is easy for follow-up test main frame
The compiling of test script is carried out to business function configuration information.
Submodule is returned, is led for the configuration information file of first preset format to be back into the test
Machine.
Specifically, configuration module 44 described in the embodiment of the present invention may include:
Dissection process submodule, for carrying out dissection process to the script configuration data stream, obtains chip
Interface configuration parameter;
Explanation is needed exist for, equipment under test carries out dissection process to the script configuration data stream, without
It is after testing results script, to obtain the interface configuration parameter of chip, that is to say, that quilt on the equipment under test
Measurement equipment need not provide extra memory space storage test script, more need not be by being run on equipment under test
The test script.The memory space of equipment under test is saved, and mitigates the operation burden of equipment under test, fortune is improved
Scanning frequency degree.
Submodule is configured, for calling corresponding chip drives interface function according to the interface configuration parameter,
Business function configuration is carried out to the chip.
Explanation is needed exist for, the method for testing of the embodiment of the present invention is applicable to embedded system.
The test device of the embodiment of the present invention, the script configuration data stream sent by test main frame is set to tested
Standby chip drives function is quickly tested so that test can depart from business order line, improves test effect
Rate, tests oneself the time while saving a large amount of of developer.
5th embodiment
As shown in figure 5, be test script generation schematic diagram in the embodiment of the present invention, with reference to Fig. 6, i.e.,
Test script test schematic diagram, describes a specific implementation process of method of testing of the present invention in detail.
Need exist for explanation, the executive agent of method of testing of the present invention for main frame test platform 01 ' and by
Measurement equipment 02 '.
Wherein, host test platform 01 ' includes:Business order line configuration interface 03 ', script configuration interface
04 ', command analysis device 05 ', test script configuration file 06 ' and specific compiler 07 '.
Equipment under test 02 ' includes:Upper-layer service program 08 ', chip drives interface 09 ', chip 10 ' is learned
Habit program 11 ', business function configuration information 12 ' and test server 13 '.Comprise the following steps that:
1) test script is generated
First, host test platform 01 ' carries out business function configuration by business order line configuration interface 03 ';
It is, tester is by inputting the incoming traffic order line on business order line configuration interface 03 '
Business configuration order is sent to the upper-layer service program 08 ' on equipment under test 02 ';
Then, the upper-layer service program 08 ' on equipment under test 02 ' is driven after receiving business configuration order
Mobile interface is called, meanwhile, it is arranged on upper-layer service program 08 ' and is connect with the driving on chip drives interface 09 '
Learning program 11 ' between mouth program completes industry according to the 3rd preset format record traffic functional configuration information
Business configuration.
Here, the learning program 11 ' can be embedded on upper-layer service program 08 ' and chip drives interface 09 '
Between driving interface program.
Then, host test platform 01 ' sends script generation by script configuration interface 04 ' and instructed to tested
Test server 13 ' in equipment 02 '.
Afterwards, the test server 13 ' of equipment under test 02 ' receives aggregate traffic function after script generation instruction
Configuration information, and business function configuration information is converted to configuration information file and the return of the first preset format
To host test platform 01 '.
Finally, configuration information of the specific compiler 07 ' in host test platform 01 ' to the first preset format
File carries out automatic compiling conversion, generates the test script configuration file of the 3rd preset format.
Here, specific compiler 07 ' is the key that test script is automatically generated, and the compiler passes through Python
Script exploitation is obtained, and realizes format syntax parsing and the Python command script of configuration information file
Compiling.
Specifically, specific compiler 07 ', as shown in fig. 7, first, configuration information file is input to form
Grammar parser 14 ', the information after parsing is preserved with specific syntax tree;Then, Python orders
Information of the script compiler 15 ' in grammer tree is compiled, finally, exports Python
Test script configuration file.
2) test script is tested
First, the test script configuration file 06 ' of host test platform 01 ' will by script configuration interface 04 '
Test script configuration content is input to the establishment that command analysis device 05 ' carries out configuration data stream;
Then, configuration data is streamed to the test server in equipment under test 02 ' by command analysis device 05 '
13’;
Finally, test server 13 ' receives and interface configuration parameter is parsed after configuration data stream, and calls phase
The interface function for the chip drives interface 09 ' answered, by configuration distributing to the corresponding register of chip 10 ' and table
Xiang Zhong, completes the configuration of business function.
Here, it is necessary to illustrate, after generation test script configuration file, on follow-up equipment under test not
Upper-layer service program is needed again, it is, the method for testing of the present invention can depart from order line, by testing pin
This quickly realizes the test of the chip drives function of equipment under test in the way of configuration data stream.
The method of testing of the embodiment of the present invention, by test main frame by the business work(of learning records on equipment under test
Energy configuration information compiles generation test script automatically, realizes that the configuration to the chip drives function of equipment under test is surveyed
Examination so that test can depart from business order line, realizes the quick test of chip drives function, improves test effect
Rate, tests oneself the time while saving a large amount of of developer.
Described above is the preferred embodiment of the present invention, it is noted that for the common skill of the art
For art personnel, on the premise of principle of the present invention is not departed from, some improvements and modifications can also be made,
These improvements and modifications also should be regarded as protection scope of the present invention.
Claims (16)
1. a kind of method of testing, it is characterised in that including:
Script generation instruction is sent to equipment under test;
Obtain the equipment under test return generates instruction and business function configuration information according to the script
The configuration information file of the first obtained preset format, the configuration information file includes:Chip drives are matched somebody with somebody
Put message file;
Compile the test script configuration file of the second preset format of generation automatically according to the configuration information file;
The equipment under test is tested according to the test script configuration file.
2. method of testing according to claim 1, it is characterised in that sending pin to equipment under test
Before this generation instruction, methods described also includes:
Business function configuration information is sent to the equipment under test.
3. method of testing according to claim 1, it is characterised in that match somebody with somebody confidence described in the basis
The step of breath file compiles the test script configuration file of the second preset format of generation automatically, including:
Syntax parsing is carried out to the configuration information file, the first Command Line Parsing information is obtained;
The first Command Line Parsing information is preserved with a default syntactic structure;
The the first Command Line Parsing information preserved according to the default syntactic structure is compiled, generation the
The test script configuration file of two preset formats.
4. method of testing according to claim 1, it is characterised in that described according to the test pin
The step of this configuration file is tested the equipment under test, including:
Content to the test script configuration file is parsed, and obtains script configuration data stream;
The script configuration data stream is sent to the equipment under test, the chip on the equipment under test is entered
Industry business functional configuration.
5. a kind of test device, it is characterised in that including:
First sending module, is instructed for sending script generation to equipment under test;
First acquisition module, for obtain that the equipment under test returns according to the script generate instruction and
The configuration information file for the first preset format that business function configuration information is obtained, the configuration information file bag
Include:The configuration information file of chip drives;
Collector, the test for compiling the second preset format of generation automatically according to the configuration information file
Script configuration file;
Test module, for being tested according to the test script configuration file the equipment under test.
6. test device according to claim 5, it is characterised in that the test device also includes:
Second sending module, for before script generation instruction is sent to equipment under test, being set to described be tested
Preparation send business function configuration information.
7. test device according to claim 5, it is characterised in that the collector includes:
Analyzing sub-module, for carrying out syntax parsing to the configuration information file, obtains the first Command Line Parsing
Information;
Information preserves submodule, for the first Command Line Parsing information to be protected with a default syntactic structure
Deposit;
Submodule is compiled, for the first Command Line Parsing information to being preserved according to the default syntactic structure
It is compiled, generates the test script configuration file of the second preset format.
8. test device according to claim 5, it is characterised in that the test module includes:
Script analyzing sub-module, parses for the content to the test script configuration file, obtains pin
This configuration data stream;
Submodule is tested, for the script configuration data stream to be sent to the equipment under test, to the quilt
Chip on measurement equipment carries out business function configuration.
9. a kind of method of testing, it is characterised in that including:
Obtain the script generation instruction that test main frame is sent;
Business function configuration information is pre-processed according to script generation instruction, and returns to first and is preset
The configuration information file of form is to the test main frame;
Obtain the script configuration data stream that the test main frame is sent;
Business function configuration is carried out to chip according to the script configuration data stream.
10. method of testing according to claim 9, it is characterised in that sent obtaining test main frame
Script generation instruction before, methods described also includes:
The business function configuration information that the test main frame is sent is obtained, and according to the 3rd preset format to described
Business function configuration information is recorded.
11. method of testing according to claim 9, it is characterised in that referred to according to script generation
Order is pre-processed to business function configuration information, and the first preset format of return configuration information file to institute
The step of stating test main frame, including:
Instruction set business function configuration information is generated according to the script;
Enter row format conversion to the business function configuration information, obtain the configuration information text of the first preset format
Part;
The configuration information file of first preset format is back to the test main frame.
12. method of testing according to claim 9, it is characterised in that described to be matched somebody with somebody according to the script
The step of data flow carries out business function configuration to chip is put, including:
Dissection process is carried out to the script configuration data stream, the interface configuration parameter of chip is obtained;
Corresponding chip drives interface function is called according to the interface configuration parameter, the chip is carried out
Business function is configured.
13. a kind of test device, it is characterised in that including:
Second acquisition module, the script for obtaining test main frame transmission generates instruction;
Pretreatment module, for being pre-processed according to script generation instruction to business function configuration information,
And the configuration information file of the first preset format is returned to the test main frame;
3rd acquisition module, for obtaining the script configuration data stream that the test main frame is sent;
Configuration module, for carrying out business function configuration to chip according to the script configuration data stream.
14. test device according to claim 13, it is characterised in that the test device is also wrapped
Include:
4th acquisition module, for before the script generation instruction that test main frame is sent is obtained, obtaining described
The business function configuration information that test main frame is sent, and the business function is configured according to the 3rd preset format
Information is recorded.
15. test device according to claim 13, it is characterised in that the pretreatment module bag
Include:
Information aggregate submodule, for generating instruction set business function configuration information according to the script;
Form transform subblock, for entering row format conversion to the business function configuration information, obtains first
The configuration information file of preset format;
Submodule is returned, is led for the configuration information file of first preset format to be back into the test
Machine.
16. test device according to claim 13, it is characterised in that the configuration module includes:
Dissection process submodule, for carrying out dissection process to the script configuration data stream, obtains chip
Interface configuration parameter;
Submodule is configured, for calling corresponding chip drives interface function according to the interface configuration parameter,
Business function configuration is carried out to the chip.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610179291.4A CN107229542A (en) | 2016-03-25 | 2016-03-25 | A kind of method of testing and device |
PCT/CN2017/078165 WO2017162210A1 (en) | 2016-03-25 | 2017-03-24 | Test configuration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610179291.4A CN107229542A (en) | 2016-03-25 | 2016-03-25 | A kind of method of testing and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107229542A true CN107229542A (en) | 2017-10-03 |
Family
ID=59899262
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610179291.4A Pending CN107229542A (en) | 2016-03-25 | 2016-03-25 | A kind of method of testing and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107229542A (en) |
WO (1) | WO2017162210A1 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109151860A (en) * | 2018-07-27 | 2019-01-04 | 深圳市极致汇仪科技有限公司 | A kind of test configuration method and its system of wireless chip |
CN111159003A (en) * | 2018-11-07 | 2020-05-15 | 马上消费金融股份有限公司 | Batch processing test method and device |
CN112284437A (en) * | 2020-10-15 | 2021-01-29 | 歌尔光学科技有限公司 | Layered logic control method, device, equipment and readable storage medium |
CN112444731A (en) * | 2020-10-30 | 2021-03-05 | 海光信息技术股份有限公司 | Chip testing method and device, processor chip and server |
CN112630622A (en) * | 2020-12-17 | 2021-04-09 | 珠海芯网测控有限公司 | Method and system for pattern compiling and downloading test of ATE (automatic test equipment) |
CN115629295A (en) * | 2022-11-30 | 2023-01-20 | 苏州萨沙迈半导体有限公司 | Chip automation test system, method and storage medium |
CN115766541A (en) * | 2022-11-15 | 2023-03-07 | 合众新能源汽车有限公司 | Device testing method, device, computer equipment and storage medium |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109086199B (en) * | 2018-06-22 | 2022-06-07 | 网宿科技股份有限公司 | Method, terminal and storage medium for automatically generating test script |
CN110647458A (en) * | 2018-06-27 | 2020-01-03 | 优视科技有限公司 | Testing method and device based on distributed testing platform and electronic equipment |
CN110262811A (en) * | 2019-06-18 | 2019-09-20 | 深圳创维-Rgb电子有限公司 | General configuration method, device and the storage medium of plug-in chip |
CN113778770B (en) * | 2021-09-10 | 2024-06-25 | 深圳市华宇福保半导体有限公司 | Detection method and system for hard disk chip |
CN114117011A (en) * | 2021-11-29 | 2022-03-01 | 武汉联影智融医疗科技有限公司 | Development method, device and system of lower computer simulator and storage medium |
CN115473837B (en) * | 2022-02-22 | 2024-03-22 | 北京广利核系统工程有限公司 | Communication test tool capable of configuring protocol and communication test method based on communication test tool |
CN115174430B (en) * | 2022-06-30 | 2024-01-26 | 中车青岛四方车辆研究所有限公司 | Method and device for testing starting time of track traffic vehicle-mounted equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1790957A (en) * | 2004-12-14 | 2006-06-21 | 华为技术有限公司 | Apparatus testing method |
US7752607B2 (en) * | 2005-10-13 | 2010-07-06 | Sap Ag | System and method for testing business process configurations |
CN101770423B (en) * | 2009-12-25 | 2013-02-27 | 中兴通讯股份有限公司 | Test data generation method and test system |
US9280514B1 (en) * | 2012-07-11 | 2016-03-08 | Tellabs Operations, Inc. | Optimizing testability of network devices using markup language based output |
-
2016
- 2016-03-25 CN CN201610179291.4A patent/CN107229542A/en active Pending
-
2017
- 2017-03-24 WO PCT/CN2017/078165 patent/WO2017162210A1/en active Application Filing
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109151860A (en) * | 2018-07-27 | 2019-01-04 | 深圳市极致汇仪科技有限公司 | A kind of test configuration method and its system of wireless chip |
CN109151860B (en) * | 2018-07-27 | 2021-09-07 | 深圳市极致汇仪科技有限公司 | Test configuration method and system of wireless chip |
CN111159003A (en) * | 2018-11-07 | 2020-05-15 | 马上消费金融股份有限公司 | Batch processing test method and device |
CN112284437A (en) * | 2020-10-15 | 2021-01-29 | 歌尔光学科技有限公司 | Layered logic control method, device, equipment and readable storage medium |
CN112444731A (en) * | 2020-10-30 | 2021-03-05 | 海光信息技术股份有限公司 | Chip testing method and device, processor chip and server |
CN112444731B (en) * | 2020-10-30 | 2023-04-11 | 海光信息技术股份有限公司 | Chip testing method and device, processor chip and server |
CN112630622A (en) * | 2020-12-17 | 2021-04-09 | 珠海芯网测控有限公司 | Method and system for pattern compiling and downloading test of ATE (automatic test equipment) |
CN112630622B (en) * | 2020-12-17 | 2022-05-31 | 珠海芯业测控有限公司 | Method and system for pattern compiling, downloading and testing of ATE (automatic test equipment) |
CN115766541A (en) * | 2022-11-15 | 2023-03-07 | 合众新能源汽车有限公司 | Device testing method, device, computer equipment and storage medium |
CN115766541B (en) * | 2022-11-15 | 2024-05-07 | 合众新能源汽车股份有限公司 | Device testing method, device, computer equipment and storage medium |
CN115629295A (en) * | 2022-11-30 | 2023-01-20 | 苏州萨沙迈半导体有限公司 | Chip automation test system, method and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2017162210A1 (en) | 2017-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107229542A (en) | A kind of method of testing and device | |
US20110289484A1 (en) | Method and System for Script Processing for Web-Based Applications | |
CN103530226B (en) | Electronic equipment peripheral hardware compatibility test method and device | |
CN104268079B (en) | A kind of method and system of POS Application testings | |
CN101645013A (en) | Plug-in type service management system and method of integrated service management platform | |
CN105335287B (en) | A kind of automated testing method and device | |
CN112631932A (en) | Sub-function independent test method of automatic train monitoring system based on interface | |
CN109857663B (en) | Keyword driving and image similarity combined automatic test platform | |
CN110413316A (en) | Non-intrusion type test macro and method towards block chain intelligence contract | |
US11163544B2 (en) | Vertical solution integrator | |
CN101241491A (en) | Method and system for checking data | |
CN1841340A (en) | Method and system for testing drive software | |
CN107957940A (en) | A kind of test log processing method, system and terminal | |
CN105739481B (en) | The test method of industrial control software, apparatus and system | |
CN109005079A (en) | A kind of detection method and device of electric automobile charging pile communication protocol | |
CN105279196A (en) | Test script generation method and apparatus | |
CN102868717A (en) | Method, device and system for editing and debugging voice extensible markup language script | |
Cooper et al. | 1.6. 2 formalizing a structured natural language requirements specification notation | |
CN106972983A (en) | The automatic test device and method of network interface | |
CN106649110A (en) | Software test method and system | |
CN109947642A (en) | Automated hierarchical test method based on case classification, apparatus and system | |
CN112988590A (en) | Electromagnetic environment hybrid automatic testing method and system, storage medium and terminal equipment | |
CN105630665B (en) | A kind of application program adjustment method based on android system and terminal device | |
CN107679159A (en) | Generation method, device, server and the storage medium that fault diagnosis class problem replies | |
CN102567066B (en) | Business system development method, business system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20171003 |
|
WD01 | Invention patent application deemed withdrawn after publication |