CN101246444B - Module testing method and system - Google Patents

Module testing method and system Download PDF

Info

Publication number
CN101246444B
CN101246444B CN2008100816495A CN200810081649A CN101246444B CN 101246444 B CN101246444 B CN 101246444B CN 2008100816495 A CN2008100816495 A CN 2008100816495A CN 200810081649 A CN200810081649 A CN 200810081649A CN 101246444 B CN101246444 B CN 101246444B
Authority
CN
China
Prior art keywords
test
module
time
script
unit
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
CN2008100816495A
Other languages
Chinese (zh)
Other versions
CN101246444A (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.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2008100816495A priority Critical patent/CN101246444B/en
Publication of CN101246444A publication Critical patent/CN101246444A/en
Application granted granted Critical
Publication of CN101246444B publication Critical patent/CN101246444B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a module test process comprising obtaining testing module information and beginning to test module script, if the test for module script being completed within test time thresholding, modifying the standard test time of the script and testing the next script, otherwise, inquiring and executing corresponding handling policy, when all scripts in the module are tested, modifying the standard test time of the module and testing the next module. The invention also discloses a module test system. In the method and system, the test condition can be monitored in test process according to the standard test time of the script in the module, and test order of the module can be adjusted according to actual need. The module test method and system improves the test efficiency and saves test cost.

Description

Module testing method and system
Technical Field
The invention relates to a module testing technology, in particular to a module testing method and a module testing system.
Background
In recent years, electronic products have more and more functions, and modules forming the electronic products are also gradually diversified, so that in order to improve the quality and user experience of the electronic products, different modules forming the electronic products need to be tested.
The test time required for different modules varies from several minutes to several tens of hours, and since the time required for module testing cannot be known, the module testing order is arbitrarily determined during the testing process. However, in the case of short testing time, if the first few modules to be tested all take longer, the testing efficiency is easily low due to insufficient time, and even the testing fails. For example, the test time is 2 hours, but the test time for the first module to be tested is 3 hours. Moreover, the module test in the prior art cannot effectively monitor the test process, and if the module test cannot be normally performed due to reasons such as abnormal test, the module test method can only wait for the discovery of the tester and perform corresponding processing, and needs the worker to watch and check the test operation condition at any time, so the existing module test method has poor flexibility, low test efficiency and test cost waste.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a module testing method and system, which can flexibly control the testing sequence, improve the testing efficiency, and save the testing cost.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of testing a module, the method comprising:
a. acquiring module information to be tested, and starting testing a script of the module;
b. acquiring a test time threshold of a currently tested script;
c. if the script in the step b completes the test within the test time threshold, modifying the standard test time of the script, returning to the step b, and continuing to test the next script; otherwise, inquiring and executing the corresponding processing strategy;
d. if all the scripts in the module in the step a are tested, modifying the standard test time of the module, returning to the step a, and continuously testing the next module; otherwise, returning to the step b, and continuing to test the next script.
The test time threshold of the acquisition script in the step b is as follows: if the time counting unit records the standard test time of the script, the value is used as the test time threshold value of the script; and if not, the test time threshold of the script is defaulted to be the maximum value of the standard test time of all scripts in the module to which the script belongs, which is stored in the time counting unit.
The processing strategy in the step c is as follows: and returning to the step b, and continuously testing the next script.
The processing strategy in the step c is as follows: the test is terminated.
The processing strategy in the step c is as follows: b, prolonging the test time threshold of the script for a period of time, continuing to test the current script, if the test is completed within the test time threshold, modifying the standard test time of the script, returning to the step b, and continuing to test the next script; otherwise, the test is terminated.
The module information at least comprises a module number and module script information.
The test execution unit executes the module test, and after the test execution unit starts the test script, the test execution unit further includes: the test execution unit sends test script information and test starting time to the test monitoring unit; after the test execution unit completes the script test, the method further comprises the following steps: and the test execution unit sends the test script information and the test ending time to the test monitoring unit.
Step c, after the script test is completed within the test time threshold of the script, the method further comprises the following steps: and calculating the test time used by the script for the test according to the test starting time and the test ending time of the script.
The standard test time of the modified script in the step c is as follows: and the standard test time of the modified script is the weighted value of the test time used by the past test and the test time used by the current test of the script.
The standard test time of the modification module is as follows: and modifying the standard test time of the module to be the weighted value of the test time used by the module in the past test and the test time used by the current test, wherein the test time of the module is the sum of the test time of all scripts in the module.
A modular test system, the system comprising: a test execution unit, a time statistic unit, a test monitoring unit and a strategy management unit, wherein,
the test execution unit is mainly used for reading the relevant information of the module to be tested from the time statistic unit, running the module scripts, executing the module test, sending the test start time and the test end time to the test monitoring unit when each script starts the test and ends the test, and executing the processing strategy sent by the strategy management unit when the module test is abnormal;
the time counting unit is mainly used for storing the standard test time of the module and the script thereof, providing the standard test time of the script for the test monitoring unit, calculating and modifying the standard test time of the script according to the test running time sent by the test monitoring unit, and modifying the standard test time of the module after all the scripts in the module are tested;
the test monitoring unit is mainly used for acquiring the standard test time of the script from the time counting unit as the test time threshold of the script, monitoring the module test condition according to the test time threshold of the script, inquiring the strategy of the strategy control unit when the module test is abnormal, and calculating the module test time and sending the module test time to the time counting unit after the script test in the module is normal;
the strategy management unit is mainly used for storing the processing strategy and providing the corresponding processing strategy when the module test is abnormal for the test execution unit after receiving the query of the test monitoring unit.
The module testing method and the system provided by the invention record the testing time of the script in the module testing process, monitor the testing operation condition of the module according to the standard testing time of the script in the module, and automatically execute the preset corresponding processing strategy if the monitoring finds that the module is abnormal in testing.
Drawings
FIG. 1 is a flow chart of a module testing method of the present invention;
FIG. 2 is a block diagram of a modular test system according to the present invention.
Detailed Description
The basic idea of the invention is: recording the testing time of the script in the module testing process, monitoring the testing running condition of the module according to the standard testing time of the script in the module, and automatically executing a preset corresponding processing strategy if the monitoring finds that the testing running condition of the module is abnormal. The present invention will be described in further detail with reference to the following detailed description of exemplary embodiments, which are illustrated in the accompanying drawings.
Fig. 1 is a flowchart of a module testing method of the present invention, and as shown in fig. 1, the module testing method of the present invention includes the following steps:
step 101: the test execution unit acquires information of a module to be tested.
Here, the tester can set the module testing sequence in the time statistic unit according to actual needs, and if the testing time is limited, the module testing can be performed in the sequence from less to more according to the standard testing time of the module. When the test execution unit tests, firstly, the module information required to be tested at this time is obtained from the time counting unit, and the module information at least comprises a module number and module script information.
Step 102: the test execution unit starts testing the module script and sends test script information and test starting time to the test monitoring unit.
Here, the test module script is a script in the module corresponding to the running number according to the module number acquired in step 101, and when the module script starts to run, the test execution unit needs to send information such as current test script information and test starting time to the test monitoring unit, that is, the test monitoring unit is notified to start monitoring the test condition.
Step 103 to step 104: the test monitoring unit starts timing and reads the standard test time of the script in step 102 from the time counting unit as the test time threshold.
Here, if the standard test time of the script is not recorded in the time statistic unit, that is, the script is tested for the first time, the test time threshold is set to be the maximum value of the standard test time of the script in the module stored in the time statistic unit by default.
Step 105 to step 110: if the test monitoring unit receives the test ending time of the script sent by the test execution unit within the test time threshold of the script, the test monitoring unit calculates the test time of the script and sends the test ending time to the time statistic unit, and after the time statistic unit modifies the standard test time of the script, the step 101 is returned to, and the next script is continuously tested; if the test monitoring unit does not receive the test ending time of the script sent by the test execution unit within the test time threshold of the script, the corresponding processing strategy is inquired from the strategy management unit, and the strategy management unit informs the test execution unit to execute the processing strategy.
Here, after completing the script test, the test execution unit sends the test script information and the test end time to the test monitoring unit.
The test monitoring unit obtains the test time of the script by subtracting the test ending time from the test starting time when receiving the test ending time sent by the test execution unit within the test time threshold of the script, and the test monitoring unit sends the test time of the script to the time statistic unit and then uses the weighted value of the test time of the current test of the script and the test time used by the previous test of the script as the new standard test time of the test script by the time statistic unit, so that the next test of the script can monitor the module test process according to the modified standard test time.
When the test monitoring unit does not receive the test ending time sent by the test execution unit within the test time threshold of the script, the test monitoring unit needs to query the policy management unit for a corresponding processing policy, such as continuing the test, terminating the test, testing the next script, and the like. Here, the policy management unit may set different processing policies for different cases. If the test monitoring unit in the policy management unit does not receive the test ending time sent by the test execution unit within the test time threshold of the test script, the processing policy is as follows: prolonging the test time threshold of the script for a period of time, continuing the test, if the test is finished within the prolonged test time threshold, modifying the standard test time of the script, and continuing to test the next script; otherwise, the test is terminated. Therefore, the condition that the module script causes time delay due to some correctable abnormal conditions so as to cause test failure can be avoided.
Step 111 to step 112: judging whether all scripts in the module in the step 101 are tested completely, if so, modifying the standard test time of the module, returning to the step 101, and continuing to test the next module; otherwise, returning to step 102, and continuing to test the next script.
Here, the standard test time of the modified module is: and modifying the standard test time of the module to be the weighted value of the test time used by the module in the past test and the test time used by the current test, wherein the test time of the module is the sum of the test time of all scripts in the module. Thus, the next time the module testing sequence is determined, the modified standard testing time can be used as the basis.
Fig. 2 is a structural diagram of a module testing system of the present invention, and as shown in fig. 2, the testing system of the present invention includes a test execution unit, a time counting unit, a test monitoring unit, and a policy management unit. Wherein,
the test execution unit is mainly used for reading the relevant information of the module to be tested from the time statistic unit, running the module test script, executing the module test, sending the test start time and the test end time to the test monitoring unit when the test is started and ended, and executing the processing strategy sent by the strategy management unit when the script is abnormal in the module test.
The time counting unit is mainly used for storing the standard test time of the module and the script thereof, providing the standard test time of the module and the script thereof for the test monitoring unit, calculating and modifying the standard test time of the module and the script thereof according to the test running time sent by the test monitoring unit, and modifying the standard test time of the module after all the scripts in the module are tested.
The test monitoring unit is mainly used for acquiring the standard test time of the script from the time counting unit as the test time threshold of the script, monitoring the module test condition according to the test time threshold of the script, inquiring the strategy of the strategy control unit when the script is abnormal in the module test, and calculating the module and the script test time thereof and sending the module and the script test time thereof to the time counting unit after the script test in the module is normally finished.
The strategy management unit is mainly used for storing the processing strategy and providing the corresponding processing strategy when the script in the module test is abnormal to the test execution unit after receiving the query of the test monitoring unit.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (9)

1. A method for testing a module, the method comprising:
a. acquiring module information to be tested, and starting testing a script of the module;
b. if the time counting unit records the standard test time of the script, the value is used as the test time threshold value of the script; if not, the test time threshold of the script is defaulted to be the maximum value of standard test time of all scripts in the module to which the script belongs, and the test time threshold is stored in a time counting unit;
c. if the script in the step b completes the test within the test time threshold, modifying the standard test time of the script to be the weighted value of the test time used by the script in the past test and the test time used by the test, entering the step d after the test of all scripts in the module is completed, and returning to the step b if the test of all scripts in the module is not completed, and continuing to test the next script; otherwise, inquiring and executing the corresponding processing strategy;
d. and d, modifying the standard test time of the module into the weighted value of the test time used by the module in the past test and the test time used by the current test, returning to the step a, and continuing to test the next module.
2. The method of claim 1, wherein the processing policy of step c is: and returning to the step b, and continuously testing the next script.
3. The method of claim 1, wherein the processing policy of step c is: the test is terminated.
4. The method of claim 1, wherein the processing policy of step c is: b, prolonging the test time threshold of the script for a period of time, continuing to test the script, if the test is completed within the test time threshold, modifying the standard test time of the script, returning to the step b, and continuing to test the next script; otherwise, the test is terminated.
5. The method of claim 1, wherein the module information comprises at least a module number, module script information.
6. The method of claim 1, wherein the performing module testing by the test execution unit, after the performing module testing by the test execution unit begins the testing of the script, further comprises: the test execution unit sends the test script to the test monitoring unitIs/are as followsInformation and test start time; after the test execution unit completes the script test, the method further comprises the following steps: and the test execution unit sends the test script information and the test ending time to the test monitoring unit.
7. The method of claim 6, wherein the step c further comprises after completing the script test within the test time threshold of the script: and calculating the test time used by the script for the test according to the test starting time and the test ending time of the script.
8. The method of claim 1, wherein the test time of a module is the sum of the test times of all scripts in the module.
9. A modular test system, the system comprising: a test execution unit, a time statistic unit, a test monitoring unit and a strategy management unit, wherein,
the test execution unit is mainly used for reading the relevant information of the module to be tested from the time statistic unit, running the module scripts, executing the module test, sending the test start time and the test end time to the test monitoring unit when each script starts the test and ends the test, and executing the processing strategy sent by the strategy management unit when the module test is abnormal;
the time counting unit is mainly used for storing the standard test time of the module and all scripts thereof, providing the standard test time of the scripts for the test monitoring unit, calculating and modifying the standard test time of the scripts according to the test running time sent by the test monitoring unit, and modifying the standard test time of the module after all the scripts in the module are tested;
the test monitoring unit is mainly used for acquiring the standard test time of the current script from the time statistical unit as the test time threshold of the script, monitoring the module test condition according to the test time thresholds of all scripts in the module, performing strategy query to the strategy control unit when the module test is abnormal, and calculating the module test time and sending the module test time to the time statistical unit after the test of all scripts in the module is normal;
the strategy management unit is mainly used for storing the processing strategy and providing the corresponding processing strategy when the module test is abnormal for the test execution unit after receiving the query of the test monitoring unit.
CN2008100816495A 2008-03-03 2008-03-03 Module testing method and system Active CN101246444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100816495A CN101246444B (en) 2008-03-03 2008-03-03 Module testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100816495A CN101246444B (en) 2008-03-03 2008-03-03 Module testing method and system

Publications (2)

Publication Number Publication Date
CN101246444A CN101246444A (en) 2008-08-20
CN101246444B true CN101246444B (en) 2010-06-02

Family

ID=39946909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100816495A Active CN101246444B (en) 2008-03-03 2008-03-03 Module testing method and system

Country Status (1)

Country Link
CN (1) CN101246444B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923124B (en) * 2009-06-17 2012-06-20 上海华虹Nec电子有限公司 Method for determining acceleration factors in EM testing structure
CN101989228A (en) * 2009-08-07 2011-03-23 中兴通讯股份有限公司 Estimation method and device of execution time of test plan
WO2016038380A1 (en) 2014-09-11 2016-03-17 Alertme.Com Ltd Device synchronization and testing
CN104950251B (en) * 2015-07-02 2017-12-26 大唐微电子技术有限公司 A kind of clock network system of on-chip system SOC
CN105068899A (en) * 2015-07-17 2015-11-18 浪潮电子信息产业股份有限公司 Automatic restart stability test method under Vmware system
CN105320600A (en) * 2015-11-26 2016-02-10 上海斐讯数据通信技术有限公司 Test case execution monitoring method and system based on automatic testing platform
CN107197241A (en) * 2017-05-08 2017-09-22 聚好看科技股份有限公司 Time-out time dynamic setting method and device in TV applications test
CN108664372A (en) * 2018-05-08 2018-10-16 平安科技(深圳)有限公司 Monitoring device, method and the computer readable storage medium of test process

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1548968A (en) * 2003-05-22 2004-11-24 上海广电飞跃照明电子器材厂 Automatic correcting method for electronic ballast automatic testing system
CN1558328A (en) * 2004-02-11 2004-12-29 绿创科技股份有限公司 Adjusting method for hardware emulator execution time and recording medium for the emulator

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1548968A (en) * 2003-05-22 2004-11-24 上海广电飞跃照明电子器材厂 Automatic correcting method for electronic ballast automatic testing system
CN1558328A (en) * 2004-02-11 2004-12-29 绿创科技股份有限公司 Adjusting method for hardware emulator execution time and recording medium for the emulator

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2006-31178A 2006.02.02

Also Published As

Publication number Publication date
CN101246444A (en) 2008-08-20

Similar Documents

Publication Publication Date Title
CN101246444B (en) Module testing method and system
CN101593146B (en) Method and device for automatically testing page
CN112783725B (en) Index collection method and device
CN111273176B (en) Fault diagnosis optimization method, device, system and storage medium
CN101136781B (en) Performance data acquisition occasion control method and device in network management system
CN109733238B (en) Fault detection method, device, storage medium and processor
CN106649043B (en) Automatic fault diagnosis method and system for operation and maintenance system
CN111813590B (en) Method and device for diagnosing abnormal reset of main control module and main control module
CN114595085A (en) Disk failure prediction method, prediction model training method and electronic equipment
CN111131815A (en) Smart television performance monitoring and abnormal process processing method and device
CN109086185B (en) Fault detection method, device and equipment of storage cluster and storage medium
CN113806195B (en) Data processing method, device, equipment, system and storage medium
CN116400165A (en) Smart power grid fault monitoring method and system
CN116306429A (en) Method, device, computer storage medium and terminal for realizing state data capture
CN113626236B (en) Fault diagnosis method, device, equipment and medium for distributed file system
CN213958054U (en) Data management device of multi-authority escalator monitoring database
CN116841815A (en) Operation monitoring method, device, electronic equipment and storage medium
CN112860527A (en) Fault monitoring method and device of application server
CN113079063A (en) Offline judgment method, system and device for charging device and computer storage medium
CN113392021A (en) Method, device and equipment for analyzing cluster reliability test result and readable medium
CN113009407A (en) Voltage event recording method and device of double-core intelligent electric meter and double-core intelligent electric meter
CN117289144B (en) Fault positioning method, device, equipment, system and medium
CN114816942B (en) Mobile terminal application stability monitoring method and device, electronic equipment and storage medium
CN101807167B (en) Method and system for realizing software rejuvenation
CN108805778A (en) Electronic device, the method and storage medium for acquiring collage-credit data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant