A kind of method of production test, system and terminal unit
Technical field
The present invention relates to field tests, more particularly, to a kind of method of production test, system and terminal unit.
Background technology
All using real time operating system, great majority use (SuSE) Linux OS, production test to embedded device at present
It is all based on working under operating system, because the os starting time is slow, the production test to equipment is all in operation
System start-up finishes and just starts, and so every equipment test is very long;Because operating system can be to there being protection, thus in some
Full memory can not be tested.In the case that current the Internet high mature and 3G flourish, people are to embedding with audio frequency and video
The demand entering formula equipment increasingly increases, and the production difficulty of audio frequency and video embedded device is higher.
Content of the invention
The purpose of the embodiment of the present invention is to propose a kind of method of production test, system and terminal unit it is intended to solve
It is all based under operating system working by the production test of embedded device in prior art, due to the os starting time
Slow, test is very long, and operating system can be protected it is impossible to test full memory, the production to audio frequency and video to having in some
Difficulty of test is high, and testing efficiency is low, and accuracy rate is low, particularly carries out audio-frequency test under noisy environment, if using human ear
To listen, at least will gather several second datas, data volume is very big, transmission time is also long, the technical problem of testing time more lengthening.
The embodiment of the present invention is achieved in that a kind of method of production test, comprises the following steps:
Upper electricity simultaneously initializes;
Obtain test keyword;
Enter test mode, tested.
The another object of the embodiment of the present invention is to propose a kind of system of production test, and described system includes introductory die
Block, acquisition instruction module and test module;
Described initial module, is connected with described acquisition instruction module, for upper electric and initialize;
Described acquisition instruction module, is connected with described initial module and test module, for obtaining test keyword;
Described test module, is connected with described acquisition instruction module, for entering test mode, is tested.
The another object of the embodiment of the present invention is to propose a kind of terminal unit including described production test system.
Beneficial effects of the present invention:
The present invention passes through on embedded device electricity and after initializing, and obtains test keyword, enters test mode, surveyed
Examination, it is to avoid login of operating system, wastes landing time, only the time less than 1 second need to can enter test mode and be tested, effect
Rate is high, and, carry out MEMTEST in test mode, this stage, not to internal memory write-protect, interior can deposit into all of
Row read-write check is tested;By carrying out Serial Port Transmission picture in test mode, can achieve before not entering into operating system and regard
The possibility of frequency data transfer;By in test mode with image by way of carry out the test of voice data, can be intuitively by sound
Pictorial form is shown frequency according to this, improves testing efficiency and accuracy rate, especially, it is to avoid cannot enter under noisy environment
Row audio-frequency test, or test result is inaccurate, reduces quantity and the transmission time of the data of collection simultaneously, improves test effect
Rate, improves test accuracy.
Brief description
Fig. 1 is a kind of flow chart of the method for production test of the embodiment of the present invention;
Fig. 2 is a kind of structural representation of the system first preferred embodiment of production test of the present invention;
Fig. 3 is a kind of structural representation of system second preferred embodiment of production test of the present invention;
Fig. 4 is a kind of structural representation of the system third preferred embodiment of production test of the present invention;
Fig. 5 is a kind of structural representation of system the 4th preferred embodiment of production test of the present invention.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with drawings and Examples, right
The present invention is further elaborated, and for convenience of description, illustrate only the part related to the embodiment of the present invention.Should manage
Solution, the specific embodiment that this place is described, it is used only for explaining the present invention, not in order to limit the present invention.
The present invention passes through on embedded device electricity and after initializing, and obtains test keyword, enters test mode, surveyed
Examination, it is to avoid login of operating system, wastes landing time, only the time less than 1 second need to can enter test mode and be tested, effect
Rate is high, and, carry out MEMTEST in test mode, this stage, not to internal memory write-protect, interior can deposit into all of
Row read-write check is tested;By carrying out Serial Port Transmission picture in test mode, can achieve before not entering into operating system and regard
The possibility of frequency data transfer;Carry out the test of voice data in test mode by way of carrying out with image, can be intuitively
Voice data is shown with pictorial form, is improved testing efficiency and accuracy rate, especially, it is to avoid under noisy environment no
Method carries out audio-frequency test, or test result is inaccurate, reduces quantity and the transmission time of the data of collection simultaneously, improves test
Efficiency, improves test accuracy.
Embodiment one
A kind of method flow diagram of production test of Fig. 1 embodiment of the present invention.Described method comprises the following steps:
S101, power-up initializing;
May wait for after embedded device power-up initializing obtaining test keyword;
Described test keyword is for waiting for the life of the entrance test mode of reception after embedded device power-up initializing
Order, can enter test mode after receiving described order, and described test keyword can be character, the numeral pre-setting
Or signal;
S102, obtains test keyword;
The test keyword that described test keyword sends for host computer;
Judge whether to receive test keyword within the preset very first time, if it is, entering test mode, no
Then, enter operating system;
The described very first time is 100 milliseconds, if receiving test keyword in 100 milliseconds, enters test shape
State;If being not received by testing keyword in 100 milliseconds, enter operating system;
S103, enters test mode, is tested;
Described " test " includes carrying out MEMTEST, video measurement and/or audio-frequency test;
Embedded device does not need login of operating system, after power-up initializing, obtains test keyword, real in the BOOT stage
Existing test process, so entering test mode only need to be less than the time of 1 second;
Described MEMTEST is internally to deposit into the test of row read-write check:Because test environment is in the BOOT stage, this stage
There is no operating system, that is, the not write-protect to internal memory, this is can be written and read check test to all of internal memory.
Such scheme is optimized further and is, described " judge whether to get test within the preset very first time to close
Key word, if " also include afterwards:
Feedback handshake;
Judge whether to get test password within the second preset time, if it is, certification is passed through, enter step
" entering test mode, tested ".
After host computer receives described handshake, send test password to embedded device, otherwise continue to send test
Keyword.
Such scheme is optimized further and is, described video measurement process is specially:
Obtain picture;
By picture described in Serial Port Transmission;
Obtain and show described picture.
Described acquisition picture is preset test image signal;
Wherein, also include after described " acquisition picture ":
The picture getting is compressed;
Described " by picture described in Serial Port Transmission " is specially:
Picture after compressing described in Serial Port Transmission;
Described " obtaining and show described picture " is specially:
Obtain and show the picture after described compression.
Described compress mode is image compression format or lossless compress, such as JPEG compression.
Such scheme is optimized further and is, described audio-frequency test process is specially:
Obtain the voice data intending signal with the 3rd preset time for modulus of periodicity;
Voice data to the digital signal of the 3rd time of at least 2 times of the audio data samples of described analogue signal;
Voice data by digital signal described in Serial Port Transmission;
The voice data of described digital signal is converted to view data;
Described image data is shown in the way of image.
Such scheme is optimized further and is, described step " by the voice data of digital signal described in Serial Port Transmission "
Also include before:
Compress the voice data of described digital signal;
Described step " by voice data of digital signal described in Serial Port Transmission " is specially:
Voice data after compressing described in Serial Port Transmission;
Described step " voice data of described digital signal is converted to view data " is specially:
Voice data after described compression is converted to view data;
Described compress mode is lossless compress mode, such as ZIP, RAR compressed format.
Such scheme is optimized further and is, described 3rd time is 20ms;
Described " obtaining the voice data being intended signal with the 3rd time for modulus of periodicity " is specially:
Obtain the voice data intending signal with 20ms for modulus of periodicity;
Described " voice data to the audio data samples at least digital signal of 2 times of the 3rd time of described analogue signal "
It is specially:
Voice data to the audio data samples at least digital signal of 40ms of described analogue signal;
By the sampling at least two cycles, can intuitively carry out image comparison;
Decompress described voice data, the voice data of described digital signal is converted to view data, and by described figure
As data is shown in the way of image.
Data volume very little after compression, the data after compression through Serial Port Transmission to host computer, host computer is through decompression
Reduction voice data, then shows these data in the way of image on interface.
Pass through on embedded device electricity in the embodiment of the present invention and after initializing, obtain test keyword, enter test shape
State, is tested, it is to avoid login of operating system, wastes landing time, only the time less than 1 second need to can enter test mode and enter
Row test, efficiency high, and, carry out MEMTEST in test mode, this stage, can be to all not to internal memory write-protect
Internal memory be written and read check test, especially, by the preset very first time, can be with the test to be obtained keyword such as reasonable distribution
Time, it is to avoid the waiting time is long and enter operating system, or the waiting time is too short, obtains less than test keyword no
Method enters test mode;By feeding back handshake, obtain test password to be authenticated, certification is passed through, then enter test
State, improves the safety of system;By Serial Port Transmission picture, realize can achieve video before not entering into operating system
The possibility of data transfer;By compressed picture, reduce the size of picture further, improve transmission speed, testing efficiency is high;Pass through
Obtain the voice data intending signal with the 3rd time for modulus of periodicity, at least 2 times of the audio data samples to described analogue signal
The digital signal of the 3rd time voice data, by the voice data of digital signal described in Serial Port Transmission, with the side of image
Formula shows described voice data, intuitively can be shown voice data with pictorial form, by 2 times of the 3rd times
Audio data samples, more intuitively assume contrast effect, improve testing efficiency and accuracy rate, especially, it is to avoid noisy
Cannot be carried out audio-frequency test under environment, or test result be inaccurate, reduce quantity and the transmission time of the data of collection simultaneously,
Improve testing efficiency, improve test accuracy.
Embodiment two
Fig. 2 is a kind of structural representation of the system first preferred embodiment of production test of the embodiment of the present invention.
Described system includes initial module, obtains instruction module and test module;
Described initial module, is connected with described acquisition instruction module, for upper electric and initialize;
May wait for after embedded device power-up initializing obtaining test keyword;
Described test keyword is for waiting for the life of the entrance test mode of reception after embedded device power-up initializing
Order, can enter test mode after receiving described order, and described test keyword can be character, the numeral pre-setting
Or signal;
Described acquisition instruction module, is connected with described initial module and test module, for obtaining test keyword;
The test keyword that described test keyword sends for host computer;
Described test module, is connected with described acquisition instruction module, for entering test mode, is tested.
Embedded device does not need login of operating system, after power-up initializing, obtains test keyword, real in the BOOT stage
Existing test process, so entering test mode only need to be less than the time of 1 second;
The described instruction module that obtains is additionally operable to judge whether receive within the preset very first time test keyword, such as
Fruit is then to enter test mode, otherwise, enters operating system;
The described very first time is 100 milliseconds, if receiving test keyword in 100 milliseconds, enters test shape
State;If being not received by testing keyword in 100 milliseconds, enter operating system;
Described acquisition instruction module is additionally operable to feed back handshake;Judge whether to get within the second preset time
Test password, if it is, certification is passed through, and notifies test module.
After host computer receives described handshake, send test password to embedded device, otherwise continue to send test
Keyword.
Above-mentioned first preferred embodiment is optimized further and is, described test module includes internal memory test module, video
Test module and audio-frequency test module, are illustrated in figure 3 a kind of knot of system second preferred embodiment of production test of the present invention
Structure schematic diagram.
Described internal memory test module, is connected with described acquisition instruction module, for carrying out MEMTEST under test mode;
Described MEMTEST is internally to deposit into the test of row read-write check:Because test environment is in the BOOT stage, this stage
There is no operating system, that is, the not write-protect to internal memory, this is can be written and read check test to all of internal memory.
Described video measurement module, is connected with described acquisition instruction module, for carrying out video measurement under test mode;
Described audio-frequency test module, is connected with described acquisition instruction module, for carrying out audio-frequency test under test mode.
Above-mentioned first or second preferred embodiment is optimized further and is, described video measurement module includes picture and obtains
Module, first serial transport module and the first image display, are illustrated in figure 4 a kind of system of production test of the present invention
The structural representation of three preferred embodiments;
Described picture acquisition module, is connected with described acquisition instruction module and first serial transport module, for obtaining figure
Piece;
Described first serial transport module, is connected with described picture acquisition module and the first image display, for leading to
Cross picture described in Serial Port Transmission;
Described first image display module, is connected with described first serial transport module, for obtaining and showing described figure
Piece, described acquisition picture is preset test image signal;
Described picture acquisition module is additionally operable to be compressed the picture getting;
Described first serial transport module is additionally operable to the picture after compressing described in Serial Port Transmission;
Described first image display module is additionally operable to the picture after obtaining and show described compression.
Above-mentioned first, second or third preferred embodiment is optimized further and is, described audio-frequency test module includes sound
Frequency acquisition module, audio sample module, second serial transport module, audio conversion module and the second image display, such as Fig. 5
It show a kind of structural representation of system the 4th preferred embodiment of production test of the present invention;
Described audio frequency acquisition module, is connected with described acquisition instruction module and audio sample module, for obtaining with preset
The 3rd time for modulus of periodicity intend signal voice data, described 3rd time be 20ms;
Described audio sample module, is connected with described audio frequency acquisition module and second serial transport module, for described
The voice data of the digital signal of the 3rd time of at least 2 times of the audio data samples of analogue signal;
By the sampling at least two cycles, can intuitively carry out image comparison;
Described second serial transport module, is connected with described audio sample module and audio conversion module, for by string
The voice data of digital signal described in port transmission;
Described audio conversion module, is connected with described second serial transport module and the second image display, for inciting somebody to action
The voice data of described digital signal is converted to view data;
Described second image display, is connected with described audio conversion module, for by described image data with image
Mode shown.
Optimize further and be, described second serial transport module is additionally operable to compress the voice data of described digital signal,
And the voice data after compressing described in Serial Port Transmission;
Described audio conversion module is additionally operable to for the voice data after described compression to be converted to view data;
Described second image display be additionally operable to decompress described image data, and by decompression after view data with
The mode of image is shown;Described compress mode is lossless compress mode, such as ZIP, RAR compressed format.
Make electric on embedded device by initial module in the embodiment of the present invention and initialize, obtained by obtaining instruction module
Take test keyword, test mode entered by test module, is tested, it is to avoid login of operating system, waste landing time,
Only the time less than 1 second need to can enter test mode to be tested, efficiency high, and, by test module in test mode
Carry out MEMTEST, this stage, not to internal memory write-protect, can be written and read check test to all of internal memory, especially
Ground, judges whether to receive test keyword within the preset very first time by obtaining instruction module, if it is, enter surveying
Examination state, the time of the test to be obtained keyword such as reasonable distribution, it is to avoid the waiting time is long and enter operating system, or wait
Treat that the time is too short, obtain less than test keyword and cannot be introduced into test mode;Feed back handshake by obtaining instruction module,
Judge whether to get test password within the second preset time, if it is, certification is passed through, improve the safety of system
Property;Video measurement is carried out under test mode by video measurement module, especially, picture is obtained by picture acquisition module,
Pass through to transmit described picture by first serial transport module, can achieve video data transmission before not entering into operating system
Possibility;By picture acquisition module compressed picture, reduce the size of picture further, improve transmission speed, testing efficiency is high;
Audio-frequency test is carried out under test mode by audio-frequency test module, especially, is obtained with preset by audio frequency acquisition module
3rd time intended the voice data of signal for modulus of periodicity, by audio sample module, the voice data of described analogue signal was adopted
The voice data of the digital signal of the 3rd time of at least 2 times of sample, transmits described digital signal by second serial transport module
Voice data, show described voice data by way of the second image display is with image, intuitively by voice data
Shown with pictorial form, by the audio data samples of 2 times of the 3rd time, more intuitively assume contrast effect, carry
High testing efficiency and accuracy rate, compress and transmit the audio frequency number of described digital signal further by second serial transport module
According to, by second image display decompression contract with image by way of show described voice data, efficiency of transmission carries further
High;Especially, it is to avoid under noisy environment, cannot be carried out audio-frequency test, or test result is inaccurate, reduce collection simultaneously
The quantity of data and transmission time, improve testing efficiency, improve test accuracy.
On the terminal unit that the system of the production test that the present invention provides can apply to need production test, for example embedded
Formula equipment, monitoring device, digital equipment (including PDA, mobile phone), PC, video server etc..