CN110954214A - Equipment testing method, device and system - Google Patents

Equipment testing method, device and system Download PDF

Info

Publication number
CN110954214A
CN110954214A CN201811129889.8A CN201811129889A CN110954214A CN 110954214 A CN110954214 A CN 110954214A CN 201811129889 A CN201811129889 A CN 201811129889A CN 110954214 A CN110954214 A CN 110954214A
Authority
CN
China
Prior art keywords
equipment
optical signal
detection
control
change
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
CN201811129889.8A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811129889.8A priority Critical patent/CN110954214A/en
Publication of CN110954214A publication Critical patent/CN110954214A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter
    • G01J1/42Photometry, e.g. photographic exposure meter using electric radiation detectors
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/46Measurement of colour; Colour measuring devices, e.g. colorimeters

Abstract

The invention discloses a device testing method, device and system, and relates to the technical field of computers. One embodiment of the method comprises: simulating the control action of equipment to be tested at an equipment control end so as to change the optical signal state of the equipment to be tested; detecting a change in the state of the optical signal by a light source sensing device; and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end. This embodiment can carry out automated test through the light source, need not to deploy monitored control system and carry out image recognition and can realize conveniently the test to equipment, saves time and human cost, and the real-time is good to can detect optical signal's colour value, improve the accuracy of test.

Description

Equipment testing method, device and system
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device and a system for testing equipment.
Background
At present, the IOT (Internet of things) industry develops rapidly, but the access of massive intelligent equipment brings great workload for testers, especially tests the stability of certain equipment, for example, tests whether the control of one type of lamp or intelligent equipment with an indicator lamp is stable, the existing scheme is realized by using video monitoring, a camera monitoring system needs to be deployed, and the equipment is tested by utilizing technologies such as image recognition, analysis and the like.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the existing scheme is complex to realize, needs to consume a lot of time and manpower, is high in cost and is poor in real-time performance.
Disclosure of Invention
In view of this, embodiments of the present invention provide an apparatus testing method, apparatus, and system, which can perform an automatic test through a light source, and can conveniently implement a test on an apparatus without deploying a monitoring system and performing image recognition, thereby saving time and labor cost, achieving good real-time performance, and being capable of detecting a color value of an optical signal, and improving accuracy of the test.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a device testing method.
A device testing method, comprising: simulating the control action of equipment to be tested at an equipment control end so as to change the optical signal state of the equipment to be tested; detecting a change in the state of the optical signal by a light source sensing device; and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end.
Optionally, the step of simulating a control action of the device to be tested at the device control end includes: and sending an instruction simulating a click event to the equipment control end, wherein the click event is used for triggering a control button of the equipment control end so as to send a control command corresponding to the control button to the equipment to be tested at the equipment control end.
Optionally, the step of detecting the change of the state of the optical signal by a light source sensing device includes: sending a detection instruction to a detection end, wherein the detection instruction is used for indicating the detection end to detect the change of the optical signal state by using light source sensing equipment; and storing the change information of the optical signal state detected by the detection end.
Optionally, the change information of the optical signal state includes luminance change information and color change information, and the step of detecting, by the detecting end, the change of the optical signal state by using the light source sensing device includes: the light source sensing equipment at the detection end collects the brightness change value and the color value of the optical signal within a preset time period; when the effective brightness of the optical signal changes, determining the brightness change information according to a state value corresponding to the latest effective brightness change of the stored optical signal, wherein the effective brightness of the optical signal is determined according to the collected brightness change value; and determining the color change information according to the color value of the optical signal.
Optionally, the step of detecting the change of the state of the optical signal by the light source sensing device is preceded by: the detection method comprises the steps that Socket (Socket) long connection is established between a WiFi (wireless fidelity) hotspot generated by the detection end and the detection end, the WiFi hotspot is generated when the detection end is close to a light source of the equipment to be detected, and the light source is used for generating the optical signal.
According to another aspect of the embodiments of the present invention, there is provided a device testing apparatus.
A device testing apparatus comprising: the device comprises an action simulation module, a control module and a control module, wherein the action simulation module is used for simulating the control action of the device to be tested at a device control end so as to change the optical signal state of the device to be tested; the device detection module is used for detecting the change of the state of the optical signal through the light source sensing device; and the equipment testing module is used for generating a testing result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control terminal.
Optionally, the motion simulation module is further configured to: and sending an instruction simulating a click event to the equipment control end, wherein the click event is used for triggering a control button of the equipment control end so as to send a control command corresponding to the control button to the equipment to be tested at the equipment control end.
Optionally, the device detection module is further configured to: sending a detection instruction to a detection end, wherein the detection instruction is used for indicating the detection end to detect the change of the optical signal state by using light source sensing equipment; and storing the change information of the optical signal state detected by the detection end.
Optionally, the change information of the optical signal state includes luminance change information and color change information, and the detecting end detects the change of the optical signal state by: the light source sensing equipment at the detection end collects the brightness change value and the color value of the optical signal within a preset time period; when the effective brightness of the optical signal changes, determining the brightness change information according to a state value corresponding to the latest effective brightness change of the stored optical signal, wherein the effective brightness of the optical signal is determined according to the collected brightness change value; and determining the color change information according to the color value of the optical signal.
Optionally, the apparatus further comprises a connection module, configured to: the Socket long connection is established between the WiFi hot spot generated by the detection end and the detection end, the WiFi hot spot is generated when the detection end is close to a light source of the equipment to be detected, and the light source is used for generating the optical signal.
According to yet another aspect of an embodiment of the present invention, there is provided a device testing system.
A device testing system, comprising: equipment control end, test execution end, detection end, wherein: the equipment control end is used for simulating the control action of the equipment to be tested according to the instruction of the test execution end so as to change the optical signal state of the equipment to be tested; the detection end is used for detecting the change of the optical signal state by using light source sensing equipment according to a detection instruction sent by the test execution end; and the test execution end is used for generating a test result of the equipment to be tested according to the change information of the optical signal state returned by the detection end and a control result log of the equipment to be tested, which is obtained from the equipment control end.
According to yet another aspect of an embodiment of the present invention, an electronic device is provided.
An electronic device, comprising: one or more processors; a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the device testing method provided by the present invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the device testing method provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: simulating the control action of the equipment to be tested at the equipment control end so as to change the optical signal state of the equipment to be tested; detecting a change in the state of the optical signal by a light source sensing device; and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end. Can carry out automated test through the light source, need not to deploy monitored control system and carry out image recognition and can realize conveniently saving time and human cost to the test of equipment, the real-time is good to can detect optical signal's colour value, improve the accuracy of test.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a device testing method according to an embodiment of the present invention;
FIG. 2 is an exemplary diagram of a test report according to an embodiment of the present invention;
FIG. 3 is a schematic flow diagram of a preferred process for testing a device according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main modules of a device testing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a device testing system framework according to an embodiment of the invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a device testing method according to an embodiment of the present invention.
As shown in fig. 1, the device testing method according to the embodiment of the present invention mainly includes the following steps S101 to S103.
The device testing method of the embodiment of the invention can be executed by a testing execution end, the testing execution end can be a device such as a PC (personal computer) and the like which can be simultaneously connected with a wireless network and a detection end, a testing program is installed on the testing execution end, and the testing execution end runs the testing program to execute the device testing method of the embodiment of the invention.
Step S101: and simulating the control action of the equipment to be tested at the equipment control end so as to change the optical signal state of the equipment to be tested.
The equipment to be tested can be intelligent equipment with an indicator light, and the optical signal is an optical signal sent by the indicator light. The device to be tested can also be light source equipment such as a lamp, and the optical signal is the optical signal sent by the light source equipment.
The step of simulating a control action of the device to be tested at the device control end may specifically include: and the test execution end sends an instruction simulating a click event to the equipment control end, and the click event is used for triggering a control button of the equipment control end so as to send a control command corresponding to the control button to the equipment to be tested at the equipment control end.
The device control end is mainly a client App (application program) installed on a mobile device (such as a mobile phone). The App is provided with a control page corresponding to the equipment to be tested, and the control page is provided with a control button capable of controlling the equipment to be tested. The client may be implemented on a fixed device such as a PC (in the case where a client application that can be run on the fixed device is developed in advance). The client App needs to interact with the server when performing device control, and therefore, the device control side also includes a server connected with the client App, such as a cloud server. When the test execution end sends an instruction simulating a click event to the equipment control end, a control button on an App control page of the equipment control end is triggered, the App sends a control command of the intelligent equipment to the server end, and the App records whether the control command is successfully issued and a control result log returned by the server end.
Step S102: the change in the state of the optical signal is detected by the light source sensing device.
Before step S102, the test execution end may establish Socket long connection with the detection end through a WiFi hotspot (i.e., a WiFi signal) generated by the detection end, where the WiFi hotspot is generated when the detection end approaches a light source of the device to be tested, and the light source is used to generate an optical signal.
Step S102, specifically, the test execution end may send a detection instruction to the detection end, where the detection instruction is used to instruct the detection end to detect a change in the optical signal state by using the light source sensing device; and storing the change information of the optical signal state detected by the detection end.
The change information of the state of the optical signal specifically includes luminance change information and color change information.
The detection end detects the change of the state of the optical signal by using the light source sensing equipment in the following way:
the method comprises the steps that light source sensing equipment at a detection end collects a brightness change value and a color value of an optical signal in a preset time period, specifically, the light source sensing equipment can collect the brightness value of the optical signal at regular time to obtain the brightness change value of the optical signal in the preset time period (namely the difference between the brightness values of the starting point and the ending point of the preset time period), and can collect the average value of RGB (red, green and blue) values of the optical signal in the preset time period as the color value of the optical signal;
when the effective brightness of the optical signal changes, the brightness change information is determined according to the state value corresponding to the latest effective brightness change of the stored optical signal. The method comprises the steps that effective brightness change of an optical signal is determined according to a collected brightness change value, specifically, the brightness change value can be compared with a threshold value, if the brightness change value is larger than the threshold value, the effective brightness change of the optical signal is indicated, and otherwise, the effective brightness change is invalid; and determining color change information according to the color value of the optical signal, specifically, determining a color corresponding to the color value through a preset color interval, thereby determining the color change information, for example, if the color value corresponds to red, the color change information is an RGB value of the red, and indicates that the color of the optical signal changes to red.
Each time the effective brightness change of the light signal occurs, a corresponding state value is saved, such as 0 or 1, where 0 indicates that the light is off and 1 indicates that the light is on. When the effective brightness of the optical signal changes, determining brightness change information according to a state value corresponding to the latest effective brightness change of the stored optical signal, specifically, for the current effective brightness change of the optical signal, negating the state value corresponding to the latest effective brightness change of the stored optical signal to obtain a state value corresponding to the current effective brightness change of the optical signal, and determining the state value as the brightness change information. For example, if the state value corresponding to the last effective brightness change of the stored optical signal is 0, the state value corresponding to the current effective brightness change of the optical signal is the inverse of 0, that is, 1, and it can be determined that the current brightness change information of the optical signal is 1, which indicates that the lamp is on.
The above process may be executed multiple times, that is, after the change information of the optical signal state detected by the detection end is saved, the process may return to step S101, the control action of simulating the device to be tested at the device control end is executed again, the optical signal state change is detected again by the light source sensing device (step S102), and when the predetermined detection times or detection time is reached, step S103 is executed to generate the test result according to the results of the multiple times of execution.
Step S103: and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end.
Specifically, the test execution end performs data analysis according to the change information of the optical signal state obtained by detection of the detection end and a control result log of the device to be tested obtained from the device control end, and generates a test report to show test result data, for example, an App of the device control end sends a control command of the device to be tested to the server end, the App records whether the control command is successfully issued and the control result log returned by the server end, for example, control failure, and meanwhile, the test execution end receives the change information of the optical signal state sent by the detection end, and assumes that the change information of the optical signal state is not received after a certain time, detection failure is indicated, and information of this control failure and optical signal detection failure is obtained by combining the control result log. Fig. 2 is a schematic diagram illustrating an exemplary test report according to an embodiment of the present invention, and the content in fig. 2 is only an illustrative example and is not to be construed as limiting the scope of the present invention.
FIG. 3 is a schematic flow chart of a preferred device test according to an embodiment of the present invention.
A preferred flow of device testing according to an embodiment of the present invention is described below and can be seen in fig. 3. The intelligent hardware is the equipment to be tested, contains wiFi module and signal lamp (or indicating lamp), has the networking function after the configuration to can use the equipment that App carried out control, intelligent hardware also can be intelligent light source equipment such as lamp. The PC is a test execution end, which is a machine (generally, a computer) having a wireless network connection capability and installed with a test program, on which the test program can run, and the test program is a program for automatically issuing a control command to the intelligent hardware and having a control result analysis capability. The detection board is a detection end and is an integrated circuit board with an MCU (micro control unit) main control module, a WiFi (wireless fidelity) communication module and an APDS9960 ambient light detection module, wherein the MCU and the WIFI adopt UART (universal asynchronous receiver transmitter) to carry out asynchronous communication, the MCU and the APDS9960 adopt IIC (integrated circuit bus) communication, and the APDS9960 has a proximity detection function and has sensing (sensing and detection) functions of light sensing, color sensing and the like. App is an application program that can control smart hardware. The service end is a server connected with the App and the intelligent hardware, the App controls the intelligent hardware to be issued to the intelligent hardware end through the service end, and the service end can also return a control result to the App end. In other embodiments, the modules or components with the same functions may be used to replace the above mentioned modules or components, for example, other light source sensing devices may be used to replace APDS 9960.
The detection board is close to the signal lamp position of the intelligent hardware, the APDS9960 environment light detection module is started, and when the APDS9960 environment light detection module is started, the detection board can send a WiFi hotspot (WiFi signal) with a designated name.
The method comprises the steps that a PC is connected to a WiFi hotspot sent by a detection board, Android equipment with an App is connected to the PC, a control page of intelligent hardware to be tested in the App is opened, a test program is operated, the test program and the detection board (the detection board establishes a link through serversocket classes) establish Socket link and retrieve control buttons on the control page in the App.
The test program simulates a click event using an ADB (Android Debug Bridge) command to trigger a control button in an App control page and simultaneously sends an instruction to the detection board to inform the detection board to start detecting a signal lamp of the intelligent hardware. It should be noted that the App in the embodiment of the present invention is not limited to an App of an android system, and may also be another operating system, and if the App is another operating system, the test program interacts with the App using a corresponding command of another operating system.
When a simulated click event (namely a control button click event) triggers a control button in an App control page, the App sends a control command of intelligent hardware to the server, and the App records whether the control command is successfully issued and a control result log (namely control result information) returned by the server.
When the control command reaches the intelligent hardware and successfully controls the intelligent hardware, the intelligent hardware can change the state of a signal lamp of the intelligent hardware; after the signal lamp of the intelligent hardware is changed, the detection board can detect the change of the state of the optical signal, wherein, according to the brightness value and the color value of the detected optical signal, the brightness change information (such as 1, indicating that the lamp is on, or 0, indicating that the lamp is off) and the color change information (such as red RGB value, blue change, etc.) of the optical signal are obtained through the MCU respectively. The process of obtaining the change information of the optical signal state is described in detail above, and is not described herein again.
The detection logic for the brightness change information is specifically as follows: it is assumed that the intelligent hardware is in a light-out state before detection. Before the initial detection, initialization is first performed to obtain a brightness value of the smart hardware in the light-out state under the current environment (since the environment brightness value is usually not 0, the brightness value of the traffic light may also be detected in the light-out state), for example, LAST _ X is 100, and the corresponding state value is 0 (this time corresponds to time T0). A threshold (denoted DX) is set for determining whether the change in brightness of the light signal is an effective change in brightness. The threshold may be set empirically, for example, according to the calibration test result, and assuming that the difference between the brightness values of the on-state and the off-state is 250, it is usually necessary to eliminate some differences caused by the environment, and the threshold DX is set to 200.
At the time of T1, the signal lamp is in a light-out state, and the detected brightness value is 110; at the time T2 after the time T1, after the signal lamp state of the intelligent hardware is controlled by the control button to change, the brightness value is detected to be 580, the brightness change value of the optical signal in the time period T1-T2 is 580-, the state value corresponding to the effective luminance change at the time T3 is obtained to be 0, so that the luminance change information of the optical signal at the times T2 and T3 is 1 and 0, respectively, indicating that the lamp is on and off at the two times. The detection board sends the brightness change information 1 and 0 at the two moments to the test program on the PC. At the time T0 to T1, the luminance change value of the optical signal is 110-.
The detection logic for the color change information is specifically as follows: the average value of the RGB values of the optical signals in the preset time period is collected and used as the color value of the optical signals, so that the color change information is determined according to the color value, for example, the color value of the optical signals is red, the RGB value of which the color change information is red is obtained, and the optical signals are indicated to turn red.
When the test program on the PC receives the change information of the optical signal state sent by the detection board, the test program records the relevant event log according to the change information of the optical signal state and executes the detection of the optical signal state change again, and when the detection is finished, the test program generates a specific analysis report according to the recorded event log and the control result log obtained from the App for displaying the test result. The test program acquires a control result log of the App end by using an ADB command.
If the change information of the optical signal state sent by the detection board is not received within the set overtime time, corresponding processing is carried out according to a set overtime processing mechanism, for example, detection failure is judged.
In addition, when the test program issues a signal lamp detection instruction to the detection board, if the detection board does not detect the change of the optical signal within a specific time, the control is considered to be failed, at the moment, the detection board issues a control failure result to the test program, and the test program records a related event log and executes the test flow again; when the test program issues the simulation click event to the App, the App sends a control command of the intelligent hardware to the server, and when the control command fails to be sent or the server returns a control failure result due to poor network, the App stores an error log into a file system.
According to the equipment testing process provided by the embodiment of the invention, as long as the equipment is provided with the indicator lamp or the equipment is light source equipment, automatic testing can be carried out through the process, the process is simple and convenient, the brightness of the optical signal can be detected, and the color of the optical signal can also be detected, so that the equipment can be detected from multiple aspects, and the accuracy of detection is improved.
Fig. 4 is a schematic diagram of main blocks of a device testing apparatus according to an embodiment of the present invention.
As shown in fig. 4, the device testing apparatus 400 according to the embodiment of the present invention mainly includes: action simulation module 401, device detection module 402, device test module 403.
The action simulation module 401 is configured to simulate, at the device control end, a control action of the device to be tested, so that the optical signal state of the device to be tested changes.
The motion simulation module 401 may be specifically configured to: and sending an instruction simulating a click event to the equipment control end, wherein the click event is used for triggering a control button of the equipment control end so as to send a control command corresponding to the control button to the equipment to be tested at the equipment control end.
The device testing apparatus 400 may further include a connection module for: the Socket long connection is established with the detection end through the WiFi hot spot generated by the detection end, the WiFi hot spot is generated when the detection end is close to a light source of the equipment to be detected, and the light source is used for generating an optical signal.
A device detection module 402, configured to detect a change in a state of an optical signal by the light source sensing device.
The device detection module 402 may be specifically configured to: sending a detection instruction to the detection end, wherein the detection instruction is used for indicating the detection end to detect the change of the optical signal state by using the light source sensing equipment; and storing the change information of the optical signal state detected by the detection end.
The change information of the state of the light signal may include luminance change information and color change information.
The detection end can detect the change of the optical signal state in the following ways:
a light source sensing device at a detection end collects a brightness change value and a color value of an optical signal in a preset time period; when the effective brightness of the optical signal changes, determining brightness change information according to a state value corresponding to the latest effective brightness change of the stored optical signal, wherein the effective brightness change of the optical signal is determined according to the collected brightness change value; and determining color change information from the color values of the optical signal.
The device testing module 403 is configured to generate a testing result of the device to be tested according to the change information of the optical signal state obtained through the detection and a control result log of the device to be tested, which is obtained from the device control end.
The device testing apparatus 400 may further include a log generating module for generating a log of related events according to the optical signal state change information record.
The present invention also provides an apparatus testing system, comprising: equipment control end, test execution end, detection end, wherein: the equipment control end is used for simulating the control action of the equipment to be tested according to the instruction of the test execution end so as to change the optical signal state of the equipment to be tested; the detection end is used for detecting the change of the state of the optical signal by using the light source sensing equipment according to the detection instruction sent by the test execution end; and the test execution end is used for generating a test result of the equipment to be tested according to the change information of the optical signal state returned by the detection end and a control result log of the equipment to be tested, which is obtained from the equipment control end.
Fig. 5 shows a schematic diagram of a device testing system framework according to an embodiment of the present invention, where an APP (application) and a cloud server are equivalent to a device control end. The PC Client (automatic detection PC terminal) is equivalent to a test execution terminal, and the test execution terminal can run a test program installed thereon to realize the functions of the modules of the device testing apparatus 400, wherein the simulation control module is equivalent to the action simulation module 401, and the socket module is equivalent to the connection module in the device testing apparatus 400. The detection board is equivalent to a detection end, the sensor in the detection board is used for detecting and obtaining light signal change information of the lamp, and the socket is used for establishing long connection with the PC. The device (lamp) is a device under test.
In addition, the detailed implementation of the device testing apparatus and the device testing system in the embodiment of the present invention has been described in detail in the above device testing method, and therefore, the repeated description is not repeated here.
Fig. 6 illustrates an exemplary system architecture 600 to which the device testing method or device testing apparatus of embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the device testing method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the device testing apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use in implementing a terminal device or server of an embodiment of the present application. The terminal device or the server shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a motion simulation module, a device detection module and a device test module. The names of the modules do not limit the modules themselves in some cases, for example, the motion simulation module may also be described as a "module for simulating a control motion of a device to be tested at a device control end so as to change the optical signal state of the device to be tested".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: simulating the control action of equipment to be tested at an equipment control end so as to change the optical signal state of the equipment to be tested; detecting a change in the state of the optical signal by a light source sensing device; and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end.
According to the technical scheme of the embodiment of the invention, the control action of the equipment to be tested is simulated at the equipment control end so as to change the optical signal state of the equipment to be tested; detecting a change in the state of the optical signal by a light source sensing device; and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end. Can carry out automated test through the light source, need not to deploy monitored control system and carry out image recognition and can realize conveniently saving time and human cost to the test of equipment, the real-time is good to can detect optical signal's colour value, improve the accuracy of test.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A method for testing a device, comprising:
simulating the control action of equipment to be tested at an equipment control end so as to change the optical signal state of the equipment to be tested;
detecting a change in the state of the optical signal by a light source sensing device;
and generating a test result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control end.
2. The method of claim 1, wherein the step of simulating the control action of the device under test at the device control end comprises:
and sending an instruction simulating a click event to the equipment control end, wherein the click event is used for triggering a control button of the equipment control end so as to send a control command corresponding to the control button to the equipment to be tested at the equipment control end.
3. The method of claim 1, wherein the step of detecting the change in the state of the optical signal by a light source sensing device comprises:
sending a detection instruction to a detection end, wherein the detection instruction is used for indicating the detection end to detect the change of the optical signal state by using light source sensing equipment;
and storing the change information of the optical signal state detected by the detection end.
4. The method of claim 3, wherein the change information of the light signal state comprises brightness change information and color change information,
the step of detecting the change of the optical signal state by the detection end by using the light source sensing equipment comprises the following steps:
the light source sensing equipment at the detection end collects the brightness change value and the color value of the optical signal within a preset time period;
when the effective brightness of the optical signal changes, determining the brightness change information according to a state value corresponding to the latest effective brightness change of the stored optical signal, wherein the effective brightness of the optical signal is determined according to the collected brightness change value; and the number of the first and second groups,
and determining the color change information according to the color value of the optical signal.
5. The method of claim 3, wherein the step of detecting the change in the state of the optical signal by a light source sensing device is preceded by:
the Socket long connection is established between the WiFi hot spot generated by the detection end and the detection end, the WiFi hot spot is generated when the detection end is close to a light source of the equipment to be detected, and the light source is used for generating the optical signal.
6. An apparatus testing device, comprising:
the device comprises an action simulation module, a control module and a control module, wherein the action simulation module is used for simulating the control action of the device to be tested at a device control end so as to change the optical signal state of the device to be tested;
the device detection module is used for detecting the change of the state of the optical signal through the light source sensing device;
and the equipment testing module is used for generating a testing result of the equipment to be tested according to the change information of the optical signal state obtained by detection and a control result log of the equipment to be tested obtained from the equipment control terminal.
7. The apparatus of claim 6, wherein the motion simulation module is further configured to:
and sending an instruction simulating a click event to the equipment control end, wherein the click event is used for triggering a control button of the equipment control end so as to send a control command corresponding to the control button to the equipment to be tested at the equipment control end.
8. The apparatus of claim 6, wherein the device detection module is further configured to:
sending a detection instruction to a detection end, wherein the detection instruction is used for indicating the detection end to detect the change of the optical signal state by using light source sensing equipment;
and storing the change information of the optical signal state detected by the detection end.
9. The apparatus according to claim 8, wherein the change information of the optical signal state comprises brightness change information and color change information, and the detecting terminal detects the change of the optical signal state by:
the light source sensing equipment at the detection end collects the brightness change value and the color value of the optical signal within a preset time period;
when the effective brightness of the optical signal changes, determining the brightness change information according to a state value corresponding to the latest effective brightness change of the stored optical signal, wherein the effective brightness of the optical signal is determined according to the collected brightness change value; and the number of the first and second groups,
and determining the color change information according to the color value of the optical signal.
10. The apparatus of claim 8, further comprising a connection module to:
the Socket long connection is established between the WiFi hot spot generated by the detection end and the detection end, the WiFi hot spot is generated when the detection end is close to a light source of the equipment to be detected, and the light source is used for generating the optical signal.
11. An equipment testing system, comprising: equipment control end, test execution end, detection end, wherein:
the equipment control end is used for simulating the control action of the equipment to be tested according to the instruction of the test execution end so as to change the optical signal state of the equipment to be tested;
the detection end is used for detecting the change of the optical signal state by using light source sensing equipment according to a detection instruction sent by the test execution end;
and the test execution end is used for generating a test result of the equipment to be tested according to the change information of the optical signal state returned by the detection end and a control result log of the equipment to be tested, which is obtained from the equipment control end.
12. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-5.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201811129889.8A 2018-09-27 2018-09-27 Equipment testing method, device and system Pending CN110954214A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811129889.8A CN110954214A (en) 2018-09-27 2018-09-27 Equipment testing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811129889.8A CN110954214A (en) 2018-09-27 2018-09-27 Equipment testing method, device and system

Publications (1)

Publication Number Publication Date
CN110954214A true CN110954214A (en) 2020-04-03

Family

ID=69967795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811129889.8A Pending CN110954214A (en) 2018-09-27 2018-09-27 Equipment testing method, device and system

Country Status (1)

Country Link
CN (1) CN110954214A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114632A (en) * 2020-09-30 2020-12-22 东莞华贝电子科技有限公司 Test equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102182985A (en) * 2011-03-15 2011-09-14 中山伟强科技有限公司 Indoor lighting system based on network control
CN103017026A (en) * 2012-11-29 2013-04-03 杨夏芳 LED shadowless lamp system with failure detection and repair functions
CN103455403A (en) * 2013-08-26 2013-12-18 百度在线网络技术(北京)有限公司 Testing method and device
CN103596346A (en) * 2013-11-26 2014-02-19 常州市武进区半导体照明应用技术研究院 LED lamp failure detecting method and device
CN104320311A (en) * 2014-11-20 2015-01-28 国电南京自动化股份有限公司 Heartbeat detection method of SCADA distribution type platform
CN104614607A (en) * 2015-01-23 2015-05-13 加弘科技咨询(上海)有限公司 Test method and test system
WO2015079766A1 (en) * 2013-11-28 2015-06-04 株式会社日立製作所 Diagnostic device and diagnostic method for plant
CN104902658A (en) * 2015-04-03 2015-09-09 成都世纪光合作用科技有限公司 LED lighting system fault detection method and LED lighting system
CN106131076A (en) * 2016-04-19 2016-11-16 广东丰光科技有限公司 A kind of Adjustable head lamp based on NB IOT agreement and control system thereof
CN106612214A (en) * 2015-10-26 2017-05-03 任子行网络技术股份有限公司 Integrated system and self-adaptive communication method
CN107342917A (en) * 2017-07-04 2017-11-10 百度在线网络技术(北京)有限公司 Method and apparatus for detecting performance of network equipments
CN107390671A (en) * 2017-07-06 2017-11-24 四川九州电子科技股份有限公司 By the Auto-Test System and method of remote control device
CN107508725A (en) * 2017-08-24 2017-12-22 航天中认软件测评科技(北京)有限责任公司 For the method for automatic test, apparatus and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102182985A (en) * 2011-03-15 2011-09-14 中山伟强科技有限公司 Indoor lighting system based on network control
CN103017026A (en) * 2012-11-29 2013-04-03 杨夏芳 LED shadowless lamp system with failure detection and repair functions
CN103455403A (en) * 2013-08-26 2013-12-18 百度在线网络技术(北京)有限公司 Testing method and device
CN103596346A (en) * 2013-11-26 2014-02-19 常州市武进区半导体照明应用技术研究院 LED lamp failure detecting method and device
WO2015079766A1 (en) * 2013-11-28 2015-06-04 株式会社日立製作所 Diagnostic device and diagnostic method for plant
CN104320311A (en) * 2014-11-20 2015-01-28 国电南京自动化股份有限公司 Heartbeat detection method of SCADA distribution type platform
CN104614607A (en) * 2015-01-23 2015-05-13 加弘科技咨询(上海)有限公司 Test method and test system
CN104902658A (en) * 2015-04-03 2015-09-09 成都世纪光合作用科技有限公司 LED lighting system fault detection method and LED lighting system
CN106612214A (en) * 2015-10-26 2017-05-03 任子行网络技术股份有限公司 Integrated system and self-adaptive communication method
CN106131076A (en) * 2016-04-19 2016-11-16 广东丰光科技有限公司 A kind of Adjustable head lamp based on NB IOT agreement and control system thereof
CN107342917A (en) * 2017-07-04 2017-11-10 百度在线网络技术(北京)有限公司 Method and apparatus for detecting performance of network equipments
CN107390671A (en) * 2017-07-06 2017-11-24 四川九州电子科技股份有限公司 By the Auto-Test System and method of remote control device
CN107508725A (en) * 2017-08-24 2017-12-22 航天中认软件测评科技(北京)有限责任公司 For the method for automatic test, apparatus and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114632A (en) * 2020-09-30 2020-12-22 东莞华贝电子科技有限公司 Test equipment
CN112114632B (en) * 2020-09-30 2022-08-30 东莞华贝电子科技有限公司 Test equipment

Similar Documents

Publication Publication Date Title
CN108804302B (en) Remote testing method, system and related equipment
CN110196795B (en) Method and related device for detecting running state of mobile terminal application
US20190051147A1 (en) Remote control method, apparatus, terminal device, and computer readable storage medium
CN106649126B (en) Method and device for testing application program
CN110020293B (en) Multimedia data display method, device and storage medium
CN109753425B (en) Popup window processing method and device
CN108875328B (en) Identity verification method, device and storage medium
CN106776301B (en) Subelement testing method and device
CN112306851A (en) Automatic testing method and device
CN109542754B (en) Access method of mobile equipment, debugging method, device and system of application program
CN115756881A (en) Data processing method, device, equipment and storage medium based on SDK
CN113868132A (en) Application program testing method and device, electronic equipment and storage medium
CN110954214A (en) Equipment testing method, device and system
CN113377664A (en) Model testing method and device, electronic device and storage medium
US11121912B2 (en) Method and apparatus for processing information
CN110928547A (en) Public file extraction method, device, terminal and storage medium
CN115600213A (en) Vulnerability management method, device, medium and equipment based on application program
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN115033469A (en) Website system performance test method and device, equipment and storage medium
CN117171000A (en) Application program APP testing method and device, electronic equipment and storage medium
CN110519456B (en) Information processing method, device, terminal, server and storage medium
CN113238944A (en) Test method, device and system
CN112788640A (en) Communication equipment testing method and device, storage medium and terminal
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN110286958B (en) Node information acquisition method, device and storage medium

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