Automated testing method and device, server and storage medium

Through automated testing methods and devices, simulated test scenarios and control terminal equipment are built, which solves the problem of manual search for appearance and low efficiency, and achieves efficient and stable camera picture quality evaluation.

CN114363602BActive Publication Date: 2024-12-31BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011086941.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-12
Publication Date
2024-12-31
Estimated Expiration
2040-10-12

AI Technical Summary

Technical Problem

During the development of terminal products, the quality of camera photo pictures needs to be reviewed. The existing methods require manual search and shooting of specific outdoor scenes. They are inefficient and greatly affected by external conditions, resulting in poor labor consumption and stability.

Method used

Provide an automated testing method and device, receive test task information through the server, build test scenes, and send operating instructions to the test terminal according to the task parameters, including image acquisition tasks, use environmental adjustment equipment and set equipment to simulate different scenes, and automatically shoot and Evaluate image quality.

Benefits of technology

Save manpower, improve testing efficiency, ensure the stability of the test scene, and improve the efficiency and reliability of image quality evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114363602B_ABST
    Figure CN114363602B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an automated testing method and device, a server and a storage medium. The method comprises: receiving test task information; wherein the test task information comprises scenario setting parameters and task parameters; building a test scenario based on the scenario setting parameters; sending an operation instruction to a test terminal located in the built test scenario according to the task parameters; and detecting the execution result of the operation instruction executed by the test terminal. Through this method, the test efficiency and the reliability of the test can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic technology, and in particular to an automated testing method and device, a server, and a storage medium. Background Art

[0002] At present, in the process of terminal product development, it is necessary to review the quality of camera pictures, and evaluate the product camera stability and picture quality from different picture quality dimensions, such as reviewing the picture quality of Xiaomi or competing products from the perspectives of blur, exposure, white balance, etc. In order to provide a large number of high-quality and representative picture materials for picture quality review, special testers are needed to find scenes that can produce specific effects, including but not limited to buildings with specific background colors, people's clothing, seascapes, backlights, daytime, night, morning, etc.

[0003] In the above solution, testers need to spend a lot of time to find qualified outdoor scenes near the company, and take photos at a specific time, in a specific weather, and under specific outdoor conditions to obtain image quality evaluation materials. After taking photos, they need to sort out the materials taken by Xiaomi and the comparison machine and conduct image quality evaluation. This implementation method is inefficient, requires a lot of manpower, and the project is greatly affected by the outdoor scene conditions. Summary of the invention

[0004] The present invention provides an automated testing method and device, a server and a storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an automated testing method, which is applied to a server and includes:

[0006] Receive test task information; wherein the test task information includes scene setting parameters and task parameters;

[0007] Setting parameters based on the scenario and building a test scenario;

[0008] Sending an operation instruction to a test terminal located in the constructed test scenario according to the task parameters;

[0009] Detecting the execution result of the test terminal executing the operation instruction.

[0010] Optionally, the test task includes an image acquisition task; the test scenario is: an image acquisition scenario; the operation instruction includes an image acquisition instruction;

[0011] The detecting the execution result of the operation instruction executed by the test terminal includes:

[0012] Performing image quality assessment on the images captured by the test terminal.

[0013] Optionally, the scene setting parameters include: a device identifier of an environment building device and a first working parameter of the environment building device;

[0014] The step of setting parameters based on the scenario and building a test scenario includes:

[0015] Determine the environment construction equipment for constructing the test scenario according to the equipment identification;

[0016] Control the environment building device to operate with the first working parameter.

[0017] Optionally, the environment building equipment includes at least one of the following:

[0018] A scenery device, used for constructing a scenery in the space where the test scene is located;

[0019] Environmental conditioning equipment, used to provide the test environment required by the test scenario;

[0020] A displacement device is used to adjust the position of the test terminal in the test scene.

[0021] Optionally, the environmental conditioning device includes at least one of the following:

[0022] Lighting adjustment equipment, used to provide the lighting environment required by the test environment;

[0023] Temperature regulating equipment, used to provide the temperature environment required by the test environment;

[0024] Humidity regulating equipment, used to provide the humidity environment required by the test environment;

[0025] The air pressure regulating device is used to provide the air pressure environment required by the test environment.

[0026] Optionally, the first operating parameter of the light adjustment device includes at least one of the following:

[0027] Lighting brightness;

[0028] lighting angle;

[0029] Lighting chromaticity.

[0030] Optionally, sending an operation instruction to a test terminal located in the constructed test scenario according to the task parameter includes:

[0031] Sending a driving instruction to the displacement device according to the task parameters; wherein the driving instruction is used to drive the displacement device to move so as to drive the test terminal to move to a predetermined position of the test scene;

[0032] The operation instruction is sent to a test terminal located at the predetermined position in the test scenario.

[0033] Optionally, the environment building device further includes a photographing device, and sending a driving instruction to the displacement device according to the task parameter includes:

[0034] Sending a capture instruction to the camera device to capture an image of the environment where the test terminal is located;

[0035] Receiving the image returned by the photographing device;

[0036] Analyzing the image to determine a position of a test target of the test terminal in the image;

[0037] Determining, according to the position of the test target in the image, the predetermined position at which the test terminal performs testing on the test target in the test scene;

[0038] A drive instruction carrying the predetermined position is sent to the displacement device.

[0039] Optionally, the task parameters include:

[0040] Function ID, used to indicate the function to be tested;

[0041] Test item identifier, used to indicate the test item of the function to be tested.

[0042] Optionally, the image acquisition task includes:

[0043] Portrait collection;

[0044] Night scene collection;

[0045] Seascape collection;

[0046] Still scene collection;

[0047] Dynamic scene collection;

[0048] Far focus acquisition;

[0049] Wide-angle acquisition;

[0050] Macro collection.

[0051] Optionally, the task parameter includes a second working parameter when the test terminal executes the operation instruction;

[0052] The sending of an operation instruction to a test terminal located in the established test scenario includes:

[0053] The operation instruction carrying the second working parameter is sent to the test terminal located in the established test scenario.

[0054] Optionally, the second operating parameter includes at least one of the following:

[0055] Focus parameters;

[0056] White balance parameters;

[0057] Sensitivity parameters.

[0058] According to a second aspect of an embodiment of the present disclosure, there is provided an automated testing device, which is applied to a server and includes:

[0059] A receiving module, configured to receive test task information; wherein the test task information includes scene setting parameters and task parameters;

[0060] A building module, configured to set parameters based on the scenario and build a test scenario;

[0061] A sending module, configured to send an operation instruction to a test terminal located in the constructed test scenario according to the task parameters;

[0062] The detection module is configured to detect the execution result of the test terminal executing the operation instruction.

[0063] Optionally, the scene setting parameters include: a device identifier of an environment building device and a first working parameter of the environment building device;

[0064] The construction module is specifically configured to determine the environment construction device for constructing the test scenario according to the device identifier; and control the environment construction device to operate with the first working parameters.

[0065] Optionally, the environment building equipment includes at least one of the following:

[0066] A scenery device, used for constructing a scenery in the space where the test scene is located;

[0067] Environmental conditioning equipment, used to provide the test environment required by the test scenario;

[0068] A displacement device is used to adjust the position of the test terminal in the test scene.

[0069] Optionally, the environmental conditioning device includes at least one of the following:

[0070] Lighting adjustment equipment, used to provide the lighting environment required by the test environment;

[0071] Temperature regulating equipment, used to provide the temperature environment required by the test environment;

[0072] Humidity regulating equipment, used to provide the humidity environment required by the test environment;

[0073] The air pressure regulating device is used to provide the air pressure environment required by the test environment.

[0074] Optionally, the first operating parameter of the light adjustment device includes at least one of the following:

[0075] Lighting brightness;

[0076] lighting angle;

[0077] Lighting chromaticity.

[0078] Optionally, the sending module is specifically configured to send a driving instruction to the displacement device according to the task parameters; wherein the driving instruction is used to drive the displacement device to move so as to drive the test terminal to move to a predetermined position of the test scene; and send the operation instruction to the test terminal located at the predetermined position in the test scene.

[0079] Optionally, the environment building equipment also includes a camera.

[0080] The sending module is specifically configured to send a capture instruction to the camera device to capture an image of the environment where the test terminal is located; receive the image returned by the camera device; analyze the image to determine the position of the test target of the test terminal in the image; determine the predetermined position at which the test terminal tests the test target in the test scene based on the position of the test target in the image; and send a driving instruction carrying the predetermined position to the displacement device.

[0081] Optionally, the task parameters include:

[0082] Function ID, used to indicate the function to be tested;

[0083] Test item identifier, used to indicate the test item of the function to be tested.

[0084] Optionally, the image acquisition task includes:

[0085] Portrait collection;

[0086] Night scene collection;

[0087] Seascape collection;

[0088] Still scene collection;

[0089] Dynamic scene collection;

[0090] Far focus acquisition;

[0091] Wide-angle acquisition;

[0092] Macro collection.

[0093] Optionally, the task parameter includes a second working parameter when the test terminal executes the operation instruction;

[0094] The sending module is specifically configured to send the operation instruction carrying the second working parameter to the test terminal located in the established test scenario.

[0095] Optionally, the second operating parameter includes at least one of the following:

[0096] Focus parameters;

[0097] White balance parameters;

[0098] Sensitivity parameters.

[0099] According to a third aspect of an embodiment of the present disclosure, there is provided an automated testing system, including a server, a test terminal and an environment building device; wherein:

[0100] The server is used to receive test task information; based on the scenario setting parameters in the test task information, send a construction instruction to the environment construction device, and send an operation instruction to the test terminal according to the task parameters in the test task information;

[0101] The environment building device is used to build the test scene according to the building instruction;

[0102] The test terminal has a communication connection with the server, and is used to execute the operation instruction in the constructed test scenario according to the operation instruction and return the test result to the server.

[0103] Optionally, the scene setting parameter includes a first working parameter of the environment building device;

[0104] The environment building device is used to receive the building instruction carrying the first working parameter sent by the server based on the Arduino hardware interface.

[0105] Optionally, the server and the environment building device perform remote communication based on Web services.

[0106] Optionally, the environment building equipment includes a displacement device,

[0107] The server is further used to send a driving instruction to the displacement device according to the task parameters;

[0108] The displacement device is used to drive the test terminal to move to a predetermined position of the test scene according to the driving instruction.

[0109] Optionally, the test task includes an image acquisition task, and the environment building equipment also includes a camera.

[0110] The server is further configured to send a capture instruction to the camera device to capture an image of the environment where the test terminal is located;

[0111] The photographing device is used to collect an image of the environment where the test terminal is located according to the collection instruction and send it to the server;

[0112] The server is used to analyze the image and determine the position of the shooting target of the test terminal in the image; determine the predetermined position for the test terminal to shoot the shooting target in the test scene according to the position of the shooting target in the image, and send a driving instruction carrying the predetermined position to the displacement device.

[0113] According to a fourth aspect of an embodiment of the present disclosure, a server is provided, including:

[0114] processor;

[0115] a memory for storing processor-executable instructions;

[0116] Wherein, the processor is configured to execute the automated testing method as described in the first aspect above.

[0117] According to a fifth aspect of an embodiment of the present disclosure, there is provided a storage medium, including:

[0118] When the instructions in the storage medium are executed by the processor of the server, the server is enabled to execute the automated testing method as described in the first aspect above.

[0119] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0120] In an embodiment of the present disclosure, the server builds a test scene according to the scene setting parameters included in the received test task information, so that the test terminal can work according to the task parameters included in the test task information under the built test scene. On the one hand, there is no need to spend manpower to find external scenes and manually operate the test terminals to perform test tasks, thereby saving manpower and improving test efficiency; on the other hand, because the test scene is formed by instructions to make the device work in a certain state according to the scene setting parameters, it is more stable than the natural scene in the outside world, thereby improving the reliability of the test.

[0121] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0122] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0123] Figure 1 It is a flow chart of an automated testing method shown in an embodiment of the present disclosure.

[0124] Figure 2 It is a structural diagram of an automated testing system in an embodiment of the present disclosure.

[0125] Figure 3 This is an example diagram of an Arduino program in an environment building device in an embodiment of the present disclosure.

[0126] Figure 4 It is an example graph showing the gradient vector, azimuth angle, and edge direction of the center point.

[0127] Figure 5 This is an example of non-maximum suppression.

[0128] Figure 6 It is a system topology diagram.

[0129] Figure 7 This is a system architecture diagram of an unmanned photography scene laboratory in a cloud distributed system.

[0130] Figure 8 The figure is a diagram of an automated testing device according to an exemplary embodiment.

[0131] Fig. 9 It is a block diagram of a server shown in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0132] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0133] Figure 1 is a flow chart of an automated testing method shown in an embodiment of the present disclosure, such as Figure 1 As shown, the automated testing method applied to the server includes the following steps:

[0134] S11, receiving test task information; wherein the test task information includes scene setting parameters and task parameters;

[0135] S12, setting parameters based on the scenario and building a test scenario;

[0136] S13. Sending an operation instruction to a test terminal located in the constructed test scenario according to the task parameters;

[0137] S14: Detect the execution result of the test terminal executing the operation instruction.

[0138] In an embodiment of the present disclosure, an automated testing method is applied to a server. In step S11, the server may receive test task information, which is set by a technician, and the test task information includes scene setting parameters and task parameters. The scene setting parameters include the device identifier and the working parameters of the device required to execute the scene environment corresponding to the test task, and the task parameters refer to the working parameters corresponding to the test terminal when executing the test task.

[0139] For example, the test tasks include image acquisition tasks, voice acquisition tasks, or network test tasks. Taking the image acquisition task as an example, the scene setting parameters may include the identification of the lighting device and the corresponding lighting brightness, and may also include the identification of the acquisition target. Taking the voice acquisition task as an example, the scene setting parameters may include the device identification of the voice blocking device during voice acquisition and the orientation of the voice blocking device, and may also include the voice intensity parameters of the voice pronunciation device. Taking the network test task as an example, the scene setting parameters may include the identification of the network signal transmitting device, the working network type, and the network signal transmission intensity parameters.

[0140] In step S12, the server can build a test scene based on the scene setting parameters in the test task information. It should be noted that in the embodiment of the present disclosure, when the server builds the test scene, it sends instructions to each device in the test scene according to the scene setting parameters, so that each device in the test scene works with the corresponding scene setting parameters.

[0141] In step S13, after the test scene is set up, an operation instruction can be sent to the test terminal in the test scene according to the task parameters, so that the test terminal can work according to the task parameters. Among them, the test terminal can be an electronic device such as a smart phone, a tablet computer, and a smart speaker, and the task parameters may include an instruction on which test function the test terminal is to perform. For example, it is a test of performing an image acquisition function, a test of a voice acquisition function, or a test of a network function. In addition, the task parameters may also include working parameters for the test terminal to perform the corresponding function. For example, the focus parameters, white balance parameters, and sensitivity parameters of the test terminal when performing the image acquisition function.

[0142] In step S14, the server can detect the execution result of the test terminal executing the operation instruction, so that the execution result can be saved for manual analysis, or the server can perform automatic analysis, etc. It should be noted that the server can detect the execution result of the test terminal executing the operation instruction because the test terminal will upload the execution result to the server after executing the operation instruction, so that the server can detect it.

[0143] In one embodiment, when the terminal product needs to be tested, it is necessary to manually find the external scene and manually operate the terminal to perform the test task. This requires a lot of manpower, is inefficient, and the external scene found manually may be unstable, so that the test cannot be performed as expected.

[0144] It can be understood that in the embodiments of the present disclosure, the server builds a test scene according to the scene setting parameters included in the received test task information, so that the test terminal can work according to the task parameters included in the test task information under the built test scene. On the one hand, there is no need to spend manpower to find external scenes and manually operate the test terminal to perform test tasks, thereby saving manpower and improving test efficiency; on the other hand, because the test scene is formed by instructions to make the device work in a certain state according to the scene setting parameters, it is more stable than the natural scene in the outside world, thereby improving the reliability of the test.

[0145] In one embodiment, the test task includes an image acquisition task; the test scenario is: an image acquisition scenario; the operation instruction includes an image acquisition instruction;

[0146] The detecting the execution result of the operation instruction executed by the test terminal includes:

[0147] Performing image quality assessment on the images captured by the test terminal.

[0148] In this embodiment, the test task includes an image acquisition task, the test scene is an image acquisition scene, and correspondingly, the operation instruction executed by the test terminal is an image acquisition instruction. After the server sends the image acquisition instruction to the test terminal, the test terminal will upload the acquired image to the server, and after receiving it, the server can evaluate the image quality of the image acquired by the test terminal.

[0149] In one embodiment, after completing image acquisition, the test terminal usually performs image quality assessment manually. This method is inefficient and time-consuming to evaluate image quality. The server disclosed in the present invention can automatically evaluate the image quality of the image acquired by the test terminal, for example, based on artificial intelligence, to complete the image quality assessment and generate a report. It can be understood that this method greatly improves the test efficiency.

[0150] In one embodiment, the image acquisition task includes:

[0151] Portrait collection;

[0152] Night scene collection;

[0153] Seascape collection;

[0154] Still scene collection;

[0155] Dynamic scene collection;

[0156] Far focus acquisition;

[0157] Wide-angle acquisition;

[0158] Macro collection.

[0159] In this embodiment, after receiving the above image acquisition tasks including portrait acquisition, night scene acquisition, seascape acquisition, etc., the server can set up the test scene based on the corresponding scene setting parameters.

[0160] In one embodiment, the scene setting parameters include: a device identification of an environment building device and a first working parameter of the environment building device;

[0161] The step of setting parameters based on the scenario and building a test scenario includes:

[0162] Determine the environment construction equipment for constructing the test scenario according to the equipment identification;

[0163] Control the environment building device to operate with the first working parameter.

[0164] In an embodiment of the present disclosure, the scene setting parameters include a device identification of an environment construction device and a first working parameter of the environment construction device. The environment construction device is a lighting device, a voice pronunciation device, and a network signal transmitting device as described above. The server of the present disclosure can determine the environment construction device for building the test scene according to the device identification, and send a control signal to the environment construction device corresponding to the device identification to control the environment construction device to operate with the first working parameter.

[0165] In one embodiment, the environment construction equipment includes at least one of the following:

[0166] Scenery equipment, used to build scenery in the space where the test scene is located;

[0167] Environmental conditioning equipment, used to provide the test environment required by the test scenario;

[0168] A displacement device is used to adjust the position of the test terminal in the test scene.

[0169] In an embodiment of the present disclosure, the environment construction device may include a scenery device for constructing scenery in the space where the test scene is located. For example, for an image acquisition scene, the scenery device may be a device for constructing a building with a specific background color or a specific type of person, or a device for constructing a sea view, sunlight, or rainy scene.

[0170] The environment setting device may include an environment adjustment device for providing a test environment required for a test scenario. In one embodiment of the present disclosure, the environment adjustment device includes at least one of the following:

[0171] Lighting adjustment equipment, used to provide the lighting environment required by the test environment;

[0172] Temperature regulating equipment, used to provide the temperature environment required by the test environment;

[0173] Humidity regulating equipment, used to provide the humidity environment required by the test environment;

[0174] The air pressure regulating device is used to provide the air pressure environment required by the test environment.

[0175] In this embodiment, the environment setting device may include a light adjustment device, a temperature adjustment device, a humidity adjustment device, and an air pressure adjustment device. For example, in an image acquisition scenario, the light adjustment device is used to provide a daytime or nighttime environment required for the test terminal to perform an image acquisition task; the temperature adjustment device, the humidity adjustment device, and the air pressure adjustment device are used to provide the test terminal with a special temperature environment, humidity environment, and air pressure environment required for performing an image acquisition task.

[0176] The environment building equipment may also include a displacement device that can adjust the position of the test terminal in the test scene, and the displacement device may be a slide rail or a robot. For example, in an image acquisition scene, the test terminal needs to take a picture of the acquisition target "children", so the displacement device is needed to move the test terminal to a position where the "children" can be acquired.

[0177] In one embodiment, the first operating parameter of the light adjustment device includes at least one of the following:

[0178] Lighting brightness;

[0179] lighting angle;

[0180] Lighting chromaticity.

[0181] In the embodiments of the present disclosure, different lighting brightness, lighting angles and lighting chromaticity of the lighting adjustment device may affect the test environment. For example, in an image acquisition scenario, different lighting brightness, lighting angles and lighting chromaticity of the lighting adjustment device may have a certain impact on the image acquired by the test terminal.

[0182] In one embodiment, step S13 includes:

[0183] Sending a driving instruction to the displacement device according to the task parameters; wherein the driving instruction is used to drive the displacement device to move so as to drive the test terminal to move to a predetermined position of the test scene;

[0184] The operation instruction is sent to a test terminal located at the predetermined position in the test scenario.

[0185] In this embodiment, as described above, the server can adjust the position of the test terminal in the test scene through the displacement device. Specifically, the server will send a driving instruction to the displacement device according to the task parameters, such as the position of the acquisition target indicated in the task parameters, so as to drive the displacement device to drive the test terminal to move to a predetermined position where the acquisition target can be acquired. After the test terminal moves to the predetermined position, the server can send an operation instruction to the test terminal located at the predetermined position in the test scene.

[0186] It should be noted that, in one embodiment of the present disclosure, the server may store the correspondence between the task parameters and the predetermined positions. Based on the pre-stored correspondence, the server can search for the corresponding predetermined position after receiving the task parameters to send a driving instruction to the displacement device, so that the displacement device drives the test terminal to move to the predetermined position of the test scene.

[0187] In another embodiment of the present disclosure, the environment building device further includes a photographing device, and sending a driving instruction to the displacement device according to the task parameter includes:

[0188] Sending a capture instruction to the camera device to capture an image of the environment where the test terminal is located;

[0189] Receiving the image returned by the photographing device;

[0190] Analyzing the image to determine a position of a test target of the test terminal in the image;

[0191] Determining, according to the position of the test target in the image, the predetermined position at which the test terminal performs testing on the test target in the test scene;

[0192] A drive instruction carrying the predetermined position is sent to the displacement device.

[0193] In this embodiment, the server can also determine the predetermined position of the test terminal in the test scene to test the test target based on image analysis. Specifically, the environment setting device also includes a camera device, and the server can send a capture instruction to the camera device to capture an image of the environment where the test terminal is located, and receive the image returned by the camera device, so as to analyze the image to determine the position of the test target of the test terminal in the image. By determining the position of the test target of the test terminal in the image, the position of the test target in the actual environment coordinates can be determined based on the size ratio relationship between the stored camera image and the actual environment, and further determine the predetermined position of the test terminal in the test scene to test the test target.

[0194] Taking the image acquisition task as an example, the test target can be a specific person. After the server determines the position of the specific person in the image based on the acquired image of the environment where the test terminal is located, it can determine the predetermined position for the test terminal to shoot the specific person in the image acquisition scene.

[0195] Taking the voice collection task as an example, the test target can be a voice blocking device. After the server determines the position of the voice blocking device in the image based on the collected image of the environment where the test terminal is located, it can determine the predetermined position of the test terminal when testing the voice reception situation through the voice blocking device in the voice collection scenario.

[0196] After the server determines the predetermined position of the test terminal for testing the test target in the test scene, it can send a driving instruction carrying the predetermined position to the displacement device, so that the displacement device moves to drive the test terminal to move to the predetermined position of the test scene.

[0197] In one embodiment, the task parameters include:

[0198] Function ID, used to indicate the function to be tested;

[0199] Test item identifier, used to indicate the test item of the function to be tested.

[0200] In an embodiment of the present disclosure, the task parameter may include a function identifier indicating the function to be tested, and may also include a test item identifier indicating a test item of the function to be tested.

[0201] For example, the function identifier "1" indicates an image acquisition function test, "11" indicates a person acquisition test, "12" indicates a seascape acquisition test, etc. The function identifier "2" indicates a network function test, "21" indicates a Bluetooth network, and "22" indicates a wireless network (Wireless Fidelity, Wi-Fi), etc.

[0202] In one embodiment, the task parameter includes a second working parameter when the test terminal executes the operation instruction;

[0203] The sending of an operation instruction to a test terminal located in the established test scenario includes:

[0204] The operation instruction carrying the second working parameter is sent to the test terminal located in the established test scenario.

[0205] In an embodiment of the present disclosure, the task parameters also include a second working parameter when the test terminal executes the operation instruction. Taking the image acquisition task as an example, in one embodiment, the second working parameter includes at least one of the following:

[0206] Focus parameters;

[0207] White balance parameters;

[0208] Sensitivity parameters.

[0209] It can be understood that the present disclosure includes the second working parameter when the test terminal executes the operation instruction in the task parameter, so that the test terminal can work with the specified parameter, thereby achieving customization and greater flexibility.

[0210] Figure 2 is a structural diagram of an automated testing system in an embodiment of the present disclosure, such as Figure 2 The automated testing system includes a server 201, a test terminal 202 and an environment building device 203; wherein,

[0211] The server 201 is used to receive test task information; based on the scene setting parameters in the test task information, send a construction instruction to the environment construction device 203, and send an operation instruction to the test terminal 202 according to the task parameters in the test task information;

[0212] The environment building device 203 is in communication connection with the server 201 and is used to build a test scenario according to the building instruction;

[0213] The test terminal 202 is in communication connection with the server 201 , and is used to execute the operation instruction in the constructed test scenario according to the operation instruction and return the test result to the server 201 .

[0214] In this embodiment, the server 201 establishes communication connections with the test terminal 202 and the environment construction device 203 respectively, so that the environment construction device 203 can build a test scenario based on the construction instructions sent by the server, and the test terminal 202 can execute operation instructions in the constructed test scenario based on the operation instructions sent by the server and return the test results to the server 201.

[0215] It can be understood that in the embodiments of the present disclosure, the server sends a construction instruction to the environment construction device according to the scene setting parameters included in the received test task information so that the environment construction device builds the test scene, so that the test terminal can work according to the operation instructions sent by the server under the constructed test scene. On the one hand, there is no need to spend manpower to find the external scene and manually operate the test terminal to perform the test task, thereby saving manpower and improving the test efficiency; on the other hand, because the test scene is formed in the form of instructions to make the environment construction device work in a certain state according to the scene setting parameters, it is more stable than the natural scene in the outside world, thereby improving the reliability of the test.

[0216] In one embodiment, the scene setting parameter includes a first operating parameter of the environment building device;

[0217] The environment building device 203 is used to receive the building instruction carrying the first working parameter sent by the server 201 based on the Arduino hardware interface.

[0218] In this embodiment, the interface in the environment building device 203 that can communicate with the server 201 can be an Arduino hardware interface. The environment building device 203 can communicate with the server 201 remotely based on a predetermined network protocol, based on the technician compiling the program in the hardware interface into a binary file and burning it into the environment building device 203 to form a microcontroller. Figure 3 This is an example diagram of an Arduino program in an environment building device in an embodiment of the present disclosure.

[0219] It should be noted that after the environment building device 203 is burned with the Arduino program, it also needs a corresponding host computer program to form a microcontroller, and the host computer program is developed based on a serial port or other communication media according to a certain logic. At the same time, the server side is integrated with an automation program that can communicate with the microcontroller to realize the call of the Arduino hardware interface, so that the environment building device 203 can be automatically built, transformed, and adjusted, so as to achieve the effect that the environment building device 203 can change the physical environment according to the needs.

[0220] For example, if the environment construction device 203 is a lighting lamp or a slide rail, the lighting lamp or the slide rail can receive a construction instruction carrying the first working parameter sent by the server 201 based on the Arduino hardware interface to achieve light brightness adjustment, slide rail movement, angle change, etc.

[0221] In one embodiment, the server 201 and the environment building device 203 perform remote communication based on Web services.

[0222] In the embodiment of the present disclosure, the server 201 and the environment building device 203 communicate remotely based on the Web service. Specifically, the client program of the environment building device 203 is integrated in the Web framework (Web service), and the server 201 controls the remote client serial port communication based on the Web framework. There is no direct relationship between the Web framework background (server 201) and the laboratory hardware (environment building device 203) operation. The method for realizing the client serial port remote communication function based on the Web framework is as follows: when the laboratory Web is accessed, the Node service is automatically installed in the client environment, and the client uses Node Js and Arduino to communicate to realize client functions such as electron, etc. The server uses JavaScript, HTML, and CSS to build cross-platform application functions, and uses implemented local services such as HTTP, WebSocket, etc. to realize hardware-related automated communication with the Web page (client).

[0223] In one embodiment, the environment construction device 203 includes a displacement device 204,

[0224] The server 201 is further used to send a driving instruction to the displacement device 204 according to the task parameters;

[0225] The displacement device 204 is used to drive the test terminal 202 to move to a predetermined position of the test scene according to the driving instruction.

[0226] In this embodiment, the server 201 can adjust the position of the test terminal 202 in the test scene through the displacement device 204. Specifically, the server will send a driving instruction to the displacement device 204 based on the task parameters, such as the position of the collection target indicated in the task parameters, to drive the displacement device 204 to move the test terminal 202 to a predetermined position where the collection target can be collected.

[0227] In one embodiment, the test task includes an image acquisition task, and the environment building device 203 also includes a camera device 205.

[0228] The server 201 is further used to send a collection instruction to the camera 205 to collect an image of the environment where the test terminal 202 is located;

[0229] The camera device 205 is used to capture an image of the environment where the test terminal 202 is located according to the capture instruction and send the image to the server 201;

[0230] The server 201 is used to analyze the image and determine the position of the shooting target of the test terminal 202 in the image; according to the position of the shooting target in the image, determine the predetermined position for the test terminal 202 to shoot the shooting target in the test scene, and send a driving instruction carrying the predetermined position to the displacement device 204.

[0231] In this embodiment, taking the image acquisition task as an example, the server 201 can also determine the predetermined position of the test terminal 202 to photograph the shooting target in the test scene based on the image analysis method. Specifically, the environment construction device 203 also includes a camera device 205, and the server 201 can send a capture instruction to the camera device 205 to capture the image of the environment where the test terminal 202 is located, and receive the image returned by the camera device 205, so as to analyze the image to determine the position of the shooting target of the test terminal 202 in the image, and further determine the predetermined position of the test terminal 202 to photograph the shooting target in the test scene.

[0232] When performing image analysis, the server 201 may use visual recognition technologies such as OpenCV. OpenCV is an Intel open source computer vision library, which consists of a series of C functions and a small number of C++ classes, and implements many general algorithms in image processing and computer vision.

[0233] In the embodiments of the present disclosure, to perform content-based image analysis, it is necessary to extract meaningful features from the image, such as contours, straight lines, spots, etc. Taking the detection of image contours as an example, the Canny operator can be used. The core concept of the Canny operator is to use two different thresholds to determine which point belongs to the contour, one is a low threshold and the other is a high threshold. When selecting the low threshold, it is necessary to ensure that it can contain all edge pixels belonging to important image contours. The specific steps are as follows:

[0234] 1. Perform Gaussian smoothing on the input image to blur the details of the image. When Gaussian smoothing averages the grayscale of pixels in the neighborhood, it gives different weights to pixels at different positions. For example, the Gaussian template of a 3*3 neighborhood is shown. The closer the position on the template is to the center of the neighborhood, the higher its weight. The significance of arranging the weights in this way is that when using this template for image smoothing, while blurring the details of the image, more of the overall grayscale distribution characteristics of the image can be retained.

[0235] 2. Calculate the gradient amplitude and direction to estimate the edge strength and direction of each point. The templates that can be used include the Sobel operator, Prewitt operator, Roberts template, etc. Take the Sobel operator as an example, as shown in the following formulas (1)-(3), using the Sobel level operator Sobel Xand vertical operator Sobel Y Convolve with the input image f(x,y) to calculate dx, dy:

[0236]

[0237]

[0238] d X =f(x,y)*Sobel X (x,y) d y =f(x,y)*Sobel y (x,y) (3)

[0239] The image gradient amplitude M(x,y) can be further obtained as follows:

[0240]

[0241] Figure 4 is an example graph showing the gradient vector, azimuth angle, and edge direction of the center point. Figure 4 As shown, the edge direction of any point is orthogonal to the gradient direction.

[0242] 3. According to the gradient direction, non-maximum suppression is performed on the gradient amplitude.

[0243] Assume that in a 3*3 region, the edge can be divided into four directions: vertical, horizontal, 45°, and 135°. Similarly, the gradient direction is also divided into four directions (orthogonal to the edge direction). Figure 5 This is an example of non-maximum suppression. Figure 5 As shown in the figure, all possible directions are quantized into 4 directions. The quantization can be summarized as follows: horizontal edge-gradient direction is vertical; 135° edge-gradient direction is 45°; vertical edge-gradient direction is horizontal; 45° edge-gradient direction is 135°. Non-maximum suppression is to compare the size of the corresponding neighborhood values ​​in the 3*3 neighborhood along the above 4 types of gradient directions.

[0244] 4. Use the dual threshold algorithm to detect and connect edges. You can select the coefficient high threshold TH and low threshold TL, with a ratio of 2:1 or 3:1. Points less than the low threshold are discarded and assigned 0; points greater than the high threshold are marked and assigned 1 or 255. Points greater than the high threshold are edge points.

[0245] In the embodiment of the present disclosure, by installing a camera device 205 to take pictures, the server 201 can obtain images and perform image analysis to determine the position of the shooting target in the image, and further determine the predetermined position of the test terminal 202 to shoot the shooting target in the test scene, so that the server 201 can drive the displacement device 204 to move the test terminal 202 to the predetermined position, which has the characteristics of intelligence.

[0246] Figure 6 Is a system topology diagram, such as Figure 6 As shown, the automated unmanned laboratory is equipped with slide rails or robots to control the direction and position of the camera phone. Multiple test machines, including competitive machines, can be placed in the laboratory. The cloud and various open source hardware can be controlled based on the Arduino hardware interface to achieve remote creation, automated construction and simulation of laboratory environment construction information, such as configuring the light brightness, angle and other props scenes in the environment, and remote automated control construction. The cloud can also remotely control the high-definition cameras at various angles in the laboratory, perform image recognition, grayscale processing and binarization processing based on Opencv and artificial intelligence (AI) technology, identify the scene to dispatch the corresponding open source hardware or manipulator, and control the laboratory. The cloud can also issue tasks and transmit data based on the transmission control protocol / interconnection protocol (TCP / IP) and control remote terminal equipment (test terminal). Among them, the automated unmanned laboratory accesses the manipulator (slide rail or robot), instruments and various open source hardware through the serial port / parallel port. Figure 6 In the process, the slide rail or robot can control the mobile phone to aim at the target object, and the cloud triggers the mobile phone, such as the Android mobile phone automation program to perform focusing and taking pictures. It should be noted that all scenes in the above process are simulated by physical devices, scene switching, brightness adjustment, distance, angle, etc. The physical device is based on the Arduino hardware interface and provides an Internet control application program interface (Application Programming Interface, API), so that the cloud can control each physical device.

[0247] Figure 7 It is a cloud distributed system unmanned photography scene laboratory system architecture diagram, such as Figure 7As shown in the figure, the cloud system mainly adopts a distributed architecture, and performs automatic unmanned cloud operations on the nodes of the external scene simulation experiment environment through the network. The cloud server uses the Database database as the data storage medium to realize the internal protection of the database and data table. The database table structure design fully considers the maximization of retrieval efficiency. The cloud server also obtains terminal device information based on the TCP / IP protocol, and uses heartbeat technology to judge the status of the remote test terminal in real time for data transmission interaction. The distributed system can use the Celery architecture for distributed task issuance, scheduling, and management, and can also be based on Hadoop distributed storage data, data analysis, etc. In addition, the cloud can also perform load balancing based on the Nginx proxy server, coordinate the access background pressure conditions in different regions, etc.

[0248] Figure 8 FIG. 1 is a diagram showing an automated testing device according to an exemplary embodiment. Figure 8 , the automated testing devices used in the server include:

[0249] The receiving module 301 is configured to receive test task information; wherein the test task information includes scene setting parameters and task parameters;

[0250] A building module 302 is configured to set parameters based on the scenario and build a test scenario;

[0251] A sending module 303 is configured to send an operation instruction to a test terminal located in the constructed test scenario according to the task parameters;

[0252] The detection module 304 is configured to detect the execution result of the test terminal executing the operation instruction.

[0253] Optionally, the test task includes an image acquisition task; the test scenario is: an image acquisition scenario; the operation instruction includes an image acquisition instruction;

[0254] The detection module 304 is specifically configured to perform image quality assessment on the images captured by the test terminal.

[0255] Optionally, the scene setting parameters include: a device identifier of an environment building device and a first working parameter of the environment building device;

[0256] The construction module 302 is specifically configured to determine the environment construction device for constructing the test scenario according to the device identifier; and control the environment construction device to operate with the first working parameters.

[0257] Optionally, the environment building equipment includes at least one of the following:

[0258] A scenery device, used for constructing a scenery in the space where the test scene is located;

[0259] Environmental conditioning equipment, used to provide the test environment required by the test scenario;

[0260] A displacement device is used to adjust the position of the test terminal in the test scene.

[0261] Optionally, the environmental conditioning device includes at least one of the following:

[0262] Lighting adjustment equipment, used to provide the lighting environment required by the test environment;

[0263] Temperature regulating equipment, used to provide the temperature environment required by the test environment;

[0264] Humidity regulating equipment, used to provide the humidity environment required by the test environment;

[0265] The air pressure regulating device is used to provide the air pressure environment required by the test environment.

[0266] Optionally, the first operating parameter of the light adjustment device includes at least one of the following:

[0267] Lighting brightness;

[0268] lighting angle;

[0269] Lighting chromaticity.

[0270] Optionally, the sending module 303 is specifically configured to send a driving instruction to the displacement device according to the task parameters; wherein the driving instruction is used to drive the displacement device to move so as to drive the test terminal to move to a predetermined position of the test scene; and send the operation instruction to the test terminal located at the predetermined position in the test scene.

[0271] Optionally, the environment building equipment also includes a camera.

[0272] The sending module 303 is specifically configured to send a capture instruction to the camera device to capture an image of the environment where the test terminal is located; receive the image returned by the camera device; analyze the image to determine the position of the test target of the test terminal in the image; determine the predetermined position of the test terminal in the test scene to test the test target based on the position of the test target in the image; and send a driving instruction carrying the predetermined position to the displacement device.

[0273] Optionally, the task parameters include:

[0274] Function ID, used to indicate the function to be tested;

[0275] Test item identifier, used to indicate the test item of the function to be tested.

[0276] Optionally, the image acquisition task includes:

[0277] Portrait collection;

[0278] Night scene collection;

[0279] Seascape collection;

[0280] Still scene collection;

[0281] Dynamic scene collection;

[0282] Far focus acquisition;

[0283] Wide-angle acquisition;

[0284] Macro collection.

[0285] Optionally, the task parameter includes a second working parameter when the test terminal executes the operation instruction;

[0286] The sending module 303 is specifically configured to send the operation instruction carrying the second working parameter to the test terminal located in the established test scenario.

[0287] Optionally, the second operating parameter includes at least one of the following:

[0288] Focus parameters;

[0289] White balance parameters;

[0290] Sensitivity parameters.

[0291] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0292] Fig. 9 is a block diagram of a server device 900 according to an exemplary embodiment. Fig. 9 The apparatus 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932 for storing instructions executable by the processing component 922, such as an application. The application stored in the memory 932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 922 is configured to execute instructions to perform the above-mentioned network configuration method.

[0293] The device 900 may also include a power supply component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to a network, and an input / output (I / O) interface 958. The device 900 may operate based on an operating system stored in the memory 932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0294] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 932 including instructions, and the instructions can be executed by the processing component 922 of the device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0295] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processing component of a server, enables the server to perform an automated testing method, the method comprising:

[0296] Receive test task information; wherein the test task information includes scene setting parameters and task parameters;

[0297] Setting parameters based on the scenario and building a test scenario;

[0298] Sending an operation instruction to a test terminal located in the constructed test scenario according to the task parameters;

[0299] Detecting the execution result of the test terminal executing the operation instruction.

[0300] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0301] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An automated testing method, characterized in that: Applied to a server, the method comprises: Receive test task information; wherein the test task information includes scene setting parameters and task parameters; the scene setting parameters include: a device identifier of an environment building device, the environment building device includes: a scenery device for building a scenery in a space where a test scene is located; Based on the scenario setting parameters, a test scenario is constructed; wherein the test task includes an image acquisition task; the test scenario is: an image acquisition scenario; According to the task parameters, an operation instruction is sent to a test terminal located in the constructed test scene; wherein the operation instruction includes an image acquisition instruction; Performing image quality assessment on the images captured by the test terminal.

2. The method according to claim 1, characterized in that The scene setting parameters also include: first working parameters of the environment building equipment; The step of setting parameters based on the scenario and building a test scenario includes: Determine the environment construction equipment for constructing the test scenario according to the equipment identification; Control the environment building device to operate with the first working parameter.

3. The method according to claim 2, characterized in that The environment building equipment also includes at least one of the following: Environmental conditioning equipment, used to provide the test environment required by the test scenario; A displacement device is used to adjust the position of the test terminal in the test scene.

4. The method according to claim 3, characterized in that The environmental conditioning device comprises at least one of the following: Lighting adjustment equipment, used to provide the lighting environment required by the test environment; Temperature regulating equipment, used to provide the temperature environment required by the test environment; Humidity regulating equipment, used to provide the humidity environment required by the test environment; The air pressure regulating device is used to provide the air pressure environment required by the test environment.

5. The method according to claim 4, characterized in that The first operating parameter of the light adjustment device includes at least one of the following: Lighting brightness; lighting angle; Lighting chromaticity.

6. The method according to claim 3, characterized in that The sending of an operation instruction to a test terminal located in the constructed test scenario according to the task parameter includes: Sending a driving instruction to the displacement device according to the task parameters; wherein the driving instruction is used to drive the displacement device to move so as to drive the test terminal to move to a predetermined position of the test scene; The operation instruction is sent to a test terminal located at the predetermined position in the test scenario.

7. The method according to claim 6, characterized in that The environment building device also includes a photographing device, and sending a driving instruction to the displacement device according to the task parameters includes: Sending a capture instruction to the camera device to capture an image of the environment where the test terminal is located; Receiving the image returned by the photographing device; Analyzing the image to determine a position of a test target of the test terminal in the image; Determining, according to the position of the test target in the image, the predetermined position at which the test terminal performs testing on the test target in the test scene; A drive instruction carrying the predetermined position is sent to the displacement device.

8. The method according to claim 1, characterized in that The task parameters include: Function ID, used to indicate the function to be tested; Test item identifier, used to indicate the test item of the function to be tested.

9. The method according to claim 1, characterized in that: The image acquisition task includes: Portrait collection; Night scene collection; Seascape collection; Still scene collection; Dynamic scene collection; Far focus acquisition; Wide-angle acquisition; Macro collection.

10. The method according to claim 1, characterized in that The task parameters include second working parameters when the test terminal executes the operation instruction; The sending of an operation instruction to a test terminal located in the established test scenario includes: The operation instruction carrying the second working parameter is sent to the test terminal located in the established test scenario.

11. The method according to claim 10, characterized in that The second operating parameter includes at least one of the following: Focus parameters; White balance parameters; Sensitivity parameters.

12. An automated testing device, characterized in that: Applied in a server, the device comprises: A receiving module is configured to receive test task information; wherein the test task information includes scene setting parameters and task parameters; the scene setting parameters include: a device identifier of an environment building device, the environment building device includes: a scenery device for building a scenery in a space where a test scene is located; A building module is configured to set parameters based on the scenario and build a test scenario; wherein the test task includes an image acquisition task; the test scenario is: an image acquisition scenario; A sending module, configured to send an operation instruction to a test terminal located in the constructed test scene according to the task parameters; wherein the operation instruction includes an image acquisition instruction; The detection module is configured to evaluate the image quality of the image captured by the test terminal.

13. An automated testing system, characterized in that: Including servers, test terminals and environment construction equipment; among them, The server is used to receive test task information; based on the scene setting parameters in the test task information, send a construction instruction to the environment construction device, and send an operation instruction to the test terminal according to the task parameters in the test task information; wherein the scene setting parameters include: a device identifier of the environment construction device, and the environment construction device includes: a scenery device for constructing a scenery in the space where the test scene is located; The environment building device is in communication connection with the server and is used to build a test scene according to the building instruction; wherein the test task includes an image acquisition task; the test scene is: an image acquisition scene; The test terminal has a communication connection with the server, and is used to execute the operation instruction in the constructed test scene according to the operation instruction and return the test result to the server; wherein the operation instruction includes an image acquisition instruction; The server is also used to evaluate the image quality of the images captured by the test terminal.

14. The system according to claim 13, characterized in that The scene setting parameters include first working parameters of the environment building equipment; The environment building device is used to receive the building instruction carrying the first working parameter sent by the server based on the Arduino hardware interface.

15. The system according to claim 13, characterized in that The server and the environment building device perform remote communication based on Web services.

16. The system according to claim 13, characterized in that The environment construction equipment includes a displacement device, The server is further used to send a driving instruction to the displacement device according to the task parameters; The displacement device is used to drive the test terminal to move to a predetermined position of the test scene according to the driving instruction.

17. The system according to claim 16, characterized in that The environment building equipment also includes a photographing device. The server is further configured to send a capture instruction to the camera device to capture an image of the environment where the test terminal is located; The photographing device is used to collect an image of the environment where the test terminal is located according to the collection instruction and send it to the server; The server is used to analyze the image and determine the position of the test target of the test terminal in the image; determine the predetermined position at which the test terminal tests the test target in the test scene according to the position of the test target in the image, and send a driving instruction carrying the predetermined position to the displacement device.

18. A server, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the automated testing method according to any one of claims 1 to 11.

19. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of the server, the server is enabled to execute the automated testing method as claimed in any one of claims 1 to 11.