CN113794602A - Equipment testing method and device, terminal equipment and storage medium - Google Patents

Equipment testing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN113794602A
CN113794602A CN202110960181.2A CN202110960181A CN113794602A CN 113794602 A CN113794602 A CN 113794602A CN 202110960181 A CN202110960181 A CN 202110960181A CN 113794602 A CN113794602 A CN 113794602A
Authority
CN
China
Prior art keywords
test
tested
server
result
test item
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
Application number
CN202110960181.2A
Other languages
Chinese (zh)
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.)
Hainan Shilianda Health Intelligent Medical Technology Co Ltd
Original Assignee
Hainan Shilianda Health Intelligent Medical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hainan Shilianda Health Intelligent Medical Technology Co Ltd filed Critical Hainan Shilianda Health Intelligent Medical Technology Co Ltd
Priority to CN202110960181.2A priority Critical patent/CN113794602A/en
Publication of CN113794602A publication Critical patent/CN113794602A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a device testing method, a device, a terminal device and a storage medium, wherein the device testing method comprises the following steps: the device to be tested comprises a first device to be tested of a communication protocol transmission layer and a second device to be tested of a user event processing layer, wherein the first device to be tested receives a test instruction sent by the test server, and the test instruction comprises a test item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.

Description

Equipment testing method and device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a device testing method, apparatus, terminal device, and storage medium.
Background
A complete development flow must not avoid final testing. Testing is a verification process of functionality and stability for a product.
At present, when products leave a factory, testing is needed, the yield of the products is guaranteed, most of the products are tested manually, namely, a corresponding test case is compiled for each function before testing, and testers are needed to perform the function test of the test case on each product.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a device testing method, apparatus, terminal device and storage medium that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a device testing method, where the method is applied to a device to be tested, where the device to be tested includes a first device to be tested in a communication protocol transport layer and a second device to be tested in a user event handling layer, and the first device to be tested and the second device to be tested are respectively used to perform a test on different test item identifiers, where the method includes:
the first device to be tested receives a test instruction sent by a test server, wherein the test instruction comprises a test item identifier;
the first device to be tested judges the test item identification;
according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result;
and the first equipment to be tested sends the test result to the test server.
Optionally, the, according to the determination result, the performing, by the first device to be tested and/or the second device to be tested, the test operation corresponding to the test item identifier respectively to obtain a test result, including:
if the test item identification is of a first type, the first device to be tested executes a test corresponding to the first type test item identification to obtain a first test result;
and if the test item identification is the second type of test item identification, the first device to be tested sends the test instruction to the second device to be tested, so that the second device to be tested executes the test corresponding to the second type of test item identification to obtain a second test result.
Optionally, the step of the second test result obtaining a second test result by the second device to be tested executing the test corresponding to the second type test item identifier includes:
the second device to be tested executes the user interaction test corresponding to the second type test item identification through the object-oriented test case to obtain a second test result;
or
The second device to be tested executes the user interaction test corresponding to the second type test item identification through the test case of the C language to obtain a second test result;
or
And the second device to be tested executes the user interaction test corresponding to the second type test item identification through the test case of C + + to obtain a second test result.
Optionally, the sending, by the first device to be tested, the test result to the test server includes:
the first device to be tested receives a second test result returned by the second device to be tested;
and the first equipment to be tested sends the first test result and/or the second test result to the test server and displays the first test result and/or the second test result on the test server.
Optionally, preset automatic test software is installed on the test server, and before the first device to be tested receives the test instruction sent by the test server, the method further includes:
the first device to be tested receives a test connection request sent by the test server through the preset automatic test software;
the first device to be tested determines a port number according to the test connection request, and sends the port number to the test server, wherein the port number is a preset fixed port number or a randomly generated port number;
and the first equipment to be tested establishes connection with the test server according to the port number.
Optionally, the method further comprises: and the first device to be tested receives the test ending instruction sent by the test server.
In a second aspect, an embodiment of the present invention provides an apparatus testing apparatus, where the apparatus is applied to a device to be tested, where the device to be tested includes a first device to be tested in a communication protocol transport layer and a second device to be tested in a user event processing layer, the first device to be tested and the second device to be tested are respectively used to perform tests on different test item identifiers, the first device to be tested includes a sending module, a determining module, a first executing module, and a returning module, the second device to be tested includes a second executing module, and the apparatus includes:
the sending module is used for receiving a test instruction sent by the test server, wherein the test instruction comprises a test item identifier;
the judging module is used for judging the test item identification;
the first execution module and/or the second execution module are/is used for executing the test operation corresponding to the test item identification according to the judgment result to obtain a test result;
and the return module is used for sending the test result to the test server.
Optionally, the first execution module is configured to execute a test corresponding to the first type test item identifier if the test item identifier is the first type test item identifier, so as to obtain a first test result;
and if the test item identification is the second type of test item identification, sending the test instruction to the second to-be-tested equipment so as to enable the second to-be-tested equipment to execute the test corresponding to the second type of test item identification to obtain a second test result.
Optionally, the second type of test item is identified as a user-interacted test item, and the second execution module is configured to:
executing the user interaction test corresponding to the second type test item identification through the object-oriented test case to obtain a second test result;
or
Executing the user interaction test corresponding to the second type test item identification through the test case of the C language to obtain a second test result;
or
And executing the user interactive test corresponding to the second type test item identification through the test case of C + + to obtain a second test result.
Optionally, the return module is configured to:
receiving a second test result returned by the second device to be tested;
and sending the first test result and/or the second test result to the test server, and displaying the first test result and/or the second test result on the test server.
Optionally, the apparatus further comprises a connection module, the connection module is configured to:
receiving a test connection request sent by the test server through the preset automatic test software;
determining a port number according to the test connection request, and sending the port number to the test server, wherein the port number is a preset fixed port number or a randomly generated port number;
and establishing connection with the test server according to the port number.
Optionally, the first device to be tested further includes an end module, where the end module is configured to receive a test end instruction sent by the test server.
In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the device testing method provided by the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed, the computer program implements the device testing method provided in the first aspect.
The embodiment of the invention has the following advantages:
the device testing method, the device, the terminal device and the storage medium provided by the embodiment of the invention are characterized in that the device to be tested comprises a first device to be tested of a communication protocol transmission layer and a second device to be tested of a user event processing layer, the first device to be tested and the second device to be tested are respectively used for executing tests of different test item identifications, and the first device to be tested receives a test instruction sent by a test server, wherein the test instruction comprises the test item identifications; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a method of testing a device of the present invention;
FIG. 2 is a flow chart of steps in another method embodiment of device testing of the present invention;
FIG. 3 is a flow chart of steps of yet another method embodiment of device testing of the present invention;
FIG. 4 is a flow chart of steps in yet another method embodiment of device testing of the present invention;
FIG. 5 is a flow chart of steps of yet another method embodiment of device testing of the present invention;
FIG. 6 is a flow chart of steps in another method embodiment of device testing of the present invention;
FIG. 7 is a block diagram of an embodiment of an apparatus testing device of the present invention;
fig. 8 is a schematic structural diagram of a terminal device of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The nouns are explained as follows:
automated test tool: a tool on the pc side for sending test scripts. And receiving the test result for displaying.
Testing the script: a series of commands, or instructions, may be written in shell or js, with the specific writing being determined by the specific business. A timed statement may be added to repeat the run.
Sdkerver (cmdServer): for performing a connection service between the automated testing tool and the device under test.
A Hicore layer: c language coding, which is used for receiving the test instruction through the bottom layer protocol communication, has the functions of processing the instruction and forwarding the instruction and transmits the received instruction to the upper layer.
Java layer: some test items need to be interacted with by users and can be forwarded to the java layer through the hicore layer, and the java layer is responsible for processing and feeding back a test result to the hicore layer.
An embodiment of the present invention provides an apparatus testing method, which is used for testing an apparatus. The execution main body of the embodiment is a device testing apparatus, and is arranged on a device to be tested.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a device testing method according to the present invention is shown, where the method may be applied to a device to be tested, where the device to be tested includes a first device to be tested of a communication protocol transport layer and a second device to be tested of a user event handling layer, and the first device to be tested and the second device to be tested are respectively used to perform tests of different test item identifiers, and specifically may include the following steps:
s101, receiving a test instruction sent by a test server by first equipment to be tested, wherein the test instruction comprises a test item identifier;
specifically, after the production of the device is completed, the device needs to be tested before being shipped from a factory, in the embodiment of the invention, in order to improve the testing efficiency, a testing server is provided, then the device to be tested can be connected to the testing server, preset automatic testing software is installed on the testing server, a communication protocol transmission layer and a user event processing layer are arranged on each device to be tested, the communication protocol transmission layer is called a first device to be tested, and the user event processing layer is called a second device to be tested.
Before the test is started, setting a test item identifier of the device to be tested through preset automatic test software on the test server, where the test item identifier includes: current value, voltage value, screen sensitivity, screen brightness, response after a user clicks a certain key and the like;
in the specific implementation process, because the manufacturers of the devices to be tested are different, the identifiers of the test items to be tested are also different, for a certain manufacturer, the identifier of the test item to be tested is called a standard item test, and if the identifier of the test item is not required to be tested, the standard item test can be set.
In the same test process, the devices to be tested connected with the test server can be the devices to be tested of the same manufacturer or the devices to be tested of different manufacturers. If the equipment to be tested of the same manufacturer is available, the test items of the equipment to be tested of the manufacturer can be set in the preset automatic test software of the test server; if the equipment to be tested of different manufacturers is to be tested, different test items are required to be set on the preset automatic test software of the test server according to the requirements of different manufacturers, so that the requirements of different manufacturers and different application scenes can be met.
After the test items of each device to be tested are set on the test server, a test instruction is sent to each device to be tested, the device to be tested receives the test instruction sent by the test server through the preset automatic test software through the communication protocol transmission layer, that is, the first device to be tested of the communication protocol transmission layer receives the test instruction sent by the test server, and the test instruction comprises a test item identifier preset on the test server.
S102, judging the identification of the test item by the first device to be tested;
specifically, the first device to be tested judges the test item identifier, where the test item identifier includes a first type of test item identifier and a second type of test item identifier, where the first type of test item identifier at least includes one or more of a screen hardware test, a parameter test, or a color test; the second type of test item identification comprises a user event operational test.
S103, according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result;
specifically, the first device to be tested judges the test item identifier, and if the test item identifier is the first type of test item identifier, the first device to be tested executes the test operation corresponding to the first type of test item identifier to obtain a test result; and if the test item identification is the second type of test item identification, the second device to be tested executes the test operation corresponding to the second type of test item identification to obtain a corresponding test result.
Exemplarily, the first device to be tested judges the test item identifier, if the test item identifier is the screen brightness, the first device to be tested tests the screen brightness of the device to be tested, and records the test result, namely the screen brightness specific value; and if the test item identification is that the user clicks a certain key on the interface and needs to carry out man-machine interaction, the second device to be tested executes the function corresponding to the key and records the test result.
In the embodiment of the present invention, whether the first device to be tested and the second device to be tested perform the test is determined according to the type of the test item identifier, which is not specifically limited herein.
And S104, the first device to be tested sends the test result to the test server.
In addition, if a certain test item of a certain device to be tested does not pass the test, the next test can be carried out only by sending a test instruction again by the test server, and the test accuracy can be improved.
According to the device testing method provided by the embodiment of the invention, the device to be tested comprises a first device to be tested of a communication protocol transmission layer and a second device to be tested of a user event processing layer, the first device to be tested receives a testing instruction sent by a testing server, wherein the testing instruction comprises a testing item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
The present invention further provides a supplementary description of the device testing method provided in the above embodiment.
As shown in fig. 2, a flow chart of steps of another embodiment of a device testing method of the present invention is shown, which can be applied to a device to be tested, the device to be tested including a first device to be tested of a communication protocol transport layer and a second device to be tested of a user event handling layer, the device testing method including:
s201, a first device to be tested receives a test connection request sent by a test server through preset automatic test software;
specifically, preset automatic test software is installed on the test server, a test connection request is sent to each device to be tested through the preset automatic test software, and the device to be tested receives the test connection request through a communication protocol transport layer, that is, the first device to be tested receives the test connection request sent by the test server.
S202, the first device to be tested determines a port number according to the test connection request and sends the port number to a test server, wherein the port number is a preset fixed port number or a randomly generated port number;
specifically, after receiving a test connection request sent by the test server, the first device to be tested determines a port number, which may be a preset fixed port number or a port number randomly generated according to the test connection request, and then sends the port number to the test server.
S203, the first device to be tested establishes connection with the test server according to the port number.
S204, receiving a test instruction sent by a test server by first equipment to be tested, wherein the test instruction comprises a test item identifier;
specifically, after the device to be tested and the test server establish connection, the test server sends a test instruction to the device to be tested, and the first device to be tested receives the test instruction, where the test instruction includes a test item identifier. The test item identification comprises a first type of test item identification and at least comprises one or more of screen hardware test, parameter test or color test; the second type of test item identification comprises a user event operational test.
S205, judging the test item identification by the first device to be tested;
s206, if the test item identification is the first type of test item identification, the first device to be tested executes the test corresponding to the first type of test item identification to obtain a first test result;
and S207, if the test item identification is the second type of test item identification, the first device to be tested sends the test instruction to the second device to be tested, so that the second device to be tested executes the test corresponding to the second type of test item identification to obtain a second test result.
The second type of test item identifier is a user interactive test item, and the second device to be tested executes a test corresponding to the second type of test item identifier to obtain a second test result, including:
as an optional implementation manner, the second device to be tested executes the user interaction test corresponding to the second type test item identifier through the object-oriented test case to obtain a second test result;
that is, in the user event processing layer, the test of the user interaction test item can be executed by using the object-oriented test case, that is, the test case in JAVA, so as to obtain the second test result.
As another optional implementation manner, the second device to be tested executes the user interaction test corresponding to the second type test item identifier through the test case of the C language to obtain a second test result;
as another optional implementation manner, the second device to be tested executes the user interaction test corresponding to the second type test item identifier through the C + + test case, so as to obtain a second test result.
And a user event processing layer can adopt JAVA, C or C + + test cases to test the user interaction test items to obtain a test result.
S208, the first device to be tested receives a second test result returned by the second device to be tested;
specifically, after the second device to be tested performs the test corresponding to the second type test item identifier, a second test result is obtained, and the second device to be tested needs to send the second test result to the first device to be tested.
S209, the first device to be tested sends the first test result and/or the second test result to the test server and displays the first test result and/or the second test result on the test server.
Specifically, the first device to be tested judges whether the first device to be tested performs the test or the second device to be tested performs the test according to the type of the test item identifier, if some test item identifier types are the second type of test item identifier, the second device to be tested performs the test, the second test result is sent to the first device to be tested, the first device to be tested sends the first test result and/or the second test result to the test server, and the test server displays the first test result and/or the second test result.
If the test item comprises a plurality of items, as an optional implementation manner, after the test server sends the test instruction to the device to be tested, the device to be tested analyzes the test instruction to obtain a test item identifier, if the test item identifier comprises an identifier 1, an identifier 2 and an identifier 3, the device to be tested firstly executes the test corresponding to the identifier 1 to obtain a test result of the identifier 1, and then returns the test result of the identifier 1 to the test server; the device to be tested executes the test corresponding to the identifier 2 again to obtain the test result of the identifier 2, and then the test result of the identifier 2 is returned to the test server; the device to be tested executes the test corresponding to the identifier 3 again to obtain the identifier 3 test result, and then returns the identifier 3 test result to the test server; until all test items are tested.
As another optional implementation manner, the test to be tested executes the test corresponding to the identifier 1 to obtain the test result of the identifier 1, executes the test corresponding to the identifier 2 to obtain the test result of the identifier 2, executes the test corresponding to the identifier 3 to obtain the test result of the identifier 3, and after all the test items are executed, the first device to be tested sends all the test results to the test server together.
S210, the first device to be tested receives a test ending instruction sent by the test server.
Specifically, after the test is finished, the test server sends a test finishing instruction to the device to be tested, and the device to be tested receives the test finishing instruction through the communication protocol transport layer, that is, the first device to be tested receives the test instruction sent by the test server.
Fig. 3 is a flowchart of steps of another embodiment of the device testing method of the present invention, as shown in fig. 3, specifically including:
a1, installing an automatic test tool, namely preset automatic test software on a test server, wherein the test server establishes connection with a device to be tested through the automatic test tool and establishes connection with the device to be tested through a communication protocol transmission layer, namely a hicore layer service;
a2, the test server sends a test instruction to the device to be tested through the automatic test tool, wherein the test instruction comprises a test item identifier to be tested;
a3, after receiving the test item, the communication protocol transport layer, the Hicore layer of the device to be tested judges the test item identification, if the test item identification is the first type of test item identification, that is, the test item without interface operation, the Hicore layer executes the test of the test item;
a4, if the test item is received by the Hicore layer of the device to be tested, namely the communication protocol transport layer, judging the identification of the test item, if the identification of the test item is the identification of the test item of the second type, the identification of the test item of the second type is the test item needing to be operated on the interface, and because the Hicore layer can not process the test item of the second type, the Hicore layer transmits the test instruction to the Java layer, namely the user event processing layer, and after the Java layer executes the test item of the second type, the test result is returned to the Hicore layer;
and A5, the Hicore layer returns the test result of the Hicore layer and the test result of the Java layer to the automatic test tool of the test server.
And A6, displaying the automatic test result by the automatic test tool of the test server.
Fig. 4 is a flowchart of steps of another embodiment of a device testing method according to the present invention, as shown in fig. 4, fig. 4 is a method for testing a device on a test server, including:
b1, installing an automatic test tool on the test server, starting the automatic test tool, and inputting the test item identification of the device to be tested, namely the test device parameters, on the automatic test tool;
b2, logging in the sdkservice corresponding to the device to be tested on the test server through the automatic test tool, and then sending a request for starting the automatic test to the sdkservice on the device;
b3, connecting an automatic test tool on the test server to the server through the port number returned by the device to be tested, and sending test items to be tested, wherein the test item identification comprises screen test, parameter test, color test, voltage and current test, user event test and the like;
b4, the automatic test tool on the test server waits for the device to be tested to return the test result;
b5, if the next test item exists, the test server sends an automatic test instruction to the device to be tested again; and if no next test item exists, the test server sends a test ending instruction to the device to be tested.
Fig. 5 is a flowchart of steps of another embodiment of a device testing method of the present invention, and as shown in fig. 5, fig. 5 shows a device testing method for a device to be tested, which specifically includes:
c1, initializing a server by a Hicore layer on the device to be tested, and then establishing connection with the test server through a network cable and a wireless network;
c2, after receiving the connection request of the automated test of the test server, the device to be tested sdkservice will create a special server channel to receive the test command sent by the test server, and at the same time, return the port number bound when creating the server to the automated test tool of the test server;
c3, the device server to be tested processes and classifies the received test item identification, judges whether the test item is processed by a Hicore layer or a Java layer, calls a C-layer function interface processed by the Hicore layer, and sends a test command to the Java layer through a Hicore and Java layer interaction function processed by the Java layer.
In addition, the Hicore layer of the device to be tested judges the test item identification, if the test item identification is a standard test item, whether the test is finished is further judged, if the test is not finished, the test item is processed, and a test result is returned. If the test item identification is not a standard test item, the test is ended.
C4, after the test command request is monitored by the Java layer of the device to be tested, calling the corresponding function interface according to the test request, thereby realizing the function of each test item, after the processing is finished, transmitting the test result to the Hicore layer, and then returning the test result to the automatic test tool of the test server by the Hicore layer.
Fig. 6 is a flow chart of steps of another device testing method embodiment of the present invention, as shown in fig. 6,
on the basis of the embodiment, a baking machine command is input on the test server through a serial port, then the baking machine command is sent to the device to be tested (client side), the input baking machine command is judged, if the input baking machine command is a correct command, the baking machine command is sent to the device to be tested, and if the input baking machine command is an illegal command, the test is finished.
After the device to be tested is started, initializing the cmd server, judging the baking machine command after receiving the baking machine command, executing the baking machine command if the device to be tested can identify the baking machine command, returning a result, and returning a failure command if the device to be tested cannot identify the baking machine command. The embodiment of the invention saves the test labor and time cost, and simultaneously ensures the stability and reliability of the product through automatic repeated test.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
According to the device testing method provided by the embodiment of the invention, the device to be tested comprises a first device to be tested of a communication protocol transmission layer and a second device to be tested of a user event processing layer, the first device to be tested receives a testing instruction sent by a testing server, wherein the testing instruction comprises a testing item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
Another embodiment of the present invention provides an apparatus testing device, configured to execute the apparatus testing method provided in the foregoing embodiment.
Referring to fig. 7, a block diagram of a device testing apparatus according to an embodiment of the present invention is shown, where the apparatus may be applied to devices to be tested, where the devices to be tested include a first device to be tested of a communication protocol transport layer and a second device to be tested of a user event handling layer, the first device to be tested includes a sending module 701, a determining module 702, a first executing module 703 and a returning module 705, and the second device to be tested includes a second executing module 704, where:
the sending module 701 is configured to receive a test instruction sent by a test server, where the test instruction includes a test item identifier;
a judging module 702, configured to judge the test item identifier;
the first execution module 703 and/or the second execution module 704, configured to execute, according to the determination result, a test operation corresponding to the test item identifier to obtain a test result;
and a returning module 705, configured to send the test result to the test server.
According to the device testing device provided by the embodiment of the invention, the device to be tested comprises a first device to be tested of a communication protocol transmission layer and a second device to be tested of a user event processing layer, the first device to be tested receives a testing instruction sent by a testing server, wherein the testing instruction comprises a testing item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
The present invention further provides a supplementary description of the device testing apparatus provided in the above embodiment.
Optionally, the first executing module is configured to execute a test corresponding to the first type test item identifier if the test item identifier is the first type test item identifier, so as to obtain a first test result;
and if the test item identification is the second type of test item identification, sending the test instruction to the second to-be-tested equipment so that the second to-be-tested equipment executes the test corresponding to the second type of test item identification to obtain a second test result.
Optionally, a return module for:
receiving a second test result returned by the second device to be tested;
and sending the first test result and/or the second test result to a test server, and displaying the first test result and/or the second test result on the test server.
Optionally, the apparatus further comprises a connection module, the connection module is configured to:
receiving a test connection request sent by a test server through preset automatic test software;
determining a port number according to the test connection request, and sending the port number to a test server, wherein the port number is a preset fixed port number or a randomly generated port number;
and establishing connection with the test server according to the port number.
Optionally, the first device to be tested further includes an end module, where the end module is configured to receive a test end instruction sent by the test server.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
According to the device testing device provided by the embodiment of the invention, the device to be tested comprises a first device to be tested of a communication protocol transmission layer and a second device to be tested of a user event processing layer, the first device to be tested receives a testing instruction sent by a testing server, wherein the testing instruction comprises a testing item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
Still another embodiment of the present invention provides a terminal device, configured to execute the device testing method provided in the foregoing embodiment.
Fig. 8 is a schematic structural diagram of a terminal device of the present invention, and as shown in fig. 8, the terminal device includes: at least one processor 801 and memory 802;
the memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the device testing method provided by the above-described embodiments.
In the terminal device provided in this embodiment, the to-be-tested device includes a first to-be-tested device in a communication protocol transport layer and a second to-be-tested device in a user event processing layer, where the first to-be-tested device receives a test instruction sent by the test server, where the test instruction includes a test item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the apparatus testing method provided in any one of the above embodiments is implemented.
According to the computer-readable storage medium of the embodiment, through a device to be tested including a first device to be tested of a communication protocol transport layer and a second device to be tested of a user event processing layer, the first device to be tested receives a test instruction sent by a test server, wherein the test instruction includes a test item identifier; the first device to be tested judges the identification of the test item; according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result; the first device to be tested sends the test result to the test server, and by the embodiment of the invention, a plurality of devices to be tested can be tested at the same time, so that automatic test is realized, manual participation is not required, labor cost and time cost are saved, and test efficiency is improved.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, electronic devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing electronic device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing electronic device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing electronic devices to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing electronic device to cause a series of operational steps to be performed on the computer or other programmable electronic device to produce a computer implemented process such that the instructions which execute on the computer or other programmable electronic device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or electronic device that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or electronic device. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or electronic device that comprises the element.
The above detailed description is provided for a device testing method and a device testing apparatus, and the principle and the implementation of the present invention are explained in detail by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A device testing method is applied to devices to be tested, wherein the devices to be tested comprise a first device to be tested of a communication protocol transport layer and a second device to be tested of a user event processing layer, the first device to be tested and the second device to be tested are respectively used for testing different test item identifications, and the method comprises the following steps:
the first device to be tested receives a test instruction sent by a test server, wherein the test instruction comprises a test item identifier;
the first device to be tested judges the test item identification;
according to the judgment result, the first device to be tested and/or the second device to be tested respectively execute the test operation corresponding to the test item identification to obtain a test result;
and the first equipment to be tested sends the test result to the test server.
2. The method according to claim 1, wherein the obtaining, according to the determination result, the test result by the first device to be tested and/or the second device to be tested performing the test operation corresponding to the test item identifier includes:
if the test item identification is of a first type, the first device to be tested executes a test corresponding to the first type test item identification to obtain a first test result;
and if the test item identification is the second type of test item identification, the first device to be tested sends the test instruction to the second device to be tested, so that the second device to be tested executes the test corresponding to the second type of test item identification to obtain a second test result.
3. The method of claim 2, wherein the second type test item identifier is a user interactive test item, and the second device under test performs a test corresponding to the second type test item identifier to obtain a second test result, including:
the second device to be tested executes the user interaction test corresponding to the second type test item identification through the object-oriented test case to obtain a second test result;
or
The second device to be tested executes the user interaction test corresponding to the second type test item identification through the test case of the C language to obtain a second test result;
or
And the second device to be tested executes the user interaction test corresponding to the second type test item identification through the test case of C + + to obtain a second test result.
4. The method according to claim 2, wherein the first device under test sends the test result to the test server, comprising:
the first device to be tested receives a second test result returned by the second device to be tested;
and the first equipment to be tested sends the first test result and/or the second test result to the test server and displays the first test result and/or the second test result on the test server.
5. The method according to claim 1, wherein a preset automatic test software is installed on the test server, and before the first device to be tested receives a test L test instruction sent by the test server, the method further comprises:
the first device to be tested receives a test connection request sent by the test server through the preset automatic test software;
the first device to be tested determines a port number according to the test connection request, and sends the port number to the test server, wherein the port number is a preset fixed port number or a randomly generated port number;
and the first equipment to be tested establishes connection with the test server according to the port number.
6. The method of claim 1, further comprising:
and the first device to be tested receives the test ending instruction sent by the test server.
7. The device testing apparatus is applied to devices to be tested, the devices to be tested include a first device to be tested of a communication protocol transport layer and a second device to be tested of a user event processing layer, the first device to be tested and the second device to be tested are respectively used for executing tests of different test item identifiers, the first device to be tested includes a sending module, a judging module, a first executing module and a returning module, the second device to be tested includes a second executing module, and the apparatus includes:
the sending module is used for receiving a test instruction sent by the test server, wherein the test instruction comprises a test item identifier;
the judging module is used for judging the test item identification;
the first execution module and/or the second execution module are/is used for executing the test operation corresponding to the test item identification according to the judgment result to obtain a test result;
and the return module is used for sending the test result to the test server.
8. The apparatus of claim 7, wherein the first executing module is configured to, if the test item identifier is a first type of test item identifier, execute a test corresponding to the first type of test item identifier to obtain a first test result;
and if the test item identification is the second type of test item identification, sending the test instruction to the second to-be-tested equipment so as to enable the second to-be-tested equipment to execute the test corresponding to the second type of test item identification to obtain a second test result.
9. A terminal device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the memory-stored computer program to implement the device testing method of any of claims 1-6.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when executed, implements the device testing method of any one of claims 1-6.
CN202110960181.2A 2021-08-20 2021-08-20 Equipment testing method and device, terminal equipment and storage medium Pending CN113794602A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110960181.2A CN113794602A (en) 2021-08-20 2021-08-20 Equipment testing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110960181.2A CN113794602A (en) 2021-08-20 2021-08-20 Equipment testing method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113794602A true CN113794602A (en) 2021-12-14

Family

ID=79181942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110960181.2A Pending CN113794602A (en) 2021-08-20 2021-08-20 Equipment testing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113794602A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115967797A (en) * 2022-11-30 2023-04-14 海南视联通信技术有限公司 Product testing method and device, electronic equipment and storage medium
CN116708632A (en) * 2022-09-22 2023-09-05 荣耀终端有限公司 Test method and electronic equipment

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040032249A1 (en) * 2001-09-14 2004-02-19 Kimio Kuno Electric component test system and electric component test method
US20130030753A1 (en) * 2011-07-29 2013-01-31 Hon Hai Precision Industry Co., Ltd. Testing system and method using same
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN105320604A (en) * 2015-12-07 2016-02-10 上海斐讯数据通信技术有限公司 Automated testing system and method
KR20160021419A (en) * 2014-08-14 2016-02-25 엔에이치엔엔터테인먼트 주식회사 Mobile terminal test system and mobile terminal test method using the system
CN105446849A (en) * 2015-11-06 2016-03-30 北京中星微电子有限公司 Product testing method and device
CN107465572A (en) * 2017-08-02 2017-12-12 华数传媒网络有限公司 Intelligent terminal method of testing, apparatus and system
WO2018040604A1 (en) * 2016-09-01 2018-03-08 深圳市中兴微电子技术有限公司 Mobile terminal testing method, apparatus, system, device, and storage medium
CN108153633A (en) * 2017-12-26 2018-06-12 深圳豪客互联网有限公司 A kind of apparatus testing method and device
CN110221983A (en) * 2019-06-19 2019-09-10 深圳市腾讯网域计算机网络有限公司 Test method, device, computer readable storage medium and computer equipment
CN110399743A (en) * 2019-07-31 2019-11-01 深圳市凯木金科技有限公司 Testing for electrical equipment method, apparatus and computer readable storage medium
CN111444097A (en) * 2020-03-25 2020-07-24 北京奇艺世纪科技有限公司 Test method and test system
CN111475417A (en) * 2020-04-13 2020-07-31 广东美的暖通设备有限公司 Automatic testing method, device, equipment and storage medium
CN111679652A (en) * 2020-06-11 2020-09-18 深圳创维-Rgb电子有限公司 Test method and device based on smart screen, smart screen and readable storage medium
CN111737136A (en) * 2020-06-24 2020-10-02 海尔优家智能科技(北京)有限公司 Object testing method and device based on Internet of things platform
CN112035309A (en) * 2020-09-07 2020-12-04 深圳市亿道信息股份有限公司 Automatic testing method, server and automatic testing system for intelligent terminal function
CN112769645A (en) * 2020-12-29 2021-05-07 视联动力信息技术股份有限公司 Terminal testing method and device, terminal equipment and storage medium
CN113127338A (en) * 2021-03-22 2021-07-16 四川锐明智通科技有限公司 Firmware testing method, server and computer readable storage medium
CN113238944A (en) * 2021-05-17 2021-08-10 北京沃东天骏信息技术有限公司 Test method, device and system

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040032249A1 (en) * 2001-09-14 2004-02-19 Kimio Kuno Electric component test system and electric component test method
US20130030753A1 (en) * 2011-07-29 2013-01-31 Hon Hai Precision Industry Co., Ltd. Testing system and method using same
KR20160021419A (en) * 2014-08-14 2016-02-25 엔에이치엔엔터테인먼트 주식회사 Mobile terminal test system and mobile terminal test method using the system
CN105446849A (en) * 2015-11-06 2016-03-30 北京中星微电子有限公司 Product testing method and device
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN105320604A (en) * 2015-12-07 2016-02-10 上海斐讯数据通信技术有限公司 Automated testing system and method
WO2018040604A1 (en) * 2016-09-01 2018-03-08 深圳市中兴微电子技术有限公司 Mobile terminal testing method, apparatus, system, device, and storage medium
CN107465572A (en) * 2017-08-02 2017-12-12 华数传媒网络有限公司 Intelligent terminal method of testing, apparatus and system
CN108153633A (en) * 2017-12-26 2018-06-12 深圳豪客互联网有限公司 A kind of apparatus testing method and device
CN110221983A (en) * 2019-06-19 2019-09-10 深圳市腾讯网域计算机网络有限公司 Test method, device, computer readable storage medium and computer equipment
CN110399743A (en) * 2019-07-31 2019-11-01 深圳市凯木金科技有限公司 Testing for electrical equipment method, apparatus and computer readable storage medium
CN111444097A (en) * 2020-03-25 2020-07-24 北京奇艺世纪科技有限公司 Test method and test system
CN111475417A (en) * 2020-04-13 2020-07-31 广东美的暖通设备有限公司 Automatic testing method, device, equipment and storage medium
CN111679652A (en) * 2020-06-11 2020-09-18 深圳创维-Rgb电子有限公司 Test method and device based on smart screen, smart screen and readable storage medium
CN111737136A (en) * 2020-06-24 2020-10-02 海尔优家智能科技(北京)有限公司 Object testing method and device based on Internet of things platform
CN112035309A (en) * 2020-09-07 2020-12-04 深圳市亿道信息股份有限公司 Automatic testing method, server and automatic testing system for intelligent terminal function
CN112769645A (en) * 2020-12-29 2021-05-07 视联动力信息技术股份有限公司 Terminal testing method and device, terminal equipment and storage medium
CN113127338A (en) * 2021-03-22 2021-07-16 四川锐明智通科技有限公司 Firmware testing method, server and computer readable storage medium
CN113238944A (en) * 2021-05-17 2021-08-10 北京沃东天骏信息技术有限公司 Test method, device and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
EDWARD T.-H. CHU等: "Automated GUI Testing for Android News Applications", 2018 INTERNATIONAL SYMPOSIUM ON COMPUTER, CONSUMER AND CONTROL (IS3C) *
宋海桥;: "测控系统整机自动化测试平台的设计", 测试技术学报, no. 03 *
狄德海;: "手机GCF一致性测试", 国外电子测量技术, no. 12 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708632A (en) * 2022-09-22 2023-09-05 荣耀终端有限公司 Test method and electronic equipment
CN116708632B (en) * 2022-09-22 2024-04-05 荣耀终端有限公司 Test method and electronic equipment
CN115967797A (en) * 2022-11-30 2023-04-14 海南视联通信技术有限公司 Product testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109376088B (en) Automatic test system and automatic test method
CN113794602A (en) Equipment testing method and device, terminal equipment and storage medium
CN104461897A (en) Application program test method and device
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN110287122B (en) Automatic test method, device, terminal and storage medium
CN104598380A (en) Method and system for automatic testing based on control
CN105786667A (en) Distributed automated testing method and system
CN103634592A (en) Automatic test method and system for intelligent televisions
CN103973858B (en) The Auto-Test System of mobile terminal
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN109324975B (en) Continuous integration method based on mobile cloud measurement platform
CN105302722A (en) CTS automatic test method and apparatus
CN112241311A (en) Firmware simulation method and device, electronic equipment and readable storage medium
CN109032705B (en) Application program execution method and device, electronic equipment and readable storage medium
CN110297749B (en) Method and terminal for testing new function
CN111212155A (en) Log debugging method, television and storage medium
CN110389886B (en) Additional function testing method and device of main application program and storage medium
CN115543824A (en) Software testing device, system and method
CN106997291A (en) A kind of control method and master node, slave node
CN114880018A (en) Request processing method and device, storage medium and electronic equipment
CN115914055A (en) Distributed network testing method, device, medium and equipment
CN114443473A (en) Automated testing framework, method, system and computer readable storage medium
CN112015645A (en) Function test method and device of web system and electronic equipment
CN112615745B (en) Method and system for accessing Internet of things card platform to upstream through parameter configuration

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