A testing method, device, electronic device and storage medium

By deploying a one-to-one correspondence between containers and applications in the test system, and using communication channels to process texture feature values ​​in the test results, the low efficiency in detecting application compatibility issues in the existing technology is solved, and efficient compatibility is achieved. Analysis and secure transfer of data.

CN112506768BActive Publication Date: 2024-10-15PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When testing an application, the existing technology cannot efficiently determine on which devices the same application will run on which compatibility issues exist, resulting in low data processing efficiency.

Method used

By deploying N containers, each container corresponds to N applications one-to-one, using the communication channel to send test requests and receive test responses, and determine the compatibility of the application when running on the test device based on the texture feature value of each pixel in the image. Sexual issues.

Benefits of technology

It is possible to independently and efficiently determine in a container which devices the same application has compatibility issues when running on it, avoid data leakage, ensure the safe transmission of data, and accurately determine application compatibility issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112506768B_ABST
    Figure CN112506768B_ABST
Patent Text Reader

Abstract

The present application relates to a testing tool, and discloses a testing method, device, electronic device, and storage medium, the method comprising: sending a test request to a first testing device through a first communication channel, the test request comprising a first application, the test request being used to instruct the first testing device to call a test framework to test the first application after installing the first application, and obtaining a test result; receiving a test response sent by the first testing device through the first communication channel, the test response comprising a test result, and the test result comprising an image of the first application when tested on the first testing device; determining, based on the texture feature value corresponding to each pixel in the image, whether the first application has compatibility issues when running on the first testing device. Implementing the embodiments of the present application can efficiently determine which devices have compatibility issues when the same application is running.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Mobile device adaptation testing is used to find out whether there are compatibility issues when the application runs on different devices, and requires a large number of real test machines. Usually, a device adaptation test needs to be tested on dozens to hundreds of devices to cover different terminal manufacturers, mobile phone models, and device parameters. Therefore, it can be seen that for the same application, it is necessary to test on multiple devices to detect whether there are compatibility issues when the application runs on different devices.

[0003] However, in the existing scheme, a large amount of data is involved when testing different applications. The background also needs to analyze and process these data to determine whether there are compatibility issues when the applications are running on different devices. Specifically, if application 1 is tested on three devices and application 2 is tested on another four devices, since the time when each device is tested is inconsistent, the background may first process the data involved in the test of application 1 on one device, then process the data involved in the test of application 2 on one device, and then process the data involved in the test of application 1 on another device, etc. Therefore, it can be seen that in the existing scheme, when analyzing and processing data, all the data involved in the test of the same application on different devices is not analyzed and processed first, and then all the data involved in the test of another application on different devices is processed. This makes it impossible to efficiently determine on which devices the same application has compatibility issues when running. Therefore, there is an urgent need for a technical means that can efficiently determine on which devices the same application has compatibility issues when running. Summary of the invention

[0004] The embodiments of the present application provide a testing method, apparatus, electronic device, and storage medium, which can efficiently determine on which devices the same application has compatibility issues when running.

[0005] A first aspect of the present application provides a testing method, the method being applied to an electronic device, the electronic device being deployed with N containers, the N containers corresponding one-to-one to N applications, a first container being any one of the N containers, the first container being used to process all test results of a first application among the N applications after being tested on at least one test device, the first container corresponding to the first application, the N being an integer greater than 1, the method comprising:

[0006] The first container sends a test request to a first test device through a first communication channel, the test request including the first application, the test request being used to instruct the first test device to install the first application and then call a test framework to test the first application to obtain a test result, and the first test device is any one of the at least one test device;

[0007] The first container receives a test response sent by the first test device through the first communication channel, the test response including the test result, and the test result including an image of the first application when it is tested on the first test device;

[0008] The first container determines, based on the texture feature value corresponding to each pixel in the image, that there is a compatibility problem when the first application is run on the first test device.

[0009] A second aspect of the present application provides a testing device, the testing device is any one of N containers, the N containers correspond one-to-one to N applications, the N containers are deployed on an electronic device, the testing device is used to process all test results of a first application among the N applications after being tested on at least one testing device, the testing device corresponds to the first application, N is an integer greater than 1, and the testing device includes a sending module, a receiving module, and a determining module.

[0010] The sending module is used to send a test request to a first test device through a first communication channel, the test request includes the first application, and the test request is used to instruct the first test device to call a test framework to test the first application after installing the first application to obtain a test result, and the first test device is any one of the at least one test device;

[0011] The receiving module is configured to receive a test response sent by the first test device through the first communication channel, wherein the test response includes the test result, and the test result includes an image of the first application when it is tested on the first test device;

[0012] The determination module is used to determine, based on the texture feature value corresponding to each pixel in the image, whether there is a compatibility problem when the first application is run on the first test device.

[0013] A third aspect of the present application provides a testing device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are generated to be executed by the processor to execute instructions for performing steps in any one of a testing method.

[0014] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement any method described in a testing method.

[0015] It can be seen that in the above technical solution, since N containers correspond one-to-one with N applications, the first container is any one of the N containers, and the first container is used to process all test results of the first application among the N applications after being tested on at least one test device, and the first container corresponds to the first application. Therefore, different containers process all test results of different applications after being tested on different test devices, avoiding the inability to efficiently determine the compatibility issues that exist when the application is running on which devices in the existing solution, thereby independently determining the compatibility issues that exist when the same application is running on which devices in a container, and then efficiently determining the compatibility issues that exist when the application is running on which devices. At the same time, for any container, the test request is sent and the test results are obtained through the communication channel, avoiding data leakage and realizing secure data transmission. Finally, according to the texture feature value corresponding to each pixel in the image included in the test results, it is possible to accurately determine the compatibility issues that exist when the application is running on the test device. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 drawings can be obtained based on these drawings without paying creative work.

[0017] in:

[0018] Figure 1 is a schematic diagram of a test system provided in an embodiment of the present application;

[0019] Figure 2 It is a flow chart of a testing method provided in an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a gray value pair provided in an embodiment of the present application;

[0021] Figure 4 It is a flowchart of another testing method provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of a testing device provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of the structure of a testing device for a hardware operating environment according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] The following are detailed descriptions of each.

[0026] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0027] First, see Figure 1 , Figure 1 1 is a schematic diagram of a test system provided by an embodiment of the present application, and the test system 100 includes an electronic device 110 and a test device cluster 120. Among them, the electronic device 110 may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (User Equipment, UE), mobile stations (Mobile Station, MS), terminal devices (terminal device), etc. The test device cluster 120 includes multiple test devices. Each test device in the multiple test devices can be, for example, various handheld devices with wireless communication functions, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (User Equipment, UE), mobile stations (Mobile Station, MS), terminal devices (terminal device), etc. The electronic device 110 can communicate with the test device cluster 120.

[0028] The electronic device 110 is deployed with N containers, and each of the N containers can communicate with the test device cluster 120. The container (Docker) is an open source container engine and a lightweight virtualization technology with low performance loss and easy packaging.

[0029] In addition, the test system 100 may further include a test server 130. The test server 130 may communicate with the electronic device 110, and the test server 130 may also communicate with the N containers.

[0030] It should be noted that in the present application, in a possible implementation, each test device in the test device cluster 120 can be connected to a USB Hub device via a USB cable, and the USB Hub device supports Multi-TT transmission, is responsible for powering several test devices, and provides a USB communication channel between the test device and the electronic device. A tree topology is used to connect multiple USB Hub devices. The electronic device 110 may include a lightweight development board or host based on ARM or X86 architecture, which can be connected to a router or switch using a network cable and run a Linux or MacOS operating system, which is not limited here. Further, each test device in the test device cluster 120 can, for example, communicate with a wireless access point (AP) device via a WIFI hotspot, and a wireless access point (AP) device can be connected to a switch or router via a network cable.

[0031] Furthermore, the test system 100 may also include a display panel 140, which is used to display the real-time status of the hardware of each test device in the test device cluster 120. Exemplarily, application 1 is running on test device 1 in the test device cluster 120; then, the display panel 140 may display that application 1 is running on test device 1 in the test device cluster 120.

[0032] It should be noted that in the present application, in a possible implementation manner, the display panel 140 can communicate with the electronic device 110 via a transmission line, which is not limited here.

[0033] Furthermore, the test system 100 may also include a database 150, and the database 150 is used to store data. For example, the database 150 is used to store measurement results, etc., which is not limited here.

[0034] In addition, in the existing scheme, a large amount of data is involved when testing different applications. The background also needs to analyze and process these data to determine whether there are compatibility issues when the applications are running on different devices. Specifically, if application 1 is tested on three devices and application 2 is tested on another four devices, since the time when each device is tested is inconsistent, the background may first process the data involved in the test of application 1 on one device, then process the data involved in the test of application 2 on one device, and then process the data involved in the test of application 1 on another device, etc. Therefore, it can be seen that in the existing scheme, when analyzing and processing data, all the data involved in the test of the same application on different devices is not analyzed and processed first, and then all the data involved in the test of another application on different devices is processed. This makes it impossible to efficiently determine which devices have compatibility issues when the same application is running. Therefore, there is an urgent need for a technical means that can efficiently determine which devices have compatibility issues when the same application is running.

[0035] Based on this, an embodiment of the present application proposes a testing method to solve the above-mentioned problem, and the embodiment of the present application is introduced in detail below.

[0036] See also Figure 2 , Figure 2 : is a flow chart of a test method provided by an embodiment of the present application. The method is applied to an electronic device, the electronic device is deployed with N containers, the N containers correspond one-to-one to N applications, the first container is any one of the N containers, the first container is used to process all test results of the first application among the N applications after being tested on at least one test device, the first container corresponds to the first application, N is an integer greater than 1, and the method includes:

[0037] 201. The first container sends a test request to a first test device through a first communication channel. The test request includes the first application. The test request is used to instruct the first test device to install the first application and then call a test framework to test the first application to obtain a test result. The first test device is any one of the at least one test device.

[0038] Among them, application refers to a computer program that is used to complete one or more specific tasks. It runs in user mode, can interact with users, and has a visual user interface.

[0039] The test framework may be, for example, appnium or other frameworks that use the C / S protocol for testing, which is not limited here.

[0040] Optionally, the test framework supports operations such as dragging, swiping, long pressing, clicking, and inputting on the elements involved in the first application. It is understandable that in this application, an element refers to an element in hypertext markup language (HTML). Exemplarily, an element may be, for example, a button element in HTML.

[0041] The first communication channel is a communication channel between the application layer of the first container and the application layer of the first test device.

[0042] Exemplarily, the application layer may include, for example, Hyper Text Transfer Protocol (HTTP), which is not limited here.

[0043] 202. The first container receives a test response sent by the first test device through the first communication channel, where the test response includes the test result, and the test result includes an image of the first application when it is tested on the first test device.

[0044] The image may be one or more images, which are not limited here. It is understandable that the image may include screenshots of a black screen, a white screen, a distorted screen, no response, a crash, etc., which are not limited here.

[0045] 203. The first container determines, based on a texture feature value corresponding to each pixel in the image, that a compatibility problem exists when the first application is run on the first test device.

[0046] It can be seen that in the above technical solution, since N containers correspond one-to-one with N applications, the first container is any one of the N containers, and the first container is used to process all test results of the first application among the N applications after being tested on at least one test device, and the first container corresponds to the first application. Therefore, different containers process all test results of different applications after being tested on different test devices, avoiding the inability to efficiently determine the compatibility issues that exist when the application is running on which devices in the existing solution, thereby independently determining the compatibility issues that exist when the same application is running on which devices in a container, and then efficiently determining the compatibility issues that exist when the application is running on which devices. At the same time, for any container, the test request is sent and the test results are obtained through the communication channel, avoiding data leakage and realizing secure data transmission. Finally, according to the texture feature value corresponding to each pixel in the image included in the test results, it is possible to accurately determine the compatibility issues that exist when the application is running on the test device.

[0047] Optionally, the first container determines, based on the texture feature value corresponding to each pixel in the image, that the first application has a compatibility problem when running on the first test device, including: the first container grayscales the image to obtain a grayscale image; the first container determines, based on a grayscale value pair consisting of a grayscale value of each pixel in the grayscale image and a grayscale value of a first pixel among its adjacent pixels, a grayscale value of each pixel in the grayscale image having a maximum difference between the grayscale value of the first pixel in the grayscale image and the grayscale value of the first pixel among its adjacent pixels; the first container obtains a template image, which is an image corresponding to the first application without compatibility problems when running; the first container compares the texture feature value corresponding to each pixel in the grayscale image with the texture feature value corresponding to each pixel in the template image; if the comparison between the texture feature value corresponding to each pixel in the grayscale image and the texture feature value corresponding to each pixel in the template image fails, the first container determines that the first application has a compatibility problem when running on the first test device.

[0048] For example, see Figure 3 , Figure 3 is a schematic diagram of a gray value pair provided in an embodiment of the present application. Figure 3, it can be seen that pixel 1 is adjacent to pixel 2, pixel 3, pixel 4 and pixel 5 respectively. If the difference between the grayscale value of pixel 2 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 3 and the grayscale value of pixel 1, the difference between the grayscale value of pixel 2 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 4 and the grayscale value of pixel 1, and the difference between the grayscale value of pixel 2 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 5 and the grayscale value of pixel 1, then the grayscale value of pixel 1 can form a grayscale value pair with the grayscale value of pixel 2. If the difference between the grayscale value of pixel 3 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 2 and the grayscale value of pixel 1, the difference between the grayscale value of pixel 3 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 4 and the grayscale value of pixel 1, and the difference between the grayscale value of pixel 3 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 5 and the grayscale value of pixel 1, then the grayscale value of pixel 1 can form a grayscale value pair with the grayscale value of pixel 3. If the difference between the grayscale value of pixel 4 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 2 and the grayscale value of pixel 1, the difference between the grayscale value of pixel 4 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 3 and the grayscale value of pixel 1, and the difference between the grayscale value of pixel 4 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 5 and the grayscale value of pixel 1, then the grayscale value of pixel 1 can form a grayscale value pair with the grayscale value of pixel 4. If the difference between the grayscale value of pixel 5 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 2 and the grayscale value of pixel 1, the difference between the grayscale value of pixel 5 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 3 and the grayscale value of pixel 1, and the difference between the grayscale value of pixel 5 and the grayscale value of pixel 1 is greater than the difference between the grayscale value of pixel 4 and the grayscale value of pixel 1, then the grayscale value of pixel 1 can form a grayscale value pair with the grayscale value of pixel 5.

[0049] It can be seen that in the above technical solution, by using the texture feature value corresponding to each pixel in the image, it is possible to accurately determine whether there are compatibility issues when the application is running on the test device.

[0050] See also Figure 4 , Figure 4 It is a flow chart of another test method provided by an embodiment of the present application. The method is applied to an electronic device, the electronic device is deployed with N containers, the N containers correspond one-to-one to N applications, the first container is any one of the N containers, the first container is used to process all test results of the first application among the N applications after being tested on at least one test device, the first container corresponds to the first application, N is an integer greater than 1, and the method includes:

[0051] 401. The first container sends a request for establishing the first communication channel to the first test device, where the request for establishing the first communication channel includes an identifier of the electronic device, and the request for establishing the first communication channel is used to instruct the first test device to determine, based on the identifier of the electronic device, whether the first container has permission to establish the first communication channel with the first test device.

[0052] Regarding the first communication channel, please refer to Figure 2 The relevant description in is not repeated here.

[0053] 402. The first container receives a response for establishing the first communication channel sent by the first test device.

[0054] 403-405, and Figure 2 Steps 201-203 are the same and will not be described in detail here.

[0055] It can be seen that in the above technical solution, since N containers correspond one-to-one with N applications, the first container is any one of the N containers, and the first container is used to process all test results of the first application among the N applications after being tested on at least one test device, and the first container corresponds to the first application. Therefore, different containers process all test results of different applications after being tested on different test devices, avoiding the inability to efficiently determine the compatibility issues that exist when the application is running on which devices in the existing solution, thereby independently determining the compatibility issues that exist when the same application is running on which devices in a container, and then efficiently determining the compatibility issues that exist when the application is running on which devices. At the same time, for any container, the test request is sent and the test results are obtained through the communication channel, avoiding data leakage and realizing secure data transmission. Finally, according to the texture feature value corresponding to each pixel in the image included in the test results, it is possible to accurately determine the compatibility issues that exist when the application is running on the test device.

[0056] In a possible implementation manner, after the first container receives the establishment response of the first communication channel sent by the first test device, and before the first container sends a test request to the first test device through the first communication channel, the method further includes:

[0057] The first container receives a test task sent by a test server through a second communication channel, where the test task includes a type of a device used to test the first application and a version identifier of the test framework;

[0058] The first container sends a test framework detection request to the first test device through the first communication channel, the type of the first test device is the same as the type of the device used to test the first application, the test framework detection request includes a version identifier of the test framework, and the test framework detection request is used to instruct the first test device to determine, according to the version identifier of the test framework, that the version of the test framework running on the first test device is the latest version;

[0059] The first container sends a test request to the first test device through the first communication channel, including:

[0060] If a test framework detection response sent by the first test device is received through the first communication channel, the first container sends a test request to the first test device through the first communication channel, and the test framework detection response includes information that the version of the test framework running on the first test device is the latest version.

[0061] The type of the device used to test the first application is determined according to the model of the device used to test the first application; and the type of the first test device is determined according to the model of the first test device.

[0062] The second communication channel is a communication channel between the transport layer of the first container and the transport layer of the test server.

[0063] It can be seen that in the above technical solution, the test task is received through the communication channel, which avoids data leakage and realizes the secure transmission of data. At the same time, a test framework detection request is sent to the test device, so that the test request is sent to the test device when the version of the test framework running on the test device is detected to be the latest version, avoiding the problem of test failure that may be caused by the old version of the test framework.

[0064] In a possible implementation, before the first container sends a test framework detection request to the first test device through the first communication channel, the method further includes:

[0065] The first container obtains status information corresponding to the first test device at intervals of a preset time period, wherein the status information corresponding to the first test device includes at least one of the following: CPU usage of the first test device, CPU temperature of the first test device, remaining storage space size of the first test device, and status of a service process of the first test device;

[0066] The first container sends a test framework detection request to the first test device through the first communication channel, including:

[0067] If the status information corresponding to the first test device meets a preset condition, the first container sends a test framework detection request to the first test device through the first communication channel.

[0068] It can be seen that in the above technical solution, by obtaining the status information corresponding to the test device at every preset time period, and sending a test framework detection request to the test device when the status information corresponding to the test device meets the preset conditions, the situation in which the version of the test framework cannot be detected normally due to the status information corresponding to the test device not meeting the preset conditions is avoided.

[0069] In one possible implementation, the preset conditions include at least one of the following: the CPU usage of the first test device is lower than a first threshold, the CPU temperature of the first test device is lower than a second threshold, the remaining storage space size of the first test device is higher than a third threshold, the service process of the first test device is in an idle state or a waiting state, and the service process of the first test device includes at least one of the following: a service process in the first test device for running an application and a service process in the first test device for calling a test framework.

[0070] The first threshold, the second threshold and the third threshold may be set by an administrator or configured in a configuration file, which is not limited here.

[0071] Optionally, the test request is used to instruct the first test device to install the first application on the service process used to run the application in the first test device, and then call the test framework on the service process used to call the test framework in the first test device to test the first application and obtain a test result.

[0072] See also Figure 5 , Figure 5 A schematic diagram of a test device provided in an embodiment of the present application. Figure 5 As shown, the test device 500 is any one of N containers, the N containers correspond one-to-one to N applications, the N containers are deployed on an electronic device, the test device 500 is used to process all test results of a first application among the N applications after being tested on at least one test device, the test device 500 corresponds to the first application, N is an integer greater than 1, and the test device 500 includes a sending module 501, a receiving module 502 and a determining module 503,

[0073] The sending module 501 is used to send a test request to a first test device through a first communication channel, wherein the test request includes the first application, and the test request is used to instruct the first test device to call a test framework to test the first application after installing the first application to obtain a test result, and the first test device is any one of the at least one test device;

[0074] The receiving module 502 is configured to receive a test response sent by the first test device through the first communication channel, wherein the test response includes the test result, and the test result includes an image of the first application when it is tested on the first test device;

[0075] The determination module 503 is used to determine, based on the texture feature value corresponding to each pixel in the image, whether there is a compatibility problem when the first application is run on the first test device.

[0076] It can be seen that in the above technical solution, since N containers correspond one-to-one with N applications, the first container is any one of the N containers, and the first container is used to process all test results of the first application among the N applications after being tested on at least one test device, and the first container corresponds to the first application. Therefore, different containers process all test results of different applications after being tested on different test devices, avoiding the inability to efficiently determine the compatibility issues that exist when the application is running on which devices in the existing solution, thereby independently determining the compatibility issues that exist when the same application is running on which devices in a container, and then efficiently determining the compatibility issues that exist when the application is running on which devices. At the same time, for any container, the test request is sent and the test results are obtained through the communication channel, avoiding data leakage and realizing secure data transmission. Finally, according to the texture feature value corresponding to each pixel in the image included in the test results, it is possible to accurately determine the compatibility issues that exist when the application is running on the test device.

[0077] In a possible implementation manner, when the first container sends a test request to the first test device through the first communication channel,

[0078] The sending module 501 is further used to send a request for establishing the first communication channel to the first test device, where the request for establishing the first communication channel includes an identifier of the electronic device, and the request for establishing the first communication channel is used to instruct the first test device to determine, based on the identifier of the electronic device, whether the first container has the authority to establish the first communication channel with the first test device;

[0079] The receiving module 502 is further configured for the first test device to send a response for establishing the first communication channel;

