Batch test equipment monitoring and Monkey test execution device
By designing a batch test equipment monitoring and Monkey test execution device including MCU main control chip, RAM chip and ROM main memory chip, the existing Monkey test efficiency is solved and the cumbersome report generation is complicated, and multiple devices are realized. Efficient testing and automated report generation.
Patent Information
- Application Number
- CN202411450029.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-07
AI Technical Summary
The existing Monkey testing methods are inefficient and cannot centrally control multiple devices. The generation and sorting of test reports require a lot of labor, resulting in waste of labor and increased workload.
Design a batch of test equipment monitoring and Monkey test execution device, using MCU main control chip, RAM chip and ROM main memory chip, supports duplex/half duplex operation and visual display of test data, and can conduct simultaneous testing of multiple devices. and monitor, automatically collect and analyze test logs, and generate test reports.
The batch testing of multiple devices is realized, which significantly improves the working efficiency of Monkey tests, reduces the time for manual collation of reports, and improves the speed and accuracy of testing.
Smart Images

Figure CN119396725A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software testing, and in particular to a batch testing equipment monitoring and Monkey test execution device. Background Art
[0002] Monkey testing, also known as funny testing, generally refers to testing the system under test with irregular instructions or operations to observe the stability and fault tolerance of the system under test. Its working principle is to stress test the program on the device by sending a pseudo-random user event stream to the system, such as key input, touch screen input, sliding trackball, gesture input and other operations, to detect anomalies that cannot be detected by conventional testing methods. The Android system natively provides support for Monkey testing and provides Monkey-related libraries in the system files, making Monkey testing a common method of Android application testing. Moreover, due to its randomness and unpredictability, Monkey testing is increasingly used by testers.
[0003] Based on the existing software testing theory, it is impossible to exhaustively test software defects, and the randomness of Monkey testing makes it impossible to conduct targeted strengthening tests on business or coding weaknesses. Therefore, there are only two ways to improve the efficiency of Monkey testing: adding test equipment or extending the test time. Due to working hours, most test projects cannot allocate enough working time to Monkey testing, and related work is often automatically performed at night; moreover, Monkey testing does not provide equipment performance reports and defect reports during the test execution. The relevant reports need to be manually exported and sorted by testers, resulting in a lot of wasted work time and personnel burden.
[0004] Document (CN 109828910 A) discloses a method and device for monkey testing, computer equipment, and storage medium. On the one hand, the method includes: connecting multiple test objects; sending a monkey test command to the multiple test objects to trigger the multiple test objects to concurrently execute a monkey test program, wherein the monkey test command carries the monkey test program; receiving multiple running logs generated by the multiple test objects after executing the monkey test program. However, the monkey test device can only test one device or one app at a time, and cannot be centrally controlled. The test efficiency is too low and the test speed is too slow. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention conceives a batch test equipment monitoring and Monkey test execution device, which has a built-in power supply, can work independently, supports duplex / half-duplex operation, supports visual display of test data, and has a faster test speed.
[0006] The technical solution adopted to realize the present invention is: a batch test equipment monitoring and Monkey test execution device, characterized in that it includes: an MCU main control chip, a RAM chip and a ROM main memory chip, the MCU main control chip is electrically connected to the RAM chip through a data bus, the RAM chip is electrically connected to the ROM main memory chip through a data bus, the MCU main control chip, the RAM chip and the ROM main memory chip are electrically connected to a power management module respectively, the power management module is electrically connected to a built-in power supply, the RAM chip provides an additional high-speed channel to the MCU main control chip and the ROM main memory chip through a mainboard, and the MCU main control chip is electrically connected to a group of USB interfaces.
[0007] Furthermore, the MCU main control chip model is ESP32-S3.
[0008] Furthermore, the RAM chip is 512M.
[0009] Furthermore, the ROM main memory chip is 128G.
[0010] Furthermore, the group of USB interfaces includes: a USB 2.0 interface and a USB TYPE-C interface.
[0011] Furthermore, the USB 2.0 interface is connected to a computer for command writing; and the USB TYPE-C interface is used to connect to a device under test.
[0012] Furthermore, the built-in power supply is a replaceable lithium battery power supply.
[0013] Furthermore, the MCU main control chip periodically sends performance query instructions to the device under test to collect the current CPU occupancy rate, memory occupancy rate, CPU core temperature, and frame rate of the device under test.
[0014] Furthermore, the MCU main control chip uses the logcat tool that comes with the tested Android device to perform real-time detection and recording of logs during the test process, and stores them in the ROM main memory chip according to the timestamp+device name.
[0015] The beneficial technical effects of the batch test equipment monitoring and Monkey test execution device of the present invention are embodied in:
[0016] A batch test equipment monitoring and Monkey test execution device can send test instructions to multiple controlled devices, monitor screen images, and monitor operating data (memory, CPU occupancy, system temperature), which greatly improves the work efficiency of Monkey testing and solves the problem of low efficiency when performing Monkey testing. After the test execution is completed, the logs given by the controlled devices during the test execution are packaged, serious problems such as application crashes and ANR (application no response) are screened, and test reports are generated and saved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of a batch test equipment monitoring and Monkey test execution device;
[0018] Figure 2 is a duplex operation flow chart in Example 1;
[0019] Figure 3 This is a half-duplex operation flow chart in Example 2. DETAILED DESCRIPTION
[0020] The following is combined with Figures 1-2 The specific implementation manner will further describe the present invention in detail. To make the purpose, technical scheme and advantages of the implementation manner clearer, the technical scheme in the implementation manner will be clearly and completely described in combination with the embodiments of the present invention. The specific implementation manner described here is only used to explain the present invention and is not used to limit the scope of the present invention.
[0021] As attached Figure 1 As shown, a batch test equipment monitoring and Monkey test execution device comprises:
[0022] One ESP32-S3 MCU main control chip is used for instruction operation; one 512M RAM chip is used for main memory-MCU data exchange and instruction writing; one 128G ROM main memory chip is used for recording log files; the ESP32-S3 MCU main control chip is electrically connected to the 512M RAM chip through a data bus, the 512M RAM chip is electrically connected to the 128G ROM main memory chip through a data bus, the ESP32-S3 MCU main control chip, the 512M RAM chip and the 128G ROM main memory chip are electrically connected to a power management module respectively, the power management module is used to adjust the voltage and power supply, the power management module is electrically connected to a built-in power supply, the built-in power supply is a replaceable lithium battery power supply, the 512M RAM chip provides an additional high-speed channel to the ESP32-S3 MCU main control chip and the 128G ROM main memory chip through the motherboard, the ESP32-S3 MCU main control chip is electrically connected to a group of USB interfaces, the group of USB interfaces are: USB 2.0 interface and USBTYPE-C interface, the USB 2.0 interface is used to connect the computer to write commands; the USB TYPE-C interface is used to connect the device under test. In the half-duplex working mode, the ESP32-S3 MCU main control chip will periodically send performance query commands to the device under test, collect the current CPU occupancy rate, memory occupancy rate, CPU core temperature, and frame rate of the device under test, and record the information of each device under test into a .top format file through the MCU-RAM-ROM path. After the test is completed or terminated, the file is uniformly saved in the test result folder; the ESP32-S3 MCU main control chip uses the logcat tool that comes with the Android device under test to perform real-time detection and record the logs during the test, and store them in ROM according to the timestamp + device name. At the same time, at the end of the test, the MCU will traverse all log files, search for text containing 'anr' or 'Fatal Exception', and separately intercept the first and last 200 lines, extract the time of occurrence, and store them in ROM in the form of 'anr' or 'Fatal Exception' + time + device name.
[0023] A batch test equipment monitoring and Monkey test execution device directly transmits MPEG-4 encoded video streams through the device bus, which is used to batch display the current screen display status of connected devices in industrial control software. The interface supports displaying the screen display of 1-4 devices at the same time. The industrial control software allows individual or batch selection of interfaces for recording. After the recording starts, the screen recording of each device will be saved separately. The recording function is designed separately and does not depend on the test running status. After the recording is completed, the recording file will exist in a specific folder under the software directory in the form of timestamp + device name. The module supports recording up to 4 devices under test at the same time.
[0024] A batch test equipment monitoring and Monkey test execution device allows duplex / half-duplex operation. In the half-duplex operation mode, only the equipment operated by the industrial control software is connected to the hardware equipment. The user customizes the test running time and running module in the industrial control software, and at the same time, the parameters of the test command are designed in a visualized and localized manner. After the user completes the configuration and clicks to start execution, the industrial control software automatically completes the command generation and writes it into the device RAM, and the device enters the standby state. The industrial control software connection is disconnected, and the hardware is connected to the device under test. The device will automatically obtain the control authority and execute the test according to the previously written command parameters. If the command needs to be cleared after writing, the hardware physical switch can be used to cut off the power. In the duplex mode, the hardware device only acts as a bridge between the industrial control device and the device under test. The data exchange between the control and test devices will be directly transmitted through the data bus. At this time, the device can be used as a double-headed USB cable, allowing the industrial control software to directly send test commands to the device under test. The test result files such as the log files of the device under test will also be directly stored through the industrial control software instead of the hardware.
[0025] Embodiment 1:
[0026] In duplex operation mode, Figure 2As shown, a batch test equipment monitoring and Monkey test execution device is connected to the user's computer. The user's computer opens the industrial control software. A batch test equipment monitoring and Monkey test execution device is connected to 4 devices under test (device names are A, B, C, and D) through the USB interface. The industrial control software is opened, and "test execution" is clicked. The test execution time is filled in as 09:00 on May 18, 2024, and the end time is 18:00 on May 18, 2024. Select the "Run specified package" option, enter "com.test.testapp" in this option, select "Execute", and the system will send the spliced Monkey test instructions to all devices under test when the system clock reaches 09:00 on May 18, 2024. At this time, the industrial control software automatically splices and sends "adb shell Monkey-p to all devices through the bus. com.test.testapp--ignore-crashes--ignore-timeouts--monitor-native-crashes-vv" command, all devices start to execute the Monkey test of the "com.test.testapp" application package. Users can freely view the execution status of any device in the "Screen Monitoring" interface. In the "Screen Monitoring" interface, users can select "Start Recording" and choose to record devices A and C. The user clicks "Start Recording" at 09:30:00, and the hardware device transmits the screen through the bus. The industrial control software retests and stores the video. The user clicks "End Recording", the software ends recording, and saves the video file in the 'hard disk name / software directory / Video / 20240518093000' folder as two video files 20240518093000_A.mkv and 20240518093000_C.mkv respectively. When the system clock is detected to reach 18:00 on May 18, 2024, the test termination signal is automatically sent to all devices, and the software starts to organize the test report folder and save the test folder in the folder 'Hard Disk Name / Software Directory / TestResult / 20240518090000'. In this folder, there are 4 folders AD. The user clicks on the A folder, which contains CrashLog, Log, and info folders. The user clicks "Result Viewer" in the software and selects the folder 'Hard Disk Name / Software Directory / TestResult / 20240518090000' in the selection interface. The system automatically outputs a report in web page format. The web page provides 5 options A-D. Click "D", and the web page displays the test execution information of device D, showing the test start and end time, test parameters, number of Crashes and ANRs, and a line chart of performance data.
[0027] Embodiment 2:
[0028] In half-duplex operation mode, Figure 3 As shown, a batch of test equipment monitoring and Monkey test execution device is connected to the user's computer. The user's computer opens the industrial control software. A batch of test equipment monitoring and Monkey test execution device is turned on. There is no connection between the device under test. Open the industrial control software and click "Test Execution". Fill in the test execution time as 09:00 on May 18, 2024, and the end time as 18:00 on May 18, 2024. Select the "Run Specified Package" option, enter "com.test.testapp" in this option, and select "Write". It will write "adb shell Monkey-pcom.test.testapp
[0029] The "--ignore-crashes--ignore-timeouts--monitor-native-crashes-vv" command is written into the MCU, and then the user disconnects the hardware from the computer. At this time, the built-in power supply intervenes to protect the device switch status from being affected. The Monkey test instruction is saved in the MCU at this time. The user connects the hardware device to the device under test. After the hardware device MCU learns the connection status, it begins to obtain device control and executes the saved test commands. The log and performance information obtained during the test execution will be saved in the hardware ROM. After the test is completed, the hardware device is disconnected from the device under test and connected to the computer. The log information saved in the hardware device can be read using the industrial control software.
[0030] The above is only a preferred embodiment of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A batch test equipment monitoring and Monkey test execution device, characterized in that it include: MCU main control chip, RAM chip and ROM main memory chip, the MCU main control chip and the RAM chip are electrically connected through a data bus, the RAM chip and the ROM main memory chip are electrically connected through a data bus, the MCU main control chip, the RAM chip and the ROM main memory chip are electrically connected to a power management module respectively, the power management module is electrically connected to a built-in power supply, the RAM chip provides an additional high-speed channel to the MCU main control chip and the ROM main memory chip through the motherboard, and the MCU main control chip is electrically connected to a group of USB interfaces.
2. A batch test equipment monitoring and Monkey test execution device according to claim 1, characterized in that: The MCU main control chip model is ESP32-S3.
3. A batch test equipment monitoring and Monkey test execution device according to claim 1, characterized in that: The RAM chip is 512M.
4. A batch test equipment monitoring and Monkey test execution device according to claim 1, characterized in that: The ROM main memory chip is 128G.
5. A batch test equipment monitoring and Monkey test execution device according to claim 1, characterized in that: The group of USB interfaces includes: a USB 2.0 interface and a USB TYPE-C interface.
6. A batch test equipment monitoring and Monkey test execution device according to claim 5, characterized in that: The USB 2.0 interface is connected to a computer for command writing; the USB TYPE-C interface is used to connect to the device under test.
7. A batch test equipment monitoring and Monkey test execution device according to claim 5, characterized in that: The built-in power supply is a replaceable lithium battery power supply.
8. A batch test equipment monitoring and Monkey test execution device according to claim 5, characterized in that: The MCU main control chip periodically sends performance query instructions to the device under test to collect the current CPU occupancy rate, memory occupancy rate, CPU core temperature, and frame rate of the device under test.
9. A batch test equipment monitoring and Monkey test execution device according to claim 5, characterized in that: The MCU main control chip uses the logcat tool that comes with the tested Android device to perform real-time detection and recording of logs during the test process, and stores them in the ROM main memory chip according to the timestamp+device name.
Citation Information
Patent Citations
Monkey test method and device, computer equipment and storage medium
CN109828910A