Disclosure of Invention
The invention aims to provide a test method and a test system of an intelligent terminal, which are used for solving the problems in the prior art and improving the production efficiency.
A testing method of an intelligent terminal is characterized by comprising the following steps:
starting an intelligent terminal with an android system, wherein a test program is burnt in the intelligent terminal in advance, and the test program comprises a PCBA test program and a complete machine test program;
calling a PCBA test program to run in a Linux system by using an init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to an upper computer after the PCBA test is finished;
and starting an android system of the intelligent terminal by utilizing an init process, calling the complete machine test program to perform complete machine test on the application program of the intelligent terminal, and reporting a complete machine test result to the upper computer after the complete machine test is completed.
Preferably, the method further comprises the following steps: the init process selects to call a PCBA test program or start an android system of the intelligent terminal according to whether a trigger condition set by detection is triggered;
if so, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished;
if not, starting an android system of the intelligent terminal by using an init process, calling the whole machine test program to carry out whole machine test on the application program of the intelligent terminal, and reporting a whole machine test result to the upper computer after the whole machine test is finished.
Preferably, when detecting that the set trigger condition is triggered, the method further comprises:
starting a service program of hardware on the PCBA;
and calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished.
Preferably, the PCBA test program includes a memory test program, a WiFi test program, a bluetooth test program, and a hard disk storage test program.
Preferably, after the PCBA test is completed and the PCBA test result is reported to the upper computer, the method further includes:
and forming a trigger file, wherein the trigger file is used as a trigger condition for entering a complete machine test program.
Preferably, after entering the android system, the method further includes:
starting an intelligent terminal service program;
detecting whether the trigger file exists or not under a set path of the intelligent terminal service program;
if so, exiting the intelligent terminal service program, calling the whole machine test program to carry out whole machine test on the application program of the intelligent terminal, and reporting a whole machine test result to an upper computer after the whole machine test is finished;
and if not, continuing to run the intelligent terminal service program.
Preferably, after entering the android system, the method further includes:
starting an intelligent terminal service program;
detecting whether a set combination key is triggered;
if so, exiting the intelligent terminal service program, calling the whole machine test program to carry out whole machine test on the application program of the intelligent terminal, and reporting a whole machine test result to an upper computer after the whole machine test is finished;
and if not, continuing to run the intelligent terminal service program.
Preferably, the complete machine test program is used for testing: the APP program and the hardware service program installed on the intelligent terminal.
The invention also provides a test system of the intelligent terminal, which comprises an init unit, a PCBA test unit and a complete machine test unit;
the init unit is used for calling the PCBA test unit and an android system of the intelligent terminal according to requirements in an android system environment;
the PCBA testing unit is used for enabling a PCBA testing program to run in the Linux system, testing the PCBA of the intelligent terminal, and reporting a PCBA testing result to the upper computer after the PCBA testing is finished;
and the complete machine testing unit is used for operating a complete machine testing program to carry out complete machine testing on the application program of the intelligent terminal and reporting a complete machine testing result to the upper computer after the complete machine testing is finished.
Preferably, the init unit is further configured to call a PCBA test unit or an entire machine test unit according to whether the set trigger condition is detected.
According to the test method and the test system of the intelligent terminal, the init process is utilized to call the PCBA test program to run in the Linux system, the PCBA of the intelligent terminal is tested, and the PCBA test result is reported to the upper computer after the PCBA test is finished; and starting an android system of the intelligent terminal by utilizing an init process, calling the complete machine test program to perform complete machine test on the application program of the intelligent terminal, and reporting a complete machine test result to the upper computer after the complete machine test is completed. Compared with the prior art, the quick PCBA test and the complete machine test can be finished without a switching system, and the delivery efficiency of products is improved.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
Fig. 1 is a flowchart of a method for testing an intelligent terminal according to a first embodiment of the present invention, and as shown in fig. 1, an embodiment of the present invention provides a method for testing an intelligent terminal, where the intelligent terminal may be an AI speaker or other AI devices.
The method comprises the following steps:
and S101, starting the intelligent terminal with the android system.
And S102, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished.
When the Linux kernel is started, the first running process is an initialization (init) process, the initialization (init) process is a user-level process started by the kernel, and other processes are started by the initialization (init) process.
Preferably, the PCBA test program includes a memory (ddr) test program, a WiFi test program, a bluetooth test program, and a hard disk storage (emmc) test program. In the embodiment, the PCBA test program starts four threads, and different test items are distributed in each thread, so that the test time can be shortened by utilizing the characteristic of high boot speed of the quad-core CPU and the Linux.
S103, starting an android system of the intelligent terminal by using an init process, calling the whole machine test program to carry out whole machine test on the application program of the intelligent terminal, and reporting a whole machine test result to the upper computer after the whole machine test is finished.
Preferably, the complete machine test program is used for testing: the APP program installed on the intelligent terminal and the service program of the hardware comprise a module test program, a lamp strip test program, a touch ring test program, a wakeup test program and the like tested by the PCBA.
The whole machine test program firstly self-checks each module during PCBA test, then tests the functions of newly-increased lamp strip, touch ring, sound effect and voice awakening under the appearance structure after assembly, then transmits to the upper computer through wifi to save and analyze, and finally prompts the whole machine test to finish through sound and lamp strip.
The test method of the intelligent terminal provided by the embodiment of the invention realizes the aim that the PCBA test and the complete machine test can be completed by one-time system burning, solves the production efficiency problem caused by replacing different systems in a manual mode, and solves the production efficiency problem caused by completing factory test through an application layer of an android system.
Fig. 2 is a flowchart of a testing method for an intelligent terminal according to a second embodiment of the present invention, and as shown in fig. 2, an embodiment of the present invention provides a testing method for an intelligent terminal, where the method includes:
and S201, starting the intelligent terminal with the android system.
S202, the init process selects to call a PCBA test program or start an android system of the intelligent terminal according to whether the trigger condition set by detection is triggered, and if yes, the step S203 is carried out; if not, the process proceeds to S204.
Specifically, the init process can call different programs or start different systems and services according to different trigger conditions during startup. In this embodiment, the level state of a specific GPIO pin (test pin) may be detected as a trigger condition when the init process is started. When the level state of the test pin is low level, the process goes to S203; when the level state of the test pin is high, S204 is entered.
The test pin appears as a circular contact on the PCB board. When the PCBA test is carried out, the round contact is contacted and the level of the round contact is pulled down through the probe before the init process is started. When the whole machine is tested, due to the protection of the shell and the structure, the PCBA test can be prevented from being started by external error touch and just pulled down to a low level.
It will be appreciated by those skilled in the art that the trigger condition is not limited to the above-mentioned level trigger, but may be other forms such as button trigger.
And S203, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished.
And S204, starting the android system of the intelligent terminal by using the init process, calling the whole machine test program to carry out the whole machine test on the application program of the intelligent terminal, and reporting the whole machine test result to the upper computer after the whole machine test is finished.
Fig. 3 is a flowchart of a testing method for an intelligent terminal according to a third embodiment of the present invention, and as shown in fig. 3, an embodiment of the present invention provides a testing method for an intelligent terminal, where the method includes:
and S301, starting the intelligent terminal with the android system.
S302, the init process selects to call a PCBA test program or start an android system of the intelligent terminal according to whether the trigger condition set by detection is triggered, and if yes, the step S303 is executed; if not, the process proceeds to S305.
S303, starting a service program of hardware on the PCBA. The service program may include a WIFI service program, a bluetooth service program, and the like.
S304, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished.
S305, starting an android system of the intelligent terminal by using an init process, calling the whole machine test program to carry out whole machine test on the application program of the intelligent terminal, and reporting a whole machine test result to the upper computer after the whole machine test is finished.
Fig. 4 is a flowchart of a testing method for an intelligent terminal according to a fourth embodiment of the present invention, and as shown in fig. 4, an embodiment of the present invention provides a testing method for an intelligent terminal, where the method includes:
and S401, starting the intelligent terminal with the android system.
S402, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is completed.
And S403, forming a trigger file, wherein the trigger file is used as a trigger condition for entering the whole machine test program. The trigger file may be an empty file or may be a file of another form. The empty file can be used as a trigger condition for entering a complete machine test program in the following text.
S404, starting an android system of the intelligent terminal by using an init process, calling the whole machine test program to carry out whole machine test on the application program of the intelligent terminal, and reporting a whole machine test result to the upper computer after the whole machine test is finished.
Fig. 5 is a flowchart of a testing method for an intelligent terminal according to a fifth embodiment of the present invention, and as shown in fig. 5, an embodiment of the present invention provides a testing method for an intelligent terminal, where the method includes:
and S501, starting the intelligent terminal with the android system.
And S502, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished.
S503, forming a trigger file; the trigger file is used as a trigger condition for entering a complete machine test program. The trigger file may be an empty file or may be a file of another form. The empty file can be used as a trigger condition for entering a complete machine test program in the following text.
And S504, starting the android system of the intelligent terminal by using the init process.
And S505, starting the intelligent terminal service program.
S506, detecting whether the trigger file exists or not under a set path of the intelligent terminal service program; if yes, go to S507; if not, the process proceeds to S508.
And S507, exiting the intelligent terminal service program, calling the complete machine test program to perform complete machine test on the application program of the intelligent terminal, and reporting a complete machine test result to an upper computer after the complete machine test is completed.
And S508, continuously operating the intelligent terminal service program.
Preferably, after S507, the method further includes:
and S509, deleting the trigger file.
Fig. 6 is a flowchart of a testing method for an intelligent terminal according to a sixth embodiment of the present invention, and as shown in fig. 6, an embodiment of the present invention provides a testing method for an intelligent terminal, where the method includes:
and S601, starting the intelligent terminal with the android system.
And S602, calling a PCBA test program to run in the Linux system by using the init process, testing the PCBA of the intelligent terminal, and reporting a PCBA test result to the upper computer after the PCBA test is finished.
And S603, starting the android system of the intelligent terminal by using the init process.
And S604, starting the intelligent terminal service program.
S605, detecting whether the set combination key is triggered; if yes, go to S606; if not, the process proceeds to S607.
And S606, exiting the intelligent terminal service program, calling the complete machine test program to perform complete machine test on the application program of the intelligent terminal, and reporting a complete machine test result to the upper computer after the complete machine test is completed.
And S607, continuing to run the intelligent terminal service program.
The embodiment of the invention also provides a test system of the intelligent terminal, which comprises an init unit, a PCBA test unit and a complete machine test unit. The init unit is used for calling the PCBA test unit and an android system of the intelligent terminal according to requirements in an android system environment; the PCBA testing unit is used for enabling a PCBA testing program to run in the Linux system, testing the PCBA of the intelligent terminal, and reporting a PCBA testing result to the upper computer after the PCBA testing is finished; and the complete machine testing unit is used for operating a complete machine testing program to carry out complete machine testing on the application program of the intelligent terminal and reporting a complete machine testing result to the upper computer after the complete machine testing is finished.
Preferably, the init unit is further configured to call a PCBA test unit or an entire machine test unit according to whether the set trigger condition is detected.
The test system of the intelligent terminal provided by the embodiment of the invention realizes the aim that the PCBA test and the complete machine test can be completed by one-time system burning, solves the production efficiency problem caused by replacing different systems in a manual mode, and solves the production efficiency problem caused by completing factory test through an application layer of an android system.
The construction, features and functions of the present invention are described in detail in the embodiments illustrated in the drawings, which are only preferred embodiments of the present invention, but the present invention is not limited by the drawings, and all equivalent embodiments modified or changed according to the idea of the present invention should fall within the protection scope of the present invention without departing from the spirit of the present invention covered by the description and the drawings.