Product testing method and device, electronic equipment and storage medium
By assigning test tasks to multiple coroutines and using multimedia test programs in different programming languages to process data, the problem of low testing efficiency and accuracy in the existing technology is solved, high concurrency control and intelligent analysis are achieved, and product testing is improved efficiency and accuracy.
Patent Information
- Application Number
- CN202411187560.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-08
AI Technical Summary
Existing product testing tools implement the testing process in a single programming language, resulting in low testing efficiency and accuracy, and the inability to effectively analyze multimedia data.
By assigning test tasks to multiple coroutines, each coroutine associates a device under test, sending test instructions to obtain multimedia and functional data, and processing these data through the multimedia test program to generate a test report. Multimedia testing programs and coroutines are developed in different programming languages to achieve high concurrency control and intelligent analysis.
It improves the efficiency and accuracy of product testing, and realizes high concurrency control and intelligent analysis of different programming languages through multiple coroutines, improving the accuracy of test results.
Smart Images

Figure CN118921453A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment testing, and in particular to a product testing method, device, electronic equipment and storage medium. Background Art
[0002] Network cameras and DVRs need to undergo comprehensive performance and functional testing before they are released to the market. Existing product testing tools usually use a single programming language (such as C++) to implement product testing, which has many defects, such as a single testing process and the inability to perform in-depth analysis of multimedia data, resulting in low testing efficiency and low accuracy of test results.
[0003] Therefore, how to improve the efficiency and accuracy of product testing has become an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present application provide a product testing method, device, electronic device and storage medium, which can improve the efficiency and accuracy of product testing.
[0005] In a first aspect, the present application provides a product testing method, the method comprising:
[0006] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0007] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0008] Receive multimedia data and functional data from each device under test through each coroutine;
[0009] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0010] In one of the embodiments, the multimedia data includes video data and audio data; the multimedia data of each device under test is processed through a multimedia test program to generate a multimedia test report for multiple devices under test, including: for the video data and audio data of each device under test, the video data and audio data are decoded and processed respectively through the multimedia test program to obtain M video frames and N audio samples; each video frame and each audio sample are detected through the multimedia test program to obtain a multimedia test result of the device under test; and a multimedia test report for multiple devices under test is generated based on the multimedia test results of multiple devices under test through the multimedia test program.
[0011] In one of the embodiments, each video frame and each audio sample are tested through a multimedia test program to obtain multimedia test results of the device under test, including: detecting the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame through the multimedia test program to obtain multiple video detection results, and determining the video test results of the device under test based on the multiple video detection results; and detecting the sampling rate, audio quality and synchronization rate of each audio sample with the video frame through the multimedia test program to obtain multiple audio detection results, and determining the audio test results of the device under test based on the multiple audio detection results; determining the multimedia test results of the device under test based on the video test results and the audio test results through the multimedia test program.
[0012] In one of the embodiments, before assigning test tasks for multiple devices under test to multiple coroutines, the method also includes: receiving a product test request from a client, the product test request including test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on user interface input, and the user interface is generated in a responsive layout manner.
[0013] In one of the embodiments, the method further includes: converting multimedia test reports for multiple devices under test into structured test reports through a multimedia test program; and sending the structured test reports to a client.
[0014] In one of the embodiments, the method further includes: sending functional test reports for multiple devices under test to the client through the main thread.
[0015] In a second aspect, the present application provides a product testing device, the device comprising:
[0016] A test task allocation module, used to allocate test tasks for multiple devices under test to multiple coroutines, wherein each coroutine is associated with one device under test;
[0017] A sending module, used to send a test instruction to a device under test associated with each coroutine through each coroutine, wherein the test instruction is used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0018] A receiving module, used for receiving multimedia data and functional data from each device under test through each coroutine;
[0019] A processing module is used to send the multimedia data of each device under test to the multimedia test program through each coroutine, and process the multimedia data of each device under test through the multimedia test program to generate a multimedia test report for multiple devices under test; and, through each coroutine, aggregate the functional data of each device under test to the main thread, and generate a functional test report for multiple devices under test through the main thread; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0020] In a third aspect, the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0021] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0022] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0023] Receive multimedia data and functional data from each device under test through each coroutine;
[0024] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0025] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0026] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0027] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0028] Receive multimedia data and functional data from each device under test through each coroutine;
[0029] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0030] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0031] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0032] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0033] Receive multimedia data and functional data from each device under test through each coroutine;
[0034] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0035] In the above-mentioned product testing method, device, electronic device and storage medium, the testing device can assign the test tasks for multiple devices under test to multiple coroutines; through each coroutine, a test instruction is sent to the device under test associated with the coroutine, and the test instruction is used to instruct the device under test to obtain multimedia data and functional data; through each coroutine, multimedia data and functional data from the device under test are received. In this way, the testing device can realize high-concurrency control testing through multiple coroutines, thereby improving the efficiency of product testing. In addition, the testing device sends the multimedia data of each device under test to the multimedia test program through each coroutine, and processes the multimedia data of each device under test through the multimedia test program to generate multimedia test reports for multiple devices under test, wherein the multimedia test program and the coroutine are developed in different programming languages, so that the testing device can perform intelligent analysis and evaluation on the received multimedia data through a multimedia test program different from the coroutine, thereby improving the accuracy of product testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 It is an architecture diagram of a product testing system provided in an embodiment of the present application;
[0038] Figure 2 It is a flowchart of a product testing method provided in an embodiment of the present application;
[0039] Figure 3 It is a flowchart of another product testing method provided in an embodiment of the present application;
[0040] Figure 4 This is a schematic diagram of a product testing process provided by an embodiment of the present application;
[0041] Figure 5 It is a structural schematic diagram of a product testing device provided in an embodiment of the present application;
[0042] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] See also Figure 1 , see Figure 1 , Figure 1 1 is an architecture diagram of a product testing system provided in an embodiment of the present application. Figure 1 As shown, the product testing system includes a testing device 101, a plurality of devices under test ( Figure 1 In the figure, multiple devices under test are taken as an example, namely, a network camera (IP CAMERA, IPC) 102 and a hard disk recorder (Digital Video Recorder, DVR) 103), a client 104 and a cloud 105 ( Figure 1In the figure, the cloud 105 including the manufacturing enterprise production process execution system (Manufacturing Execution System, MES), the production test cloud platform and the database are drawn as an example). Among them, the test device 101 can assign the test tasks for the network camera 102 and the hard disk recorder 103 to the first coroutine and the second coroutine, wherein the first coroutine is associated with the network camera 102, and the second coroutine is associated with the hard disk recorder 103; send a test instruction to the network camera 102 through the first coroutine, and send a test instruction to the hard disk recorder 103 through the second coroutine, wherein the test instruction is used to instruct the device under test to obtain multimedia data and functional data, and the functional data includes media functional data and / or network functional data of the device under test; the network camera 102 and the hard disk recorder 103 respectively execute the test instructions to obtain their respective multimedia data and functional data, and send their respective multimedia data and functional data to the test device 10 1. The test device 101 receives multimedia data and functional data from the network camera 102 through the first coroutine, and receives multimedia data and functional data from the hard disk video recorder 103 through the second coroutine; the test device 101 sends the multimedia data of the network camera 102 to the multimedia test program through the first coroutine, and sends the multimedia data of the hard disk video recorder 103 to the multimedia test program through the second coroutine, and processes the multimedia data of the network camera 102 and the multimedia test data of the hard disk video recorder 103 through the multimedia test program, respectively, to generate multimedia test reports for the network camera 102 and the hard disk video recorder 103, wherein the multimedia test program and the coroutine are developed in different programming languages. In addition, the test device 101 also aggregates the functional data of the network camera 102 to the main thread through the first coroutine, and generates a functional test report for the network camera 102 through the main thread; and, aggregates the functional data of the test device 103 to the main thread through the second coroutine, and generates a functional test report for the hard disk video recorder 103 through the main thread. In this way, on the one hand, the test equipment can achieve high-concurrency control testing through multiple coroutines, thereby improving the efficiency of product testing; on the other hand, the test equipment can perform intelligent analysis and evaluation on the received multimedia data through multimedia test programs different from coroutines, thereby improving the accuracy of product testing.
[0045] Optionally, the testing device 101 can also send multimedia test reports for the network camera 102 and the hard disk recorder 103, as well as functional test reports for the network camera 102 and functional test reports for the hard disk recorder 103 to the client 104, so that the client 104 outputs the above test reports and uploads the above test reports to the cloud 105.
[0046] Among them, the network camera is a new generation of camera produced by the combination of traditional cameras and network technology. It is composed of a network coding module and an analog camera. The network coding module is used to encode and compress the analog video signal collected by the analog camera into a digital signal.
[0047] A DVR is a digital video recording device that converts analog signals into digital signals and stores them on a hard disk. Compared with traditional tape recorders, DVRs have higher image quality and reliability, and also support remote access and control.
[0048] The product testing method provided in the embodiments of the present application is described below in conjunction with the accompanying drawings.
[0049] See also Figure 2 , Figure 2 is a flow chart of a product testing method provided in an embodiment of the present application. The method can be performed by a testing device (e.g. Figure 1 The test equipment 101 in the embodiment is executed. Figure 2 As shown, the product testing method may include but is not limited to the following steps:
[0050] S201. Allocate test tasks for multiple devices under test to multiple coroutines, wherein each coroutine is associated with one device under test.
[0051] Among them, a coroutine is a program component that has a high execution rate.
[0052] In an optional implementation, the coroutine may be a concurrent execution unit goroutine in the Go language, which can process multiple tasks in parallel when the program is running. In product testing, the test equipment may assign test tasks for multiple test equipment to multiple goroutines to achieve concurrent execution of test tasks. In this way, the test equipment can improve the efficiency of product testing by executing test tasks concurrently.
[0053] S202: Send a test instruction to the device under test associated with each coroutine through each coroutine, where the test instruction is used to instruct the device under test to obtain multimedia data and functional data.
[0054] Among them, multimedia data includes video data and audio data.
[0055] The functional data includes media functional data and / or network functional data of the device under test. The media functional data is, for example, whether the device under test can record, record, play back, etc. The network functional data is, for example, network performance data of the device under test, such as bandwidth, delay, packet loss rate, etc.
[0056] S203: Receive multimedia data and functional data from each device under test through each coroutine.
[0057] In an optional implementation, the multimedia data and functional data of each device under test may be obtained after the device under test performs multimedia testing and functional testing in response to a test instruction from a coroutine associated with the device under test.
[0058] S204. Send the multimedia data of each device under test to the multimedia test program through each coroutine, and process the multimedia data of each device under test through the multimedia test program to generate a multimedia test report for multiple devices under test; and, aggregate the functional data of each device under test to the main thread through each coroutine, and generate a functional test report for multiple devices under test through the main thread; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0059] In an optional implementation, the test device may start a Transmission Control Protocol (TCP) server through each coroutine and connect the multimedia test program to the TCP server, so that the test device may send the multimedia data of each device under test to the multimedia test program through each coroutine using a socket.
[0060] In an optional implementation, each coroutine may send multimedia data of the device under test associated with the coroutine to the multimedia test program via a Real Time Streaming Protocol (RTSP) or a Hypertext Transfer Protocol (HTTP).
[0061] The real-time streaming protocol is a multimedia streaming protocol used to control sound or image, which allows multiple streaming requirements to be controlled simultaneously.
[0062] In an optional implementation, the test device can receive the multimedia data of the device under test associated with each coroutine sent by each coroutine in a multi-threaded or asynchronous input / output (I / O) manner through a multimedia test program. In this way, the performance of multimedia data transmission can be improved.
[0063] In an optional implementation, after step S204, the test device may also convert the multimedia test reports for the multiple devices under test into structured test reports through a multimedia test program; and send the structured test reports to the client.
[0064] In an optional implementation, after step S204, the testing device may also send functional test reports for multiple devices under test to the client through the main thread.
[0065] In an embodiment of the present application, the test device can assign test tasks for multiple devices under test to multiple coroutines; through each coroutine, a test instruction is sent to the device under test associated with the coroutine, and the test instruction is used to instruct the device under test to obtain multimedia data and functional data; through each coroutine, multimedia data and functional data from the device under test are received. In this way, the test device can achieve high-concurrency control testing through multiple coroutines, thereby improving the efficiency of product testing. In addition, the test device sends the multimedia data of each device under test to the multimedia test program through each coroutine, and processes the multimedia data of each device under test through the multimedia test program to generate a multimedia test report for multiple devices under test, wherein the multimedia test program and the coroutine are developed in different programming languages, so that the test device can perform intelligent analysis and evaluation on the received multimedia data through a multimedia test program different from the coroutine, thereby improving the accuracy of product testing.
[0066] See also Figure 3 , Figure 3 is a flow chart of another product testing method provided in an embodiment of the present application. Figure 2 The product testing methods shown differ in that Figure 3 The product testing method shown also describes how the test equipment processes the multimedia data of each device under test and generates multimedia test reports for multiple devices under test. Figure 3 As shown, the product testing method may include but is not limited to the following steps:
[0067] S301. Receive a product test request from a client, wherein the product test request includes test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on a user interface input, and the user interface is generated in a responsive layout manner.
[0068] Among them, responsive layout means that the same page displays different layouts on the screens of different terminal devices, which can provide users of different terminal devices with a more comfortable interface and a better user experience.
[0069] In an optional implementation, the responsive layout can be developed using vue.js technology.
[0070] In an optional implementation, the product test request may be sent by the client to the test device via HyperText Transfer Protocol (HTTP), that is, the client may send test tasks for multiple devices under test to the test device via HTTP request.
[0071] Among them, the Hypertext Transfer Protocol is a communication protocol based on "TCP / Internet Protocol (IP)", which is a simple "request-response" protocol. The Hypertext Transfer Protocol specifies what kind of message the client may send to the server and what kind of response it will get.
[0072] S302: Allocate test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test.
[0073] In an optional implementation, the relevant description of step S302 can refer to the description of the aforementioned step S201, which will not be repeated here.
[0074] S303: Send a test instruction to the device under test associated with each coroutine through each coroutine, where the test instruction is used to instruct the device under test to obtain multimedia data and functional data.
[0075] In an optional implementation, the relevant description of step S303 can refer to the description of the aforementioned step S202, which will not be repeated here.
[0076] S304: Receive multimedia data and functional data from each device under test through each coroutine.
[0077] In an optional implementation, the relevant description of step S304 can refer to the description of the aforementioned step S203, which will not be repeated here.
[0078] In an optional implementation, after step S304, the testing device may further execute the following steps S305 to S310, and the following steps S311 to S312.
[0079] S305. Send multimedia data of each device under test to the multimedia test program through each coroutine, where the multimedia data includes video data and audio data; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0080] In an optional implementation, after step S305, the test device may also use an efficient cache mechanism to store the received multimedia data of the device under test associated with each coroutine.
[0081] Among them, an efficient cache mechanism is, for example, a ring buffer mechanism. A ring buffer, also known as a circular buffer or a ring queue, is a commonly used data structure for storing and managing data in a fixed-size buffer. The ring buffer has a ring-shaped characteristic, that is, when the tail of the buffer reaches the maximum capacity, the next data will be stored from the head of the buffer, forming a cycle.
[0082] S306 , for each device under test, respectively decode the video data and audio data through a multimedia test program to obtain M video frames and N audio samples.
[0083] In an optional implementation, the test device may use FFmpeg through a multimedia test program to decode the video data and the audio data to obtain M video frames and N audio samples.
[0084] S307: Test each video frame and each audio sample through a multimedia test program to obtain a multimedia test result of the device under test.
[0085] In an optional embodiment, the test device detects each video frame and each audio sample through a multimedia test program to obtain multimedia test results of the device under test, which may include: detecting the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame through the multimedia test program to obtain multiple video detection results, and determining the video test results of the device under test based on the multiple video detection results; and detecting the sampling rate, audio quality and synchronization rate of each audio sample with the video frame through the multimedia test program to obtain multiple audio detection results, and determining the audio test results of the device under test based on the multiple audio detection results; determining the multimedia test results of the device under test based on the video test results and the audio test results through the multimedia test program.
[0086] In this embodiment, the test device detects the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame through a multimedia test program to obtain multiple video detection results, which may include: for each video frame, detecting whether the frame rate of the video frame reaches a preset frame rate threshold, detecting whether the resolution of the video frame reaches a preset resolution threshold, detecting the picture quality of the video frame, and detecting whether there is relative motion of the target object in the video frame; based on the multiple detection results of each video frame, multiple video detection results are obtained.
[0087] Optionally, when the test device detects the picture quality of the video frame through a multimedia test program, the test device may use a Peak Signal to Noise Ratio (PSNR) evaluation index to evaluate the picture quality of the video frame, or may use a Structural Similarity (SSIM) evaluation index to evaluate the picture quality of the video frame. When the test device detects the picture quality of the video frame through a multimedia test program, it may detect whether the PSNR value of the video frame reaches a preset PSNR threshold, or detect whether the SSIM value of the video frame reaches a preset SSIM threshold.
[0088] Optionally, multiple detection results for each video frame may include: the frame rate of the video frame reaches a preset frame rate threshold or the frame rate of the video frame does not reach the preset frame rate threshold, the resolution of the video frame reaches a preset resolution threshold or the resolution of the video frame does not reach the preset resolution threshold, the PSNR value of the video frame reaches a preset PSNR threshold or the PSNR value of the video frame does not reach the preset PSNR threshold, or, the SSIM value of the video frame reaches a preset SSIM threshold or the SSIM value of the video frame does not reach the preset SSIM threshold, and, there is relative motion of the target object in the video frame or there is no relative motion of the target object in the video frame.
[0089] In this implementation, the test device detects the sampling rate, audio quality, and synchronization rate of each audio sample with the video frame through a multimedia test program to obtain multiple audio detection results, which may include: for each audio sample, detecting whether the sampling rate of the audio sample reaches a preset sampling rate threshold, detecting the noise value and distortion value of the audio sample, detecting whether the audio sample is synchronized with the video frame, and obtaining multiple detection results for each audio sample; based on the multiple detection results of each audio sample, obtaining multiple audio detection results.
[0090] Optionally, multiple detection results of each audio sample may include: the sampling rate of the audio sample reaches a preset sampling rate threshold or the sampling rate of the audio sample does not reach the preset threshold, the noise value and distortion value of the audio sample, and the audio sample is synchronized with the video frame or the audio sample is not synchronized with the video frame.
[0091] S308 . Generate a multimedia test report for the multiple devices under test based on the multimedia test results of the multiple devices under test through the multimedia test program.
[0092] In an optional embodiment, when the test device generates a multimedia test report for multiple devices under test based on the multimedia test results of multiple devices under test through a multimedia test program, a weighted scoring mechanism can be used to assign different weights to each test result according to the importance of each test result; determine a quality assessment result of the multimedia test result based on the weight of each test result; and generate a multimedia test report for multiple devices under test based on the multimedia test results and quality assessment results of multiple devices under test.
[0093] In an optional implementation, the multimedia test report may include log information, which records the test results corresponding to each detection step and the problems encountered during the test.
[0094] S309: Convert the multimedia test reports for the multiple devices under test into structured test reports through the multimedia test program.
[0095] The structured test report is, for example, a test report in JSON format, a test report in XML format, etc.
[0096] S310. Send a structured test report to the client through the multimedia test program.
[0097] S311. Through each coroutine, the functional data of each device under test is aggregated to the main thread, and through the main thread, a functional test report for multiple devices under test is generated.
[0098] S312: Sending functional test reports for multiple devices under test to the client through the main thread.
[0099] In an embodiment of the present application, the test device can assign test tasks for multiple devices under test to multiple coroutines; through each coroutine, a test instruction is sent to the device under test associated with the coroutine, and the test instruction is used to instruct the device under test to obtain multimedia data and functional data; through each coroutine, multimedia data and functional data from the device under test are received. In this way, the test device can achieve high-concurrency control testing through multiple coroutines, thereby improving the efficiency of product testing. In addition, the test device sends the multimedia data of each device under test to the multimedia test program through each coroutine, and processes the multimedia data of each device under test through the multimedia test program to generate a multimedia test report for multiple devices under test, wherein the multimedia test program and the coroutine are developed in different programming languages, so that the test device can perform intelligent analysis and evaluation on the received multimedia data through a multimedia test program different from the coroutine, thereby improving the accuracy of product testing.
[0100] See also Figure 4 , Figure 4Schematic diagram of a product testing process provided by an embodiment of the present application. Figure 4 As shown, the product testing process may include the following steps:
[0101] First, (1) the test equipment enters the physical model data; (2) the test equipment enters the model of the device under test; second, (3) the test equipment associates the model of the device under test with the physical model; (4) the physical model configuration of the device under test is generated. Then, (5) the interface and properties of the device under test are defined according to the physical model configuration of the device under test.
[0102] After that, (6) the user logs in to the client; (7) the client obtains the physical model configuration of the device under test and parses the corresponding user interface based on the physical model configuration of the device under test; (8) the user inputs the automated / semi-automated test instructions for the user interface; (9) the client sends the automated / semi-automated test instructions to the test device; (10) the test device determines the test task based on the automated / semi-automated test instructions; (11) the test device calls the interface of the device under test through the coroutine and sends the test instruction to the device under test; (12) the device under test responds to the test instruction, executes the automated / semi-automated test task, and obtains the test data; (13) the device under test sends the test data to the test device based on its own interface. (14) the test device sends the test results to the client. (15) the client uploads the test results to the MES.
[0103] Among them, the physical model is an abstraction of the physical world. It is a digital model used in the digital world after the digital description of the product, which defines the function of the product. The physical model abstracts and summarizes the product functions of different brands and categories to form a "standard physical model", which makes it easier for all parties to describe, control and understand product functions in a unified language.
[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0105] Based on the same inventive concept, the embodiment of the present application also provides a product testing device for implementing the product testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more product testing device embodiments provided below can refer to the limitations on the product testing method above, and will not be repeated here.
[0106] See also Figure 5 , Figure 5 Schematic diagram of a product testing device provided in an embodiment of the present application. Figure 5 As shown, the product testing device may include but is not limited to: a test task allocation module 501, a sending module 502, a receiving module 503, and a processing module 504. Among them:
[0107] A test task allocation module 501 is used to allocate test tasks for multiple devices under test to multiple coroutines, wherein each coroutine is associated with one device under test;
[0108] The sending module 502 is used to send a test instruction to the device under test associated with the coroutine through each coroutine, where the test instruction is used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0109] The receiving module 503 is used to receive multimedia data and functional data from each device under test through each coroutine;
[0110] The processing module 504 is used to send the multimedia data of each device under test to the multimedia test program through each coroutine, and process the multimedia data of each device under test through the multimedia test program to generate a multimedia test report for multiple devices under test; and, through each coroutine, aggregate the functional data of each device under test to the main thread, and generate a functional test report for multiple devices under test through the main thread; wherein the multimedia test program and the coroutine are developed using different programming languages.
[0111] In one embodiment, the multimedia data includes video data and audio data; when the processing module 504 is used to process the multimedia data of each device under test through a multimedia test program to generate a multimedia test report for multiple devices under test, it is specifically used to: decode the video data and audio data of each device under test through a multimedia test program to obtain M video frames and N audio samples; detect each video frame and each audio sample through the multimedia test program to obtain a multimedia test result of the device under test; and generate a multimedia test report for multiple devices under test based on the multimedia test results of multiple devices under test through the multimedia test program.
[0112] In one embodiment, when the processing module 504 is used to detect each video frame and each audio sample through a multimedia test program to obtain the multimedia test results of the device under test, it is specifically used to: detect the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame through the multimedia test program to obtain multiple video detection results, and determine the video test results of the device under test based on the multiple video detection results; and, detect the sampling rate, audio quality and synchronization rate of each audio sample with the video frame through the multimedia test program to obtain multiple audio detection results, and determine the audio test results of the device under test based on the multiple audio detection results; determine the multimedia test results of the device under test based on the video test results and the audio test results through the multimedia test program.
[0113] In one embodiment, before the test task assignment module 501 assigns the test tasks for multiple devices under test to multiple coroutines, the receiving module 503 is also used to receive a product test request from the client, and the product test request includes test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on the user interface input, and the user interface is generated in a responsive layout manner.
[0114] In one embodiment, the processing module 504 is further used to convert multimedia test reports for multiple devices under test into structured test reports through a multimedia test program; the sending module 502 is further used to send the structured test report to the client.
[0115] In one embodiment, the sending module 502 is further configured to send functional test reports for multiple devices under test to the client through the main thread.
[0116] In an exemplary embodiment, the present application provides an electronic device, which may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface and the input device are connected to the system bus via the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, it is implemented Figure 2 or Figure 3 Product testing methods shown.
[0117] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0118] In an exemplary embodiment, the present application provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0119] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0120] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0121] Receive multimedia data and functional data from each device under test through each coroutine;
[0122] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0123] In one embodiment, the multimedia data includes video data and audio data; when the processor executes a computer program to process the multimedia data of each device under test through a multimedia test program and generate a multimedia test report for multiple devices under test, the following steps are specifically implemented: for each device under test, the video data and audio data are decoded and processed respectively through the multimedia test program to obtain M video frames and N audio samples; each video frame and each audio sample are detected through the multimedia test program to obtain a multimedia test result of the device under test; and a multimedia test report for multiple devices under test is generated based on the multimedia test results of multiple devices under test through the multimedia test program.
[0124] In one embodiment, when the processor executes a computer program to detect each video frame and each audio sample through a multimedia test program to obtain a multimedia test result of the device under test, the following steps are specifically implemented: through the multimedia test program, the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame are detected to obtain multiple video detection results, and based on the multiple video detection results, the video test result of the device under test is determined; and, through the multimedia test program, the sampling rate, audio quality and synchronization rate of each audio sample with the video frame are detected to obtain multiple audio detection results, and based on the multiple audio detection results, the audio test result of the device under test is determined; through the multimedia test program, the multimedia test result of the device under test is determined based on the video test results and the audio test results.
[0125] In one embodiment, before the processor executes a computer program to implement assigning test tasks for multiple devices under test to multiple coroutines, it also implements the following steps: receiving a product test request from a client, the product test request including test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on user interface input, and the user interface is generated in a responsive layout manner.
[0126] In one embodiment, when the processor executes the computer program, the following steps are further implemented: converting multimedia test reports for multiple devices under test into structured test reports through the multimedia test program; and sending the structured test reports to the client.
[0127] In one embodiment, when the processor executes the computer program, the following steps are further implemented: sending functional test reports for multiple devices under test to the client through the main thread.
[0128] In an exemplary embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0129] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0130] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0131] Receive multimedia data and functional data from each device under test through each coroutine;
[0132] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0133] In one embodiment, the multimedia data includes video data and audio data; when the computer program is executed by the processor to process the multimedia data of each device under test through a multimedia test program and generate a multimedia test report for multiple devices under test, the following steps are specifically implemented: for the video data and audio data of each device under test, the video data and audio data are decoded and processed respectively through the multimedia test program to obtain M video frames and N audio samples; each video frame and each audio sample are detected through the multimedia test program to obtain a multimedia test result of the device under test; and a multimedia test report for multiple devices under test is generated based on the multimedia test results of multiple devices under test through the multimedia test program.
[0134] In one embodiment, when a computer program is executed by a processor to detect each video frame and each audio sample through a multimedia test program and obtain a multimedia test result of the device under test, the following steps are specifically implemented: through the multimedia test program, the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame are detected to obtain multiple video detection results, and based on the multiple video detection results, the video test result of the device under test is determined; and, through the multimedia test program, the sampling rate, audio quality and synchronization rate of each audio sample with the video frame are detected to obtain multiple audio detection results, and based on the multiple audio detection results, the audio test result of the device under test is determined; through the multimedia test program, the multimedia test result of the device under test is determined based on the video test results and the audio test results.
[0135] In one embodiment, before the computer program is executed by the processor to assign the test tasks for multiple devices under test to multiple coroutines, the following steps are also implemented: receiving a product test request from a client, the product test request includes test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on user interface input, and the user interface is generated using a responsive layout.
[0136] In one embodiment, the computer program is executed by the processor to further implement the following steps: converting multimedia test reports for multiple devices under test into structured test reports through the multimedia test program; and sending the structured test reports to the client.
[0137] In one embodiment, the computer program is executed by the processor to further implement the following steps: sending functional test reports for multiple devices under test to the client through the main thread.
[0138] In an exemplary embodiment, the present application provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0139] Assigning test tasks for multiple devices under test to multiple coroutines, where each coroutine is associated with one device under test;
[0140] Sending a test instruction to the device under test associated with the coroutine through each coroutine, the test instruction being used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test;
[0141] Receive multimedia data and functional data from each device under test through each coroutine;
[0142] Through each coroutine, the multimedia data of each device under test is sent to the multimedia test program, and the multimedia test program is used to process the multimedia data of each device under test to generate a multimedia test report for multiple devices under test; and, through each coroutine, the functional data of each device under test is aggregated to the main thread, and the main thread is used to generate a functional test report for multiple devices under test; wherein the multimedia test program and the coroutine are developed in different programming languages.
[0143] In one embodiment, the multimedia data includes video data and audio data; when the computer program is executed by the processor to process the multimedia data of each device under test through a multimedia test program and generate a multimedia test report for multiple devices under test, the following steps are specifically implemented: for the video data and audio data of each device under test, the video data and audio data are decoded and processed respectively through the multimedia test program to obtain M video frames and N audio samples; each video frame and each audio sample are detected through the multimedia test program to obtain a multimedia test result of the device under test; and a multimedia test report for multiple devices under test is generated based on the multimedia test results of multiple devices under test through the multimedia test program.
[0144] In one embodiment, when a computer program is executed by a processor to detect each video frame and each audio sample through a multimedia test program and obtain a multimedia test result of the device under test, the following steps are specifically implemented: through the multimedia test program, the frame rate, resolution, picture quality of each video frame and the motion state of the object in the video frame are detected to obtain multiple video detection results, and based on the multiple video detection results, the video test result of the device under test is determined; and, through the multimedia test program, the sampling rate, audio quality and synchronization rate of each audio sample with the video frame are detected to obtain multiple audio detection results, and based on the multiple audio detection results, the audio test result of the device under test is determined; through the multimedia test program, the multimedia test result of the device under test is determined based on the video test results and the audio test results.
[0145] In one embodiment, before the computer program is executed by the processor to assign the test tasks for multiple devices under test to multiple coroutines, the following steps are also implemented: receiving a product test request from a client, the product test request includes test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on user interface input, and the user interface is generated using a responsive layout.
[0146] In one embodiment, the computer program is executed by the processor to further implement the following steps: converting multimedia test reports for multiple devices under test into structured test reports through the multimedia test program; and sending the structured test reports to the client.
[0147] In one embodiment, the computer program is executed by the processor to further implement the following steps: sending functional test reports for multiple devices under test to the client through the main thread.
[0148] It should be noted that the data involved in this application (including but not limited to multimedia test data, target function test data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0149] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0150] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0151] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A product testing method, characterized in that: The method comprises: Allocating test tasks for multiple devices under test to multiple coroutines, wherein each coroutine is associated with one device under test; Sending a test instruction to the device under test associated with the coroutine through each of the coroutines, wherein the test instruction is used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test; Receiving multimedia data and functional data from each of the devices under test through each of the coroutines; Through each of the coroutines, the multimedia data of each of the devices under test are sent to the multimedia test program, and through the multimedia test program, the multimedia data of each of the devices under test are processed to generate a multimedia test report for multiple devices under test; and, through each of the coroutines, the functional data of each of the devices under test are aggregated to the main thread, and through the main thread, a functional test report for multiple devices under test is generated; wherein the multimedia test program and the coroutines are developed in different programming languages.
2. The method according to claim 1, characterized in that: The multimedia data includes video data and audio data; the multimedia data of each device under test is processed by the multimedia test program to generate a multimedia test report for multiple devices under test, including: For each of the video data and audio data of the device under test, respectively decode the video data and audio data through the multimedia test program to obtain M video frames and N audio samples; Through the multimedia test program, each of the video frames and each of the audio samples are tested to obtain a multimedia test result of the device under test; Through the multimedia test program, a multimedia test report for multiple devices under test is generated based on the multimedia test results of multiple devices under test.
3. The method according to claim 2, characterized in that By means of the multimedia test program, each of the video frames and each of the audio samples are tested to obtain a multimedia test result of the device under test, including: By means of the multimedia test program, the frame rate, resolution, picture quality of each of the video frames and the motion state of the object in the video frame are detected to obtain a plurality of video detection results, and based on the plurality of video detection results, the video test result of the device under test is determined; and, By means of the multimedia test program, the sampling rate, the audio quality and the synchronization rate between the audio sample and the video frame of each audio sample are detected to obtain a plurality of audio detection results, and based on the plurality of audio detection results, the audio test result of the device under test is determined; The multimedia test result of the device under test is determined through the multimedia test program based on the video test result and the audio test result.
4. The method according to any one of claims 1 to 3, characterized in that: Before assigning the test tasks for the multiple devices under test to the multiple coroutines, the method further includes: A product test request is received from a client, wherein the product test request includes test tasks for multiple devices under test; the product test request is determined after the client detects a user operation based on a user interface input, and the user interface is generated in a responsive layout manner.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Through multimedia test procedures, multimedia test reports for multiple devices under test are converted into structured test reports; The structured test report is sent to the client.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The functional test report for the multiple devices under test is sent to the client through the main thread.
7. A product testing device, characterized in that: The device comprises: A test task allocation module, used to allocate test tasks for multiple devices under test to multiple coroutines, wherein each of the coroutines is associated with a device under test; A sending module, used to send a test instruction to a device under test associated with each coroutine through each coroutine, wherein the test instruction is used to instruct the device under test to obtain multimedia data and functional data; the functional data includes media functional data and / or network functional data of the device under test; A receiving module, used for receiving multimedia data and functional data from each of the devices under test through each of the coroutines; A processing module is used to send the multimedia data of each device under test to a multimedia test program through each of the coroutines, and process the multimedia data of each device under test through the multimedia test program to generate a multimedia test report for multiple devices under test; and, through each of the coroutines, aggregate the functional data of each device under test to a main thread, and generate a functional test report for multiple devices under test through the main thread; wherein the multimedia test program and the coroutines are developed in different programming languages.
8. An electronic device, characterized in that: include: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