[0080] The first communication channel is a communication channel between the application layer of the first container and the application layer of the first test device.

[0081] It can be seen that in the above technical solution, a communication channel is established by sending a request to establish a communication channel to the test device, thereby avoiding data leakage and achieving secure data transmission.

[0082] In a possible implementation manner, after the first container receives the establishment response of the first communication channel sent by the first test device, and before the first container sends a test request to the first test device through the first communication channel,

[0083] The receiving module 502 is further configured to receive a test task sent by a test server through a second communication channel, wherein the test task includes a type of a device for testing the first application and a version identifier of the test framework;

[0084] The sending module 501 is further used to send a test framework detection request to the first test device through the first communication channel, the type of the first test device is the same as the type of the device used to test the first application, the test framework detection request includes a version identifier of the test framework, and the test framework detection request is used to instruct the first test device to determine that the version of the test framework running on the first test device is the latest version according to the version identifier of the test framework;

[0085] When a test request is sent to a first test device through a first communication channel, if a test framework detection response sent by the first test device is received through the first communication channel, the sending module 501 is used to send a test request to the first test device through the first communication channel, and the test framework detection response includes information that the version of the test framework running on the first test device is the latest version.

[0086] It can be seen that in the above technical solution, the test task is received through the communication channel, which avoids data leakage and realizes the secure transmission of data. At the same time, a test framework detection request is sent to the test device, so that the test request is sent to the test device when the version of the test framework running on the test device is detected to be the latest version, avoiding the problem of test failure that may be caused by the old version of the test framework.

[0087] In a possible implementation manner, before the first container sends the test framework detection request to the first test device through the first communication channel, the test apparatus further includes an acquisition module 504,

[0088] The acquisition module 504 is used to acquire the status information corresponding to the first test device at intervals of a preset time period, wherein the status information corresponding to the first test device includes at least one of the following: CPU usage of the first test device, CPU temperature of the first test device, remaining storage space size of the first test device, and status of the service process of the first test device;

[0089] When sending a test framework detection request to the first test device through the first communication channel, if the state information corresponding to the first test device meets a preset condition, the sending module 501 is used to send a test framework detection request to the first test device through the first communication channel.

[0090] It can be seen that in the above technical solution, by obtaining the status information corresponding to the test device at every preset time period, and sending a test framework detection request to the test device when the status information corresponding to the test device meets the preset conditions, the situation in which the version of the test framework cannot be detected normally due to the status information corresponding to the test device not meeting the preset conditions is avoided.

[0091] In one possible implementation, the preset conditions include at least one of the following: the CPU usage of the first test device is lower than a first threshold, the CPU temperature of the first test device is lower than a second threshold, the remaining storage space size of the first test device is higher than a third threshold, the service process of the first test device is in an idle state or a waiting state, and the service process of the first test device includes at least one of the following: a service process in the first test device for running an application and a service process in the first test device for calling a test framework.

[0092] In a possible implementation manner, when it is determined that there is a compatibility problem when the first application is running on the first test device according to the texture feature value corresponding to each pixel in the image, the test module further includes a processing module 505 and a comparison module 506,

[0093] The processing module 505 is used to grayscale the image to obtain a grayscale image;

[0094] The determination module 503 is used to determine the texture feature value corresponding to each pixel in the grayscale image according to the grayscale value pair composed of the grayscale value of each pixel in the grayscale image and the grayscale value of the first pixel in its adjacent pixels, and the difference between the grayscale value of each pixel in the grayscale image and the grayscale value of the first pixel in its adjacent pixels is the largest;

[0095] The acquisition module 504 is used to acquire a template image, where the template image is an image corresponding to the first application program without compatibility issues when the first application program is running;

[0096] The comparison module 506 is used to compare the texture feature value corresponding to each pixel in the grayscale image with the texture feature value corresponding to each pixel in the template image;

[0097] If the texture feature value corresponding to each pixel in the grayscale image fails to be compared with the texture feature value corresponding to each pixel in the template image, the determination module 503 is used to determine that there is a compatibility problem when the first application is run on the first test device.

[0098] It can be seen that in the above technical solution, by using the texture feature value corresponding to each pixel in the image, it is possible to accurately determine whether there are compatibility issues when the application is running on the test device.

[0099] See also Figure 6 , Figure 6 A schematic diagram of the structure of a testing device for a hardware operating environment according to an embodiment of the present application.

[0100] The embodiment of the present application provides a testing device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor to execute instructions including steps in any one of the testing methods. Figure 6 As shown, the testing device of the hardware operating environment involved in the embodiment of the present application may include:

