CN110362461A - The test method and computer readable storage medium of average time between failures - Google Patents
The test method and computer readable storage medium of average time between failures Download PDFInfo
- Publication number
- CN110362461A CN110362461A CN201810249921.XA CN201810249921A CN110362461A CN 110362461 A CN110362461 A CN 110362461A CN 201810249921 A CN201810249921 A CN 201810249921A CN 110362461 A CN110362461 A CN 110362461A
- Authority
- CN
- China
- Prior art keywords
- test
- devices
- failures
- average time
- response times
- 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/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
Abstract
The invention discloses a kind of test method of average time between failures and computer readable storage medium, method includes: default test item, and generates corresponding test script;It chooses quantity and is the Devices to test of test item number, and preset length of testing speech and each test script are sent to each Devices to test correspondingly;Collect the daily record data that each Devices to test executes corresponding test script;According to the daily record data, obtain respectively each Devices to test without response times and collapse number;According to the length of testing speech, without response times and collapse number, average time between failures is calculated.The present invention can reduce testing cost, shorten the testing time, improve testing efficiency and accuracy rate.
Description
Technical field
The present invention relates to software testing technology field more particularly to the test methods and meter of a kind of average time between failures
Calculation machine readable storage medium storing program for executing.
Background technique
Average time between failures is also known as the mean free error time, and full name in English is " Mean Time Between
Failure " refers to average time of the repairable item twice between adjacent failure, is denoted as MTBF.MTBF is to measure a product
Reliability index.Unit is " hour ".It reflects the temporal quality of product, is to embody product to keep function at the appointed time
A kind of ability.
In summary, what product failure was few is exactly high reliablity, at the same also prescribed product in service stage cumulative activation
Between with the ratio of the number of stoppages be MTBF.We will measure average time between failures in reality, need to put into a large amount of people
Power material resources are artificially simulated, but artificial simulation takes time and effort consumption cost, and the factors such as fatigue with the actual conditions of product
It also will affect the correctness of test result.
Summary of the invention
The technical problems to be solved by the present invention are: providing the test method and computer of a kind of average time between failures
The testing efficiency and test accuracy rate of average time between failures can be improved in readable storage medium storing program for executing.
In order to solve the above-mentioned technical problem, a kind of the technical solution adopted by the present invention are as follows: survey of average time between failures
Method for testing, comprising:
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and preset length of testing speech and each test script one is a pair of
It is sent to each Devices to test with answering;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
The invention further relates to a kind of computer readable storage mediums, are stored thereon with computer program, and described program is located
Reason device performs the steps of when executing
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and preset length of testing speech and each test script one is a pair of
It is sent to each Devices to test with answering;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
The beneficial effects of the present invention are: by being tested simultaneously scale equipment, cost can be greatly reduced;It is logical
Crossing makes disqualification rate can be greatly reduced, when shortening test using Repeatability test is carried out to different given scenarios simultaneously
Between, improve testing efficiency;Index is provided by average time between failures algorithm to measure product reliability.The present invention passes through letter
The test of automation can be realized in single configuration, can reduce user's threshold, and the software performance greatly simplified in Android device is surveyed
Examination, can save human and material resources, and while improving testing efficiency, also ensure test accuracy rate.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the test method of average time between failures of the present invention;
Fig. 2 is the method flow diagram of the embodiment of the present invention one.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained in detail.
The most critical design of the present invention is: carry out the tests of different test items simultaneously to multiple Devices to test, then root
According to Devices to test in test process without response times and the calculating for collapsing number progress average time between failures.
Referring to Fig. 1, a kind of test method of average time between failures, comprising:
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and preset length of testing speech and each test script one is a pair of
It is sent to each Devices to test with answering;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
As can be seen from the above description, the beneficial effects of the present invention are: testing cost can be reduced, the testing time is shortened, is improved
Testing efficiency and accuracy rate.
Further, " according to the length of testing speech, without response times and collapse number, mean time between failures is calculated
Time " specifically:
It is to be measured to be obtained described one without the sum of response times and collapse number divided by a Devices to test for the length of testing speech
The average time between failures of test item corresponding to equipment;
If the average time between failures is less than preset a reference value, survey corresponding to a Devices to test is determined
Examination item test does not pass through.
Further, the length of testing speech of each Devices to test is consistent;" according to the length of testing speech, without response times and collapse
Average time between failures is calculated in number " specifically:
By the product of the length of testing speech and test item number divided by each Devices to test without response times and collapse number it
With obtain total average time between failures;
If total average time between failures is less than preset a reference value, discriminating test does not pass through.
Further, it if being 0 without the sum of response times and collapse number, will be set without the sum of response times and collapse number
It is 1.
Seen from the above description, by calculating average time between failures, index is provided to measure application reliability.
Further, " Devices to test that quantity is test item number is chosen, and by preset length of testing speech and each test
Script is sent to each Devices to test correspondingly " specifically:
Obtain the facility information of Devices to test;
According to the facility information, choose the Devices to test that quantity is test item number, and by each test item with it is each to be measured
Equipment is associated one by one;
The test script of preset length of testing speech and corresponding test item is sent to each Devices to test.
Seen from the above description, Devices to test can be chosen according to facility information, and is distributed for the Devices to test of each selection
Test item is resurveyed for example, unacceptable Devices to test is tested before can selecting.
The present invention also proposes a kind of computer readable storage medium, is stored thereon with computer program, and described program is located
Reason device performs the steps of when executing
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and preset length of testing speech and each test script one is a pair of
It is sent to each Devices to test with answering;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
Further, " according to the length of testing speech, without response times and collapse number, mean time between failures is calculated
Time " specifically:
It is to be measured to be obtained described one without the sum of response times and collapse number divided by a Devices to test for the length of testing speech
The average time between failures of test item corresponding to equipment;
If the average time between failures is less than preset a reference value, survey corresponding to a Devices to test is determined
Examination item test does not pass through.
Further, the length of testing speech of each Devices to test is consistent;" according to the length of testing speech, without response times and collapse
Average time between failures is calculated in number " specifically:
By the product of the length of testing speech and test item number divided by each Devices to test without response times and collapse number it
With obtain total average time between failures;
If total average time between failures is less than preset a reference value, discriminating test does not pass through.
Further, it if being 0 without the sum of response times and collapse number, will be set without the sum of response times and collapse number
It is 1.
Further, " Devices to test that quantity is test item number is chosen, and by preset length of testing speech and each test
Script is sent to each Devices to test correspondingly " specifically:
Obtain the facility information of Devices to test;
According to the facility information, choose the Devices to test that quantity is test item number, and by each test item with it is each to be measured
Equipment is associated one by one;
The test script of preset length of testing speech and corresponding test item is sent to each Devices to test.
Embodiment one
Referring to figure 2., the embodiment of the present invention one are as follows: a kind of test method of average time between failures can operate with
Android application, includes the following steps:
S1: obtaining the facility information of Devices to test, unique identifier (UUID), system version number and producer including equipment
Title may also include the information such as device name, memory, CPU, resolution ratio.
S2: setting needs application to be tested, and obtains the application message of the application, including Apply Names, application version
Number, using information such as packet name, application sizes.
S3: according to application to be measured, test item is preset, and generates corresponding test script.Test item generally corresponding one is answered
With needing the step of undergoing to be also to be easiest to the step of breaking down, such as: the installation of application is unloaded, and applies and answers in use process
Switching between will then return to foreground using backstage is fallen back on, the open and close of application, click, slide, long-pressing, even by, it is more
Finger manipulation etc..Therefore, test item generally comprises installation unloading, exits recovery, application switching, open and close and stability.
S4: the Devices to test that quantity is test item number is chosen, and by preset length of testing speech and each test script one
One is accordingly sent to each Devices to test;Even preset 5 test items, then choose 5 Devices to test, it is preferable that according to
The facility information of measurement equipment is chosen, and is respectively that this 5 Devices to test respectively distribute a test item, then by preset survey
The test script of examination duration and corresponding test item is sent respectively to this 5 Devices to test.
Preferably, the length of testing speech of each Devices to test is consistent, after Devices to test receives a test script,
The test script, and log data are repeated in length of testing speech.It is carried out simultaneously that is, choosing 5 Devices to test
The test of different test items.
S5: the daily record data that each Devices to test executes corresponding test script is collected;
S6: according to the daily record data, obtain respectively each Devices to test without response times and collapse number;
S7: according to the length of testing speech, without response times and collapse number, average time between failures is calculated.
Specifically, by the length of testing speech divided by a Devices to test without the sum of response times and collapse number, obtain institute
State the average time between failures of test item corresponding to a Devices to test;If the average time between failures is less than preset
A reference value then determines that the test of test item corresponding to a Devices to test does not pass through.
By the product of the length of testing speech and test item number divided by each Devices to test without response times and collapse number it
With obtain total average time between failures;If total average time between failures is less than preset a reference value, determine
Test does not pass through.
Wherein, it if being 0 without the sum of response times and collapse number, will be set as without the sum of response times and collapse number
1。
For example, it is assumed that having chosen 5 Devices to test (A, B, C, D, E), length of testing speech is 24 hours, preset a reference value
It is 24.A reference value can be depending on the required application tested, and different application has different threshold value standards, the present embodiment
Assuming that needing application to be tested will be not in failure under continuous 24 hours working conditions, therefore 24 are set by a reference value.
In this corresponding test item of 5 Devices to test and daily record data without response times anr and collapse number
Crash is as shown in table 1.
Table 1:
Devices to test | Test item | Without response times anr | Collapse number crash |
A | Installation unloading | 0 | 0 |
B | Exit recovery | 0 | 0 |
C | Application switching | 2 | 0 |
D | Open and close | 0 | 0 |
E | Stability | 2 | 3 |
Wherein, the average time between failures MTBF=24/ (2+0)=12 of application switching;Between the mean failure rate of stability
Every time MTBF=24/ (2+3)=4.8;The average time between failures MTBF of other test items is 24;Total mean failure rate
Interval time MTBF=(24*5)/(2+2+3)=17.14.Wherein, the average time between failures of application switching, stability
Average time between failures, total average time between failures are less than preset a reference value 24, and therefore, this time test does not pass through.
S8: generating test report, and the content of test report includes facility information, application message and test result, can be with
Including length of testing speech, testing time, daily record data, the analysis of average time between failures algorithm etc..By generating test report, after
It is continuous that the unacceptable facility information of test and application message can be checked according to test report.
The test of automation can be realized by easy configuration for the present embodiment, can reduce user's threshold, greatly simplify
Software performance test in Android device can save human and material resources, and while improving testing efficiency, also ensure that test is quasi-
True rate.
Embodiment two
The present embodiment is a kind of computer readable storage medium of corresponding above-described embodiment, is stored thereon with computer journey
Sequence performs the steps of when described program is executed by processor
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and preset length of testing speech and each test script one is a pair of
It is sent to each Devices to test with answering;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
Further, " according to the length of testing speech, without response times and collapse number, mean time between failures is calculated
Time " specifically:
It is to be measured to be obtained described one without the sum of response times and collapse number divided by a Devices to test for the length of testing speech
The average time between failures of test item corresponding to equipment;
If the average time between failures is less than preset a reference value, survey corresponding to a Devices to test is determined
Examination item test does not pass through.
Further, the length of testing speech of each Devices to test is consistent;" according to the length of testing speech, without response times and collapse
Average time between failures is calculated in number " specifically:
By the product of the length of testing speech and test item number divided by each Devices to test without response times and collapse number it
With obtain total average time between failures;
If total average time between failures is less than preset a reference value, discriminating test does not pass through.
Further, it if being 0 without the sum of response times and collapse number, will be set without the sum of response times and collapse number
It is 1.
Further, " Devices to test that quantity is test item number is chosen, and by preset length of testing speech and each test
Script is sent to each Devices to test correspondingly " specifically:
Obtain the facility information of Devices to test;
According to the facility information, choose the Devices to test that quantity is test item number, and by each test item with it is each to be measured
Equipment is associated one by one;
The test script of preset length of testing speech and corresponding test item is sent to each Devices to test.
In conclusion the test method and computer-readable storage medium of a kind of average time between failures provided by the invention
Cost can be greatly reduced by being tested simultaneously scale equipment in matter;By making using simultaneously to different specified fields
Scape carries out Repeatability test, and disqualification rate can be greatly reduced, and shortens the testing time, improves testing efficiency;Pass through average event
Barrier interval time algorithm provides index to measure product reliability.The survey of automation can be realized by easy configuration by the present invention
Examination, can reduce user's threshold, greatly simplify the software performance test in Android device, can save human and material resources, and improve and survey
While trying efficiency, test accuracy rate is also ensured.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include
In scope of patent protection of the invention.
Claims (10)
1. a kind of test method of average time between failures characterized by comprising
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and correspondingly by preset length of testing speech and each test script
It is sent to each Devices to test;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
2. the test method of average time between failures according to claim 1, which is characterized in that " according to the test
Duration, without response times and collapse number, average time between failures is calculated " specifically:
The length of testing speech is obtained into a Devices to test without the sum of response times and collapse number divided by a Devices to test
The average time between failures of corresponding test item;
If the average time between failures is less than preset a reference value, test item corresponding to a Devices to test is determined
Test does not pass through.
3. the test method of average time between failures according to claim 1, which is characterized in that the survey of each Devices to test
It is consistent to try duration;" according to the length of testing speech, without response times and collapse number, average time between failures is calculated " tool
Body are as follows:
The product of the length of testing speech and test item number is obtained divided by each Devices to test without the sum of response times and collapse number
To total average time between failures;
If total average time between failures is less than preset a reference value, discriminating test does not pass through.
4. the test method of average time between failures according to claim 2 or 3, which is characterized in that if without response time
The sum of number and collapse number are 0, then will be set as 1 without the sum of response times and collapse number.
5. the test method of average time between failures according to claim 1, which is characterized in that " choosing quantity is to survey
The Devices to test of item number is tried, and preset length of testing speech and each test script are sent to each to be measured set correspondingly
It is standby " specifically:
Obtain the facility information of Devices to test;
According to the facility information, the Devices to test that quantity is test item number is chosen, and by each test item and each Devices to test
It is associated one by one;
The test script of preset length of testing speech and corresponding test item is sent to each Devices to test.
6. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is by processor
It is performed the steps of when execution
Default test item, and generate corresponding test script;
The Devices to test that quantity is test item number is chosen, and correspondingly by preset length of testing speech and each test script
It is sent to each Devices to test;
Collect the daily record data that each Devices to test executes corresponding test script;
According to the daily record data, obtain respectively each Devices to test without response times and collapse number;
According to the length of testing speech, without response times and collapse number, average time between failures is calculated.
7. computer readable storage medium according to claim 6, which is characterized in that " according to the length of testing speech, without sound
Number and collapse number are answered, average time between failures is calculated " specifically:
The length of testing speech is obtained into a Devices to test without the sum of response times and collapse number divided by a Devices to test
The average time between failures of corresponding test item;
If the average time between failures is less than preset a reference value, test item corresponding to a Devices to test is determined
Test does not pass through.
8. computer readable storage medium according to claim 6, which is characterized in that the length of testing speech one of each Devices to test
It causes;" according to the length of testing speech, without response times and collapse number, average time between failures is calculated " specifically:
The product of the length of testing speech and test item number is obtained divided by each Devices to test without the sum of response times and collapse number
To total average time between failures;
If total average time between failures is less than preset a reference value, discriminating test does not pass through.
9. computer readable storage medium according to claim 7 or 8, which is characterized in that if without response times and collapse
The sum of number is 0, then will be set as 1 without the sum of response times and collapse number.
10. computer readable storage medium according to claim 6, which is characterized in that " selection quantity is test item number
Devices to test, and preset length of testing speech and each test script are sent to each Devices to test correspondingly " specifically:
Obtain the facility information of Devices to test;
According to the facility information, the Devices to test that quantity is test item number is chosen, and by each test item and each Devices to test
It is associated one by one;
The test script of preset length of testing speech and corresponding test item is sent to each Devices to test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810249921.XA CN110362461A (en) | 2018-03-26 | 2018-03-26 | The test method and computer readable storage medium of average time between failures |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810249921.XA CN110362461A (en) | 2018-03-26 | 2018-03-26 | The test method and computer readable storage medium of average time between failures |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110362461A true CN110362461A (en) | 2019-10-22 |
Family
ID=68211833
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810249921.XA Pending CN110362461A (en) | 2018-03-26 | 2018-03-26 | The test method and computer readable storage medium of average time between failures |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110362461A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378844A (en) * | 2022-07-11 | 2022-11-22 | 天翼云科技有限公司 | Method and device for detecting network link fault |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030084376A1 (en) * | 2001-10-25 | 2003-05-01 | Nash James W. | Software crash event analysis method and system |
CN103838663A (en) * | 2012-11-20 | 2014-06-04 | 腾讯科技(深圳)有限公司 | Application testing method and device |
CN106095682A (en) * | 2016-06-15 | 2016-11-09 | 浪潮软件集团有限公司 | Android application stability test method for simulating complex network |
-
2018
- 2018-03-26 CN CN201810249921.XA patent/CN110362461A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030084376A1 (en) * | 2001-10-25 | 2003-05-01 | Nash James W. | Software crash event analysis method and system |
CN103838663A (en) * | 2012-11-20 | 2014-06-04 | 腾讯科技(深圳)有限公司 | Application testing method and device |
CN106095682A (en) * | 2016-06-15 | 2016-11-09 | 浪潮软件集团有限公司 | Android application stability test method for simulating complex network |
Non-Patent Citations (1)
Title |
---|
江开耀, 西安电子科技大学出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378844A (en) * | 2022-07-11 | 2022-11-22 | 天翼云科技有限公司 | Method and device for detecting network link fault |
CN115378844B (en) * | 2022-07-11 | 2023-06-23 | 天翼云科技有限公司 | Fault detection method and device for network link |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1899876B1 (en) | System and method for using model analysis to generate directed test vectors | |
Weyuker et al. | Using developer information as a factor for fault prediction | |
CN108563548A (en) | Method for detecting abnormality and device | |
US7093238B2 (en) | Automated software testing and validation system | |
Kalinowski et al. | Evidence-based guidelines to defect causal analysis | |
CN106055464B (en) | Data buffer storage testing schooling pressure device and method | |
CN107992410B (en) | Software quality monitoring method and device, computer equipment and storage medium | |
CN108664372A (en) | Monitoring device, method and the computer readable storage medium of test process | |
CN106776165A (en) | Server performance method of testing and system | |
US11169910B2 (en) | Probabilistic software testing via dynamic graphs | |
CN107038120A (en) | A kind of method for testing software and equipment | |
Misra et al. | Survey on agile metrics and their inter-relationship with other traditional development metrics | |
CN105975603A (en) | Database performance test method and device | |
CN107220165A (en) | The method and apparatus of pressure test on a kind of artificial line | |
CN104063307A (en) | Software testing method and system | |
CN110362461A (en) | The test method and computer readable storage medium of average time between failures | |
CN109240928A (en) | A kind of test method, device, equipment and storage medium | |
CN104142885B (en) | A kind of method and apparatus for carrying out abnormality test to tested program | |
KR101403685B1 (en) | System and method for relating between failed component and performance criteria of manintenance rule by using component database of functional importance determination of nuclear power plant | |
CN107885649A (en) | The performance test methods and device of IOS application programs | |
CN112346994A (en) | Test information correlation method and device, computer equipment and storage medium | |
Metze et al. | Reliable evaluation of multimodal dialogue systems | |
CN106855840B (en) | System CPU analysis method and device | |
CN110297778A (en) | A kind of method for testing software and software testing device | |
Krasich | Modeling of SW reliability in early design with planning and measurement of its reliability growth |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |