Automatic testing device based on image recognition

The automated testing device based on image recognition solves the problem of low efficiency in traditional manual testing, realizes automated testing of software interface display, improves testing efficiency and accuracy, and generates detailed reports.

CN224248120UActive Publication Date: 2026-05-15ZHENGZHOU ELECTRIC POWER COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
ZHENGZHOU ELECTRIC POWER COLLEGE
Filing Date
2025-05-29
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Traditional manual software testing methods are inefficient, time-consuming, labor-intensive, and prone to human error, making it difficult to guarantee the accuracy and consistency of the software interface display.

Method used

An automated testing device based on image recognition was designed. It adopts an ESP32-WROOM-32D main control chip, an OV2640 camera module, an OLED display screen, and circuit optimization. Combined with image acquisition, data transmission, and feedback modules, it realizes automated testing.

Benefits of technology

It improves the efficiency and accuracy of software interface testing, reduces manual operations, ensures consistent display of the software interface in different environments, and generates detailed test reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224248120U_ABST
    Figure CN224248120U_ABST
Patent Text Reader

Abstract

The utility model discloses an automatic testing device based on image recognition, which comprises a main control chip, a control and interaction module and an image acquisition module, and the image acquisition module adopts an OV2640 camera module; the main control chip adopts ESP32-WROOM-32D, the OV2640 camera module is connected with the ESP32 through a DVP interface, a data line of the OV2640 camera module is connected to a GPIO of the ESP32, and camera parameters are configured through an IC bus interface; the power supply circuit adopts an AMS1117-3. 3V voltage stabilizing chip and provides a working power supply for the ESP32 and external equipment; the output end of the voltage stabilizing chip is connected with the power supply module U1 and the power supply module U3 through the transistor switch Q2, the power supply module U1 and the power supply module U3 respectively output 2.8 V and 1.2 V direct current power supplies to provide 2.8 V and 1.2 V working power supplies for the camera module, and the transistor switch Q2 is in controlled connection with the ESP32.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to an automated testing device for image recognition based on ESP-32. Background Technology

[0002] In today's rapidly developing digital age, the quality and stability of software applications are of paramount importance. Traditional manual testing methods require testers to manually check the software interface one by one in different environments. This method relies on manual operation, which is slow, inefficient, and requires repeated manual execution of the same test cases. It is tedious, time-consuming, and prone to human error.

[0003] To efficiently ensure the accuracy and consistency of the software interface display, the technical team developed an automated testing system based on image recognition. The system relies on the Pytest automated testing framework, whose powerful features and rich plugin ecosystem greatly enhance the flexibility and scalability of testing. For user-input URL information, the system uses Playwright technology for precise screenshot analysis. Playwright, an advanced automated testing tool, can simulate real user operations in a browser, ensuring the comprehensiveness and authenticity of screenshots. In the image comparison phase, the system employs various scientifically effective image similarity comparison methods. For example, it calculates the difference between the baseline image and the screenshot pixel by pixel, accurately quantifying subtle changes between images; structural similarity index comparison comprehensively evaluates similarity from multiple dimensions such as image structure, brightness, and contrast, which is more in line with human visual characteristics; histogram comparison compares images based on color distribution statistics, effectively reflecting the overall characteristics of the image. Based on the results of these comparison methods, the automated testing system performs diff judgment. Once the difference between the diff value and the threshold exceeds a set indicator, a system warning is immediately triggered, indicating an anomaly. This rigorous anomaly judgment mechanism can promptly detect display problems that may occur in different environments or versions of the software interface.

[0004] The application of image recognition-based automated testing systems has greatly improved testing efficiency. However, in order to support the operation of such automated testing systems, a suitable automated testing device is required. Utility Model Content

[0005] To adapt to the application of automated testing systems, this utility model proposes an automated testing device based on image recognition.

[0006] The technical solution adopted in this utility model is as follows:

[0007] An automated testing device based on image recognition includes a main control chip, a control and interaction module, peripheral circuits, and an image acquisition module. The image acquisition module uses an OV2640 camera module. The main control chip is an ESP32-WROOM-32D. The camera module is connected to the ESP32 via a DVP interface, and its data line is connected to the ESP32's GPIO. Camera parameters are configured via an I²C bus interface. The power supply circuit uses an AMS1117-3.3V voltage regulator chip to provide operating power to the ESP32 and external devices. The output terminal of the voltage regulator chip... Transistor switch Q2 connects to power modules U1 and U3, which output 2.8V and 1.2V DC power respectively to provide 2.8V and 1.2V operating power to the camera module. Transistor switch Q2 is controlled to connect to the ESP32. The control and interaction module (human-machine interface) includes user operation control buttons and status feedback circuit: the GPIO of ESP32 is connected to the relay module to control external devices (such as button simulation, screen touch signals); the GPIO of ESP32 is connected to the OLED display to display the test status and test results.

[0008] The image recognition-based automated testing device is equipped with a flash lamp and control circuit in conjunction with the image acquisition module. The power supply terminal of the flash lamp is connected to a power source, and its ground terminal is grounded through a transistor switch Q1. The control base of the transistor switch Q1 is controlled to be connected to the ESP32.

[0009] The image recognition-based automated testing device is equipped with an ESD protection circuit: TVS diodes are added to the GPIO and communication interfaces to prevent electrostatic damage.

[0010] The image recognition-based automated testing device uses an SSD1306 OLED display screen, which is connected to the data output port of an ESP32 via an I²C bus interface. The status feedback circuit also includes LED indicator lights: a red indicator light indicates an abnormality, a green indicator light indicates normal operation, and a blue indicator light indicates data transmission in progress.

[0011] The image recognition-based automated testing device includes an RC reset circuit in its peripheral circuitry to ensure stable startup of the ESP32; and a reserved SWD / JTAG debugging interface to support firmware burning and debugging.

[0012] The image acquisition module of the aforementioned automated testing device based on image recognition has a reserved SPI interface for expanding high-resolution cameras (such as GC032A).

[0013] The image recognition-based automated testing device includes a power management module: input power: 5V DC, supporting USB power supply or lithium battery; battery management: TP4056 charging module, supporting lithium battery charging and discharging management.

[0014] The image recognition-based automated testing device includes a storage expansion module, which uses an SD card module connected via an SPI interface to store temporary images, test logs, and configuration files.

[0015] Beneficial effects of the utility model:

[0016] 1. This utility model is an automated testing device based on image recognition. It adopts circuit optimization design to reduce CPU load: the core module main control chip adopts ESP32-WROOM-32D (integrated Wi-Fi / Bluetooth, dual-core processor, supports low power mode), which can optimize resource allocation: prioritize the use of ESP32's hardware acceleration function (such as JPEG decoding) to reduce CPU load; adopt low power design: in standby mode, the power supply of camera and peripherals is turned off, and ESP32 is woken up by timer.

[0017] 2. This utility model relates to an automated testing device based on image recognition. The image acquisition camera module is OV2640 (supporting JPEG output, with a maximum resolution of 1600×1200, connected to an ESP32 via a DVP interface). The camera data cable is connected to the ESP32's GPIO (e.g., GPIO4-GPIO15), and camera parameters are configured via I2C. This achieves automated testing based on image comparison, improving testing efficiency. A reserved SPI interface can be used to expand with high-resolution cameras.

[0018] 3. This utility model presents an automated testing device based on image recognition, featuring low circuit cost and flexible configuration. The ESP32 has a built-in Wi-Fi module, enabling the upload of collected image data to the cloud / server for image comparison and analysis. Optional wired communication is available, allowing communication with a host computer via the ESP32's UART or USB interface for debugging or local data processing. Battery management can be achieved using the TP4056 charging module, supporting lithium battery charging and discharging management.

[0019] 4. This utility model is an automated testing device based on image recognition. The peripheral circuit design incorporates ESD protection: TVS diodes are added to the GPIO and communication interfaces to prevent electrostatic damage. Anti-interference design can be adopted: shielding layers are added to analog signal lines (such as camera DVP), and differential routing is used. Attached Figure Description

[0020] Figure 1 The diagram shown is a block diagram illustrating the principle of the automated testing device based on image recognition of this invention.

[0021] Figure 2 The diagram shown is a circuit schematic of the automated testing device based on image recognition according to this invention. Detailed Implementation

[0022] To make the technical concept and advantages of the invention clearer, the technical solution of this utility model will be further described in detail below with reference to the accompanying drawings. It should be understood that the following embodiments are merely preferred embodiments for explaining and illustrating this utility model, and should not be considered as, nor constitute a limitation on, the scope of patent protection claimed for this utility model. Example

[0023] See Figure 1 , Figure 2 This utility model discloses an automated testing device based on image recognition, comprising a main control chip, a control and interaction module, and peripheral circuits. To adapt to automated testing systems based on image recognition, an image acquisition module and adaptation circuitry (including power supply and control) are added. The image acquisition module uses an OV2640 camera module; the main control chip uses an ESP32-WROOM-32D microcontroller. The OV2640 camera module is connected to the ESP32 via a DVP interface, and its data lines are connected to the ESP32's GPIO pins. Camera parameters are configured via an I²C bus interface. The power supply circuit uses an AMS... A 1117-3.3V voltage regulator chip provides operating power for the ESP32 and external devices. The output of the voltage regulator chip is connected to power modules U1 and U3 via transistor switch Q2. Power modules U1 and U3 output 2.8V and 1.2V DC power respectively to provide 2.8V and 1.2V operating power for the camera module. Transistor switch Q2 is controlled to be connected to the ESP32. The control and interaction module simulates user operation control buttons and status feedback circuitry: the GPIO of the ESP32 is connected to a relay module to control external devices; the GPIO of the ESP32 is connected to an OLED display screen to display test status and results.

[0024] The image recognition-based automated testing device includes an OV2640 image acquisition / camera module, supporting JPEG output with a maximum resolution of 1600×1200, connected to an ESP32 via a DVP interface. Interface design: The camera data cable connects to the ESP32's GPIOs (e.g., GPIO4-GPIO15), and camera parameters are configured via I2C. A reserved SPI interface can be designed for expanding high-resolution cameras (e.g., GC032A). A flash and control circuit are included in conjunction with the image acquisition module. The flash's power supply is connected to a power source, and its ground terminal is grounded through a transistor switch Q1. The control base of transistor switch Q1 is controlled and connected to the ESP32.

[0025] Input power: 5V DC (supports USB power or lithium battery). Power supply circuit: uses AMS1117-3.3V voltage regulator chip to provide a stable 3.3V power supply for ESP32 and peripherals.

[0026] Power / Battery Management (Optional): TP4056 charging module, supporting lithium battery charge and discharge management.

[0027] The main control chip uses ESP32-WROOM-32D (dual-core processor, supports low power mode), and integrates a Wi-Fi / Bluetooth module, which can use wireless communication to upload the collected image data to the cloud / server for image comparison and analysis.

[0028] In addition to wireless communication, the data transmission module can also use wired communication (optional): it can communicate with the host computer via the ESP32's UART or USB interface for debugging or local data processing.

[0029] Control and Interaction Module:

[0030] Simulated user operation: GPIO connects to the relay module to control external devices (such as button simulation and screen touch signals). An optional infrared transmitter module can be added to simulate remote control operation.

[0031] Status feedback: An OLED display screen shows the test status and result summary. The OLED display screen uses an SSD1306 and is connected to the data output port of the ESP32 via an I²C bus interface. The status feedback circuit also includes LED indicators: a red indicator indicates an abnormality, a green indicator indicates normal operation, and a blue indicator indicates data transmission in progress.

[0032] The peripheral circuit design includes:

[0033] Reset circuit: RC reset circuit to ensure stable startup of ESP32.

[0034] Debugging interface: SWD / JTAG interface is reserved to support firmware burning and debugging.

[0035] ESD protection: TVS diodes are added to GPIO and communication interfaces to prevent electrostatic damage.

[0036] The image recognition-based automated testing device includes a storage expansion module, which uses an SD card module connected via an SPI interface to store temporary images, test logs, and configuration files.

[0037] Traditional manual testing requires testers to manually check the software interface one by one in different environments, which is not only time-consuming and labor-intensive, but also prone to human error. This device, running an automated testing system based on image recognition, ensures the accuracy and consistency of the software interface display.

[0038] Workflow of an image recognition-based automated testing system:

[0039] Image acquisition: The ESP32 controls the camera to capture screenshots of the software interface under test.

[0040] Data transmission: Images are uploaded to the server via Wi-Fi, and image comparison algorithms (such as structural similarity / histogram comparison) are invoked.

[0041] Results processing: The server returns the difference analysis results, and ESP32 determines whether to trigger an alarm based on the threshold.

[0042] Local feedback: Test results are displayed via OLED / LED and logs are recorded to an SD card.

[0043] Automated control: If an anomaly is detected, the ESP32 simulates a device restart or triggers a repair process via a relay.

[0044] The system leverages the Pytest automated testing framework and uses Playwright technology for precise screenshot analysis of user-input URL information, significantly enhancing the flexibility and scalability of testing. Through image similarity comparison, the system generates detailed and intuitive test reports based on Allure technology. Allure, with its aesthetically pleasing interface and rich visualizations, clearly presents the test results, including test case execution status, detailed image comparison data, and anomaly screenshots.

[0045] The application of this utility model helps to automate software interface testing. Testing tasks that originally required a lot of manpower and time can now be completed efficiently in a short time, greatly saving manual testing costs, effectively improving testing efficiency and accuracy, and providing a strong guarantee for the high-quality delivery of software projects.

Claims

1. An automated testing device based on image recognition, comprising a main control chip, a control and interaction module, and peripheral circuits, characterized in that: It also includes an image acquisition module, which uses an OV2640 camera module; the main control chip is an ESP32-WROOM-32D, the OV2640 camera module is connected to the ESP32 via a DVP interface, the data line of the OV2640 camera module is connected to the GPIO of the ESP32, and the camera parameters are configured via the I²C bus interface; the power supply circuit uses an AMS1117-3.3V voltage regulator chip to provide operating power for the ESP32 and external devices; the output of the voltage regulator chip is connected to power modules U1 and U3 via a transistor switch Q2, power modules U1 and U3 output 2.8V and 1.2V DC power respectively to provide 2.8V and 1.2V operating power for the camera module, and the transistor switch Q2 is controlled to be connected to the ESP32; the control and interaction module simulates user operation control buttons and status feedback circuit: the GPIO of the ESP32 is connected to a relay module to control external devices; the GPIO of the ESP32 is connected to an OLED display screen to display test status and test results.

2. The automated testing device based on image recognition according to claim 1, characterized in that: The image acquisition module is equipped with a flash and control circuit. The flash power supply is connected to a power source, and its grounding terminal is grounded through a transistor switch Q1. The control base of the transistor switch Q1 is controlled to be connected to the ESP32.

3. The automated testing device based on image recognition according to claim 1 or 2, characterized in that: ESD protection circuit is provided: TVS diodes are added to GPIO and communication interfaces to prevent electrostatic damage.

4. The automated testing device based on image recognition according to claim 1 or 2, characterized in that: The OLED display uses an SSD1306 and is connected to the data output port of the ESP32 via an I²C bus interface. The status feedback circuit also includes LED indicators: a red indicator indicates an abnormality, a green indicator indicates normal operation, and a blue indicator indicates data transmission in progress.

5. The automated testing device based on image recognition according to claim 1 or 2, characterized in that: The peripheral circuitry includes an RC reset circuit to ensure stable startup of the ESP32; and a reserved SWD / JTAG debugging interface to support firmware burning and debugging.

6. The automated testing device based on image recognition according to claim 1 or 2, characterized in that: The image acquisition module has a reserved SPI interface for expanding high-resolution cameras.

7. The automated testing device based on image recognition according to claim 1 or 2, characterized in that: Includes a power management module: Input power: 5V DC, supports USB power supply or lithium battery; Battery management: TP4056 charging module, supports lithium battery charging and discharging management.

8. The automated testing device based on image recognition according to claim 1 or 2, characterized in that: It includes a storage expansion module, which uses an SD card module connected via an SPI interface to store temporary images, test logs, and configuration files.