[0101] The processor 601 is, for example, a CPU.

[0102] Memory 602, optionally, the memory may be a high-speed RAM memory, or a stable memory, such as a disk memory.

[0103] The communication interface 603 is used to realize the connection and communication between the processor 601 and the memory 602 .

[0104] Those skilled in the art will understand that Figure 6 The structure of the test device shown in the figure does not constitute a limitation thereof, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0105] like Figure 6 As shown, the memory 602 may include an operating system, a network communication module, and one or more programs. The operating system is a program that manages and controls server hardware and software resources and supports the operation of one or more programs. The network communication module is used to realize communication between components inside the memory 602, and communication with other hardware and software inside the test device.

[0106] in, Figure 6 The test device shown is any one of N containers, the N containers correspond one-to-one to N applications, the N containers are deployed on an electronic device, the test device is used to process all test results of a first application among the N applications after being tested on at least one test device, the test device corresponds to the first application, N is an integer greater than 1, Figure 6 In the test device shown, the processor 601 is used to execute one or more programs in the memory 602 to implement the following steps:

[0107] Sending a test request to a first test device through a first communication channel, the test request including the first application, the test request being used to instruct the first test device to install the first application and then call a test framework to test the first application to obtain a test result, the first test device being any one of the at least one test device;

[0108] receiving a test response sent by the first test device through the first communication channel, the test response including the test result, and the test result including an image of the first application when being tested on the first test device;

[0109] It is determined, based on the texture feature value corresponding to each pixel in the image, that a compatibility problem exists when the first application is run on the first test device.

[0110] The specific implementation of the testing device involved in the present application can be found in the various embodiments of the above-mentioned testing method, which will not be described in detail here.

[0111] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement the following steps:

[0112] Sending a test request to a first test device through a first communication channel, the test request including the first application, the test request being used to instruct the first test device to install the first application and then call a test framework to test the first application to obtain a test result, the first test device being any one of the at least one test device;

[0113] receiving a test response sent by the first test device through the first communication channel, the test response including the test result, and the test result including an image of the first application when being tested on the first test device;

[0114] It is determined, based on the texture feature value corresponding to each pixel in the image, that a compatibility problem exists when the first application is run on the first test device.

[0115] The specific implementation of the computer-readable storage medium involved in this application can be found in the various embodiments of the above-mentioned testing method, which will not be described in detail here.

[0116] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0117] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A testing method, characterized in that: The method is applied to an electronic device, wherein N containers are deployed on the electronic device, wherein the N containers correspond one-to-one to N applications, wherein a first container is any one of the N containers, wherein the first container is used to process all test results of a first application among the N applications after being tested on at least one test device, wherein the first container corresponds to the first application, wherein N is an integer greater than 1, and wherein the method comprises: The first container sends a test request to a first test device through a first communication channel, the test request including the first application, the test request being used to instruct the first test device to install the first application and then call a test framework to test the first application to obtain a test result, and the first test device is any one of the at least one test device; The first container receives a test response sent by the first test device through the first communication channel, the test response including the test result, and the test result including an image of the first application when it is tested on the first test device; The first container determines, according to a texture feature value corresponding to each pixel in the image, that there is a compatibility problem when the first application is running on the first test device; Before the first container sends a test request to the first test device through the first communication channel, the method further includes: the first container sends a request to establish the first communication channel to the first test device, the request to establish the first communication channel includes an identification of the electronic device, and the request to establish the first communication channel is used to instruct the first test device to determine, based on the identification of the electronic device, that the first container has the authority to establish the first communication channel with the first test device; the first container receives a response to establish the first communication channel sent by the first test device; wherein the first communication channel is a communication channel between an application layer of the first container and an application layer of the first test device; The first container determines, based on the texture feature value corresponding to each pixel in the image, that the first application has a compatibility problem when running on the first test device, including: the first container grayscales the image to obtain a grayscale image; the first container determines, based on a grayscale value pair consisting of a grayscale value of each pixel in the grayscale image and a grayscale value of a first pixel among its adjacent pixels, a grayscale value of each pixel in the grayscale image having a maximum difference between the grayscale value of the first pixel in the grayscale image and the grayscale value of the first pixel among its adjacent pixels; the first container obtains a template image, which is an image corresponding to the first application without compatibility problems when running; the first container compares the texture feature value corresponding to each pixel in the grayscale image with the texture feature value corresponding to each pixel in the template image; if the comparison between the texture feature value corresponding to each pixel in the grayscale image and the texture feature value corresponding to each pixel in the template image fails, the first container determines that the first application has a compatibility problem when running on the first test device.

2. The method according to claim 1, characterized in that After the first container receives the establishment response of the first communication channel sent by the first test device, and before the first container sends a test request to the first test device through the first communication channel, the method further includes: The first container receives a test task sent by a test server through a second communication channel, where the test task includes a type of a device used to test the first application and a version identifier of the test framework; The first container sends a test framework detection request to the first test device through the first communication channel, the type of the first test device is the same as the type of the device used to test the first application, the test framework detection request includes a version identifier of the test framework, and the test framework detection request is used to instruct the first test device to determine, according to the version identifier of the test framework, that the version of the test framework running on the first test device is the latest version; The first container sends a test request to the first test device through the first communication channel, including: If a test framework detection response sent by the first test device is received through the first communication channel, the first container sends a test request to the first test device through the first communication channel, and the test framework detection response includes information that the version of the test framework running on the first test device is the latest version.

3. The method according to claim 2, characterized in that Before the first container sends a test framework detection request to the first test device through the first communication channel, the method further includes: The first container obtains status information corresponding to the first test device at intervals of a preset time period, wherein the status information corresponding to the first test device includes at least one of the following: CPU usage of the first test device, CPU temperature of the first test device, remaining storage space size of the first test device, and status of a service process of the first test device; The first container sends a test framework detection request to the first test device through the first communication channel, including: If the status information corresponding to the first test device meets a preset condition, the first container sends a test framework detection request to the first test device through the first communication channel.

4. The method according to claim 3, characterized in that The preset conditions include at least one of the following: the CPU usage of the first test device is lower than a first threshold, the CPU temperature of the first test device is lower than a second threshold, the remaining storage space size of the first test device is higher than a third threshold, the status of the service process of the first test device is in an idle state or a waiting state, and the service process of the first test device includes at least one of the following: a service process in the first test device for running an application and a service process in the first test device for calling a test framework.

5. A testing device, characterized in that: The test device is any one of N containers, the N containers correspond one-to-one to N applications, the N containers are deployed on an electronic device, the test device is used to process all test results of a first application among the N applications after being tested on at least one test device, the test device corresponds to the first application, N is an integer greater than 1, and the test device includes a sending module, a receiving module and a determining module, The sending module is used to send a test request to a first test device through a first communication channel, the test request includes the first application, and the test request is used to instruct the first test device to call a test framework to test the first application after installing the first application to obtain a test result, and the first test device is any one of the at least one test device; The receiving module is configured to receive a test response sent by the first test device through the first communication channel, wherein the test response includes the test result, and the test result includes an image of the first application when it is tested on the first test device; The determination module is used to determine, based on the texture feature value corresponding to each pixel in the image, that there is a compatibility problem when the first application is running on the first test device; When sending a test request to a first test device through a first communication channel, the sending module is further used to send a request to establish the first communication channel to the first test device, the request to establish the first communication channel includes an identification of the electronic device, and the request to establish the first communication channel is used to instruct the first test device to determine, based on the identification of the electronic device, that the test device has the authority to establish the first communication channel with the first test device; the receiving module is further used for the first test device to send an establishment response to the first communication channel; wherein, the first communication channel is a communication channel between an application layer of the test device and an application layer of the first test device; When determining that there is a compatibility problem when the first application is running on the first test device based on the texture feature value corresponding to each pixel in the image, the test device also includes a processing module and a comparison module, the processing module is used to grayscale the image to obtain a grayscale image; the determination module is used to determine the texture feature value corresponding to each pixel in the grayscale image based on a grayscale value pair consisting of the grayscale value of each pixel in the grayscale image and the grayscale value of the first pixel in its adjacent pixels, and the difference between the grayscale value of each pixel in the grayscale image and the grayscale value of the first pixel in its adjacent pixels is the largest; the acquisition module is used to acquire a template image, and the template image is an image corresponding to the first application without compatibility problems when running; the comparison module is used to compare the texture feature value corresponding to each pixel in the grayscale image with the texture feature value corresponding to each pixel in the template image; if the comparison of the texture feature value corresponding to each pixel in the grayscale image with the texture feature value corresponding to each pixel in the template image fails, then the determination module is used to determine that there is a compatibility problem when the first application is running on the first test device.

6. A testing device, characterized in that: The system comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and are generated as instructions for the processor to execute the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 4.