CN104461565B - A kind of optical module test parameter collocation method and system - Google Patents

A kind of optical module test parameter collocation method and system Download PDF

Info

Publication number
CN104461565B
CN104461565B CN201410819549.3A CN201410819549A CN104461565B CN 104461565 B CN104461565 B CN 104461565B CN 201410819549 A CN201410819549 A CN 201410819549A CN 104461565 B CN104461565 B CN 104461565B
Authority
CN
China
Prior art keywords
test
parameter
test parameter
optical module
postponed
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
Application number
CN201410819549.3A
Other languages
Chinese (zh)
Other versions
CN104461565A (en
Inventor
代辉
陈晓鹏
曾海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Source Photonics Chengdu Co Ltd
Original Assignee
Source Photonics Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Source Photonics Chengdu Co Ltd filed Critical Source Photonics Chengdu Co Ltd
Priority to CN201410819549.3A priority Critical patent/CN104461565B/en
Publication of CN104461565A publication Critical patent/CN104461565A/en
Application granted granted Critical
Publication of CN104461565B publication Critical patent/CN104461565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of optical module test parameter collocation method and system, method to include:The step of extracting the test parameter in optical module test program;The step of test parameter is configured according to presumptive test condition;By described the step of arriving database with the test parameter postponed storage.The efficiency of test parameter configuration, can quickly realize the configuration of test parameter, facilitate follow-up test process automatically when the present invention improves optical module test.

Description

A kind of optical module test parameter collocation method and system
Technical field
The present invention relates to optical module testing field, more particularly to a kind of optical module test parameter collocation method and system.
Background technology
In existing optical module test process, the parameter configuration of test program needs to use required for test program manually Parameter value manual configuration corresponding to parameter name and title is into database, and then testing results program, test program are run During these configurations are obtained from database, because test program and parameter configuration are not closed procedures, so in database The possibility that parameter required for the parameter and test program of configuration does not correspond to is high, and manual operation easily malfunctions, and is joining The correctness of configuration parameter can not be also verified when number configuration, so can only see that test program is by testing results program No to report an error to check whether the parameter of configuration is correct, this inspection is extremely wasted time and energy, and influences optical module testing efficiency.
The content of the invention
It is an object of the invention to overcome the above-mentioned deficiency in the presence of prior art, there is provided one kind automatically configures test ginseng Number, the high optical module test parameter collocation method of testing efficiency and system.
In order to realize foregoing invention purpose, the technical solution adopted by the present invention is:A kind of optical module test parameter configuration side Method, including:
The step of extracting the test parameter in optical module test program;
The step of test parameter is configured according to presumptive test condition;
By described the step of arriving database with the test parameter postponed storage.
Preferably, it is described extraction optical module test program in test parameter the step of be specially:Skill is reflected by .NET Art is by all pre-defined parameters, functional object and/or the function subobject in the code of the compiled test program Reflect, then corresponding parameter name, functional object and/or subfunction object oriented are found by predetermined mark object;Its Described in make a reservation for mark object set in the written in code of the test program.
Preferably, at least one parameter defined in code of the presumptive test condition for the test program of extraction Title and its value;It is described according to presumptive test condition configure the test parameter the step of be specially:According to described at least one The individual corresponding test parameter of parameter name and its value configuration.
Preferably, in addition to the display test parameter and/or it is described with the test parameter postponed the step of.
Preferably, in addition to described in verification the step of the presumptive test condition whether is met with the test parameter postponed Suddenly;If so, then arrive database with the test parameter postponed storage by described.
The present invention also provides a kind of optical module test parameter configuration system, including:
Parameter extraction module, for extracting the test parameter in optical module test program;
Parameter configuration module, for configuring the test parameter according to presumptive test condition;
Memory module, for arriving database with the test parameter postponed storage by described.
Preferably, the parameter extraction module is specifically used for passing through .NET reflection technologies by the compiled test program Code in all pre-defined parameters, functional object and/or function subobject reflect, then pass through predetermined mark pair As finding corresponding parameter name, functional object and/or subfunction object oriented;Wherein described predetermined mark object is in the survey Set during the written in code for trying program.
Preferably, at least one parameter defined in code of the presumptive test condition for the test program of extraction Title and its value;The parameter configuration module is specifically used for being configured accordingly according at least one parameter name and its value The test parameter.
Preferably, in addition to display module, for showing the test parameter and/or described with the test postponed ginseng Number.
Preferably, in addition to correction verification module, for receive the parameter configuration module output with the test postponed Parameter, whether verification is described meets the presumptive test condition with the test parameter postponed;If so, then export the configuration The test parameter afterwards is to memory module.
Compared with prior art, beneficial effects of the present invention:
Test parameter of the present invention in optical module test program is automatically extracted before test program is run, according to presumptive test Condition configures the test parameter and complies with test request, then arrives data with the test parameter postponed storage by described Storehouse, carry out the test of optical module when test program is run with the test parameter postponed from database extraction automatically.The present invention can be certainly The dynamic quick configuration for realizing test parameter, facilitate the optical module test process of later testing sequence so that optical module testing efficiency Greatly improve.
Brief description of the drawings:
Fig. 1 is the optical module test parameter collocation method flow chart of the embodiment of the present invention;
Fig. 2 is the optical module test parameter configuration system block diagram of the embodiment of the present invention.
Embodiment
With reference to embodiment, the present invention is described in further detail.But this should not be interpreted as to the present invention The scope of above-mentioned theme is only limitted to following embodiment, all models that the present invention is belonged to based on the technology that present invention is realized Enclose.
Test parameter of the present invention in optical module test program is automatically extracted before test program is run, according to presumptive test Condition configures the test parameter and complies with test request, then arrives data with the test parameter postponed storage by described Storehouse, carry out the test of optical module when test program is run with the test parameter postponed from database extraction automatically.The present invention can be certainly The dynamic quick configuration for realizing test parameter, facilitate the optical module test process of later testing sequence so that optical module testing efficiency Greatly improve.Illustrate below in conjunction with the accompanying drawings.
A kind of light module test method as shown in Figure 1, comprises the following steps:
S1, extract the step of test parameter in optical module test program.
Specifically, it is described extraction optical module test program in test parameter the step of be specially:Skill is reflected by .NET Art is by all pre-defined parameters, functional object and/or the function subobject in the code of the compiled test program Reflect, then corresponding parameter name, functional object and/or subfunction object oriented are found by predetermined mark object;Its Described in make a reservation for mark object set in the written in code of the test program.
Predetermined mark object is used to the parameter name in code, function pair in code while test program is developed As, subfunction object is identified.Such as:[AttributeFieldProperties("CPDac experienced value at T0 which makes cp in the tuning range at T0",
true, EnumDataType.Numeric, DefaultValue = "64", IsLimit = true,
LowerLimit = 48,
UpperLimit = 128)]
private const string CONST_CPDAC_INIT_T0 = "CPDAC_INIT_T0";
This identifies the parameter that one parameter name of object identity is " CPDAC_INIT_T0 ", and the value of the parameter Type, default value 64 and value scope 48-128.
All defined parameters, the object reflection in compiled test program are come out by .NET reflection function, so Corresponding parameter name, functional object, subfunction object etc. are found by predetermined mark object again afterwards.
S2, according to presumptive test condition configure the test parameter the step of.
The presumptive test condition for extraction the test program code defined at least one parameter name and Its value;It is described according to presumptive test condition configure the test parameter the step of be specially:According at least one parameter Title and its corresponding test parameter of value configuration.So that above-mentioned parameter name is the parameter of " CPDAC_INIT_T0 " as an example, The range of parameter values 48-128 extracted, then set the parameter value according to the scope.
' Multifunctional debugging ' function is included in test program(That is functional object), include again in ' Multifunctional debugging ' function ' extinction ratio debugging ', ' luminous power debugging ' subfunction(That is subfunction object).' debugging mesh is included in ' extinction ratio debugging ' subfunction Scale value ' parameter, ' debugging algorithm ' parameter etc., parameter again can include parameter describe, the type of parameter(Numeric type, character Type ...), parameter choosing value scope(Can be selected in multiple monodromes or a value scope).
Example:
[AttributeFunctionProperties(EnumFunctionTestID.ATE_V_TxMultiTuning, "Thrd1", 20, "")]
[AttributeContainSubFunction(EnumSubFunctionTestID.ATE_SetAPD, false)]
[AttributeContainSubFunction(EnumSubFunctionTestID.ATE_SetCP, true)]
[AttributeContainSubFunction(EnumSubFunctionTestID.ATE_SetER, false)]
[AttributeContainSubFunction(EnumSubFunctionTestID.ATE_SetIbias, false)]
[AttributeContainSubFunction(EnumSubFunctionTestID.ATE_MeasPwr, false)]
[AttributeContainSubFunction(EnumSubFunctionTestID.ATE_MeasER, false)]
internal class ATE_V_TxMultiTuning : ATEFunctionBase{}
This section of code definition One function object, entitled ' ATE_V_TxMultiTuning ', 6 is included in the function Individual subfunction ' ATE_SetAPD ', ' ATE_SetCP ', ' ATE_SetER ', ' ATE_SetIbias ', ' ATE_MeasPwr ', ' ATE_MeasER ', wherein, subfunction ' ATE_SetCP ' is optional subfunction, and other 5 subfunctions are all essential subfunctions.
[AttributeFieldProperties("Sets the APD upper limit.", false, EnumDataType.Numeric, DefaultValue = "50")]
private const string CONST_PARAMETER_MAXIMUM = "Maximum";This defines one Individual functional parameter, while the data type of the parameter is also defined, and default value.
So parameter configuration can configure the test program, only run ' extinction ratio debugging ' in ' Multifunctional debugging ' function Subfunction, without running ' luminous power debugging ' subfunction, naturally it is also possible to included in configuration operation ' Multifunctional debugging ' function All subfunctions, it can also configure and not run ' Multifunctional debugging ' function.
S3, by it is described with postpone the test parameter storage arrive database the step of.
Automatically the test of optical module is carried out when test program is run with the test parameter postponed from database extraction.The present invention Automatically the configuration of test parameter can be quickly realized, facilitates the optical module test process of later testing sequence so that optical module is tested Efficiency greatly improves.
Preferably, in one example, database is arrived automatically according to predetermined keyword storage after the completion of configuration, tests journey Can be got parms configuration during sort run by the keyword from database, and easy-to-look-up relevant parameter, testing different indexs can To set different keywords, searched and configured with fast and easy.
Preferably, in one example, in addition to the display test parameter and/or described join with the test postponed Several steps, is so presented in visual form computer screen, and for configuration, personnel carry out operative configuration, more convenient.
Preferably, also include whether verification is described meets described make a reservation for the test parameter postponed in one example The step of test condition;If so, then arrive database with the test parameter postponed storage by described.Such as parameter name is Value after the parameter configuration of " CPDAC_INIT_T0 " is 30, not in value scope 48-128, is then reconfigured, if the parameter is matched somebody with somebody The value postponed is 50, then arrives database with the test parameter postponed storage by described.Can so ensure parameter configuration can By property, follow-up test is avoided to malfunction.
Test parameter of the present invention in optical module test program is automatically extracted before test program is run, according to presumptive test Condition configures the test parameter and complies with test request, then arrives data with the test parameter postponed storage by described Storehouse, carry out the test of optical module when test program is run with the test parameter postponed from database extraction automatically.The present invention can be certainly The dynamic quick configuration for realizing test parameter, facilitate the optical module test process of later testing sequence so that optical module testing efficiency Greatly improve.
Based on same design, the present invention also provides a kind of optical module test parameter configuration system, referring to optical module shown in Fig. 2 Test parameter configures system, including:Parameter extraction module 1, for extracting the test parameter in optical module test program;Parameter is matched somebody with somebody Module 2 is put, for configuring the test parameter according to presumptive test condition;And memory module 3, for matching somebody with somebody what is postponed by described Database is arrived in the test parameter storage.
Preferably, the parameter extraction module is specifically used for passing through .NET reflection technologies by the compiled test program Code in all pre-defined parameters, functional object and/or function subobject reflect, then pass through predetermined mark pair As finding corresponding parameter name, functional object and/or subfunction object oriented;Wherein described predetermined mark object is in the survey Set during the written in code for trying program.
Preferably, at least one parameter defined in code of the presumptive test condition for the test program of extraction Title and its value;The parameter configuration module is specifically used for being configured accordingly according at least one parameter name and its value The test parameter.
Preferably, in addition to display module, for showing the test parameter and/or described with the test postponed ginseng Number.
Preferably, in addition to correction verification module(It is not shown), for receive parameter configuration module output with postponing The test parameter, whether verification is described meets the presumptive test condition with the test parameter postponed;If so, then export It is described with the test parameter postponed to memory module.It should be noted that optical module test parameter shown in Fig. 2 configures system Embodiment is made with the collocation method embodiment of optical module test parameter shown in Fig. 1 based on same design, and modules function can join See that embodiment of the method relevant portion describes, be no longer described in detail herein.
Test parameter of the present invention in optical module test program is automatically extracted before test program is run, according to presumptive test Condition configures the test parameter and complies with test request, then arrives data with the test parameter postponed storage by described Storehouse, carry out the test of optical module when test program is run with the test parameter postponed from database extraction automatically.The present invention can be certainly The dynamic quick configuration for realizing test parameter, facilitate the optical module test process of later testing sequence so that optical module testing efficiency Greatly improve.
The embodiment of the present invention is described in detail above in conjunction with accompanying drawing, but the present invention is not restricted to Embodiment is stated, in the case of the spirit and scope of claims hereof are not departed from, those skilled in the art can make Go out various modifications or remodeling.

Claims (2)

  1. A kind of 1. optical module test parameter collocation method, it is characterised in that including:
    The step of extracting the test parameter in optical module test program;
    The step of test parameter is configured according to presumptive test condition;
    By described the step of arriving database with the test parameter postponed storage;
    It is described extraction optical module test program in test parameter the step of be specially:
    By .NET reflection technologies by all pre-defined parameters, the function pair in the code of the compiled test program As and/or function subobject reflect, then by predetermined mark object find corresponding parameter name, functional object and/or Subfunction object oriented;Wherein described predetermined mark object is set in the written in code of the test program, and is being developed Predetermined mark object is used to the parameter name in code, functional object, subfunction object in code while test program It is identified;The presumptive test condition for extraction the test program code defined at least one parameter name and Its value;It is described according to presumptive test condition configure the test parameter the step of be specially:
    According at least one parameter name and its corresponding test parameter of value configuration;
    Also include:
    Show the test parameter and/or it is described with the test parameter postponed the step of;
    Also include verification is described to match somebody with somebody the step of whether test parameter postponed meets the presumptive test condition;If so, then By described database is arrived with the test parameter postponed storage.
  2. 2. a kind of optical module test parameter configures system, it is characterised in that including:
    Parameter extraction module, for extracting the test parameter in optical module test program;
    Parameter configuration module, for configuring the test parameter according to presumptive test condition;
    Memory module, for arriving database with the test parameter postponed storage by described;
    The parameter extraction module is specifically used in the code of the compiled test program by .NET reflection technologies All pre-defined parameters, functional object and/or function subobject reflect, then are found accordingly by predetermined mark object Parameter name, functional object and/or subfunction object oriented;Generation of the wherein described predetermined mark object in the test program Code is set when writing, and uses predetermined mark object to the parameter name in code in code while test program is developed Title, functional object, subfunction object are identified;
    The presumptive test condition for extraction the test program code defined at least one parameter name and its take Value;
    The parameter configuration module is specifically used for configuring the corresponding survey according at least one parameter name and its value Try parameter;Also include:
    Display module, for showing the test parameter and/or described with the test parameter postponed;
    Also include:
    Correction verification module, for receive parameter configuration module output with the test parameter postponed, verify the configuration Whether the test parameter afterwards meets the presumptive test condition;If so, then output is described with the test parameter postponed To memory module.
CN201410819549.3A 2014-12-25 2014-12-25 A kind of optical module test parameter collocation method and system Active CN104461565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410819549.3A CN104461565B (en) 2014-12-25 2014-12-25 A kind of optical module test parameter collocation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410819549.3A CN104461565B (en) 2014-12-25 2014-12-25 A kind of optical module test parameter collocation method and system

Publications (2)

Publication Number Publication Date
CN104461565A CN104461565A (en) 2015-03-25
CN104461565B true CN104461565B (en) 2018-02-13

Family

ID=52907676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410819549.3A Active CN104461565B (en) 2014-12-25 2014-12-25 A kind of optical module test parameter collocation method and system

Country Status (1)

Country Link
CN (1) CN104461565B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653416B (en) * 2015-12-24 2018-01-02 索尔思光电(成都)有限公司 A kind of optical module performance parameter adjustment method and system
WO2020150863A1 (en) 2019-01-21 2020-07-30 上海燎云信息科技有限公司 Optical communication module testing method and apparatus and terminal device
CN114124693A (en) * 2021-11-08 2022-03-01 中国联合网络通信集团有限公司 Parameter configuration method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183332A (en) * 2007-11-21 2008-05-21 北京中星微电子有限公司 Method and device for automatically generating testing datasets by program content
CN102760096A (en) * 2011-04-27 2012-10-31 阿里巴巴集团控股有限公司 Test data generation method, unit testing method and unit testing system
CN103198015A (en) * 2013-03-21 2013-07-10 中国人民解放军国防科学技术大学 Embedded software reliability test data generating method based on using probability
CN103268285A (en) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 Method and device for automatic generation of robustness test case of API interface
CN104035873A (en) * 2014-06-30 2014-09-10 青岛海信电器股份有限公司 Method and device for generating testing codes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050273685A1 (en) * 2004-06-08 2005-12-08 Sanjay Sachdev Automated and customizable generation of efficient test programs for multiple electrical test equipment platforms

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183332A (en) * 2007-11-21 2008-05-21 北京中星微电子有限公司 Method and device for automatically generating testing datasets by program content
CN102760096A (en) * 2011-04-27 2012-10-31 阿里巴巴集团控股有限公司 Test data generation method, unit testing method and unit testing system
CN103198015A (en) * 2013-03-21 2013-07-10 中国人民解放军国防科学技术大学 Embedded software reliability test data generating method based on using probability
CN103268285A (en) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 Method and device for automatic generation of robustness test case of API interface
CN104035873A (en) * 2014-06-30 2014-09-10 青岛海信电器股份有限公司 Method and device for generating testing codes

Also Published As

Publication number Publication date
CN104461565A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN106528424B (en) Test method and test platform based on background system service or interface
CN105302716B (en) Test method, device under the development mode of interflow
CN104461565B (en) A kind of optical module test parameter collocation method and system
CN104794057B (en) A kind of crossing event automated testing method and device
CN106776324A (en) Interface test method and device
CN104391796B (en) A kind of test case analytic method
CN104899150B (en) Automated testing method and system and automation platform based on object-oriented
WO2005072305A3 (en) Efficient modeling of embedded memories in bounded memory checking
CN101145993A (en) A multi-point access interface test method and its test system
CN103955429B (en) Determine the method and device of regression test scope
CN107577591A (en) A kind of method, apparatus and system of automatic test abnormal protection
Feiler et al. Reliability validation and improvement framework
CN109408379A (en) One kind is based on promotion jmeter interface automatic test data matching method
CN105007230B (en) A kind of system and method for testing more wireless routers
CN101425064A (en) Processing method and system for testing log
CN104090838A (en) Method for generating test case
CN210016474U (en) Distribution network test control equipment and system
CN105022864B (en) A kind of system testing point choosing method that matrix is relied on based on extension
CN109657265B (en) Automatic expansion and contraction method for PCB circuit and drilling
CN103188117B (en) Information interaction server simulation testing device and method
CN106547697B (en) A kind of the automation formula correctness management method and device of NISSIN ion injection machine table
CN107133168A (en) A kind of sequence of events Fault Locating Method
US20140365535A1 (en) Visual data definition for identifying data items in loosely-structured data
Alvez et al. Towards cross-checking WordNet and SUMO using meronymy
CN105786873B (en) Search result method of adjustment and device based on question and answer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant