WO2022116427A1 - 一种测试方法、装置、电子设备和存储介质 - Google Patents

一种测试方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2022116427A1
WO2022116427A1 PCT/CN2021/083241 CN2021083241W WO2022116427A1 WO 2022116427 A1 WO2022116427 A1 WO 2022116427A1 CN 2021083241 W CN2021083241 W CN 2021083241W WO 2022116427 A1 WO2022116427 A1 WO 2022116427A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
test device
communication channel
application
request
Prior art date
Application number
PCT/CN2021/083241
Other languages
English (en)
French (fr)
Inventor
吴烁宇
胡明明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022116427A1 publication Critical patent/WO2022116427A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Definitions

  • the present application relates to the field of computer technology, and in particular, to a testing method, apparatus, electronic device and storage medium.
  • the mobile terminal model adaptation test is used to find out whether there are compatibility problems with the application running on different devices, and requires a large number of real test machines. Usually, a model 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, testing on multiple devices is required to detect whether the application has compatibility issues when running on different devices.
  • the data also needs to be analyzed in the background to determine whether there are compatibility issues when the application runs on different devices. Specifically, if application 1 is tested on three devices, and application 2 is tested on four other devices, because when testing the application, the completion time of each device test is inconsistent, so the background may process the application first.
  • 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 program runs with compatibility problems.
  • a first aspect of the present application provides a testing method.
  • the method is applied to an electronic device, where N containers are deployed on the electronic device, the N containers correspond to N application programs one-to-one, and the first container is the Any one of the N containers, the first container is used to process all the test results of the first application in the N application programs after being tested on at least one test device, and the first container and the Corresponding to the first application, the N is an integer greater than 1, and the method includes: the first container sends a test request to a first test device through a first communication channel, and the test request includes the first application , the test request is used to instruct the first test device to call the test framework to test the first application after installing the first application, and obtain a test result, where the first test device is the at least one Any one of the test devices; 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 the The image of the first application when tested on the first test device; the first container
  • a second aspect of the present application provides a test device, where the test device is any one of N containers, the N containers are in one-to-one correspondence with N applications, and the N containers are deployed on an electronic device , the test device is used to process all the test results of the first application program in the N application programs after being tested by at least one test device, the test device corresponds to the first application program, and the N is an integer greater than 1,
  • the test device includes a sending module, a receiving module and a determining module;
  • the sending module is configured to send a test request to a first test device through a first communication channel, where the test request includes the first application program, the test request is used to instruct the first test device to call a test framework to test the first application program after installing the first application program, and obtain a test result, the first test device is the at least Any test device in a test device;
  • the receiving module is configured to receive a test response sent by the first test device through the first communication channel, where the test response includes the test result, the test result Including the
  • a third aspect of the present application provides a testing device, including a processor, a memory, a communication interface, and one or more programs, wherein the testing device is any one of N containers, the N containers and N
  • the application programs are in one-to-one correspondence, the N containers are deployed on the electronic device, and the testing device is used to process all the test results of the first application program in the N application programs after being tested on at least one test device,
  • the test device corresponds to the first application program, the N is an integer greater than 1, the one or more programs are stored in the memory, and are generated by the processor to perform the following method: by The first communication channel sends a test request to the first test device, where the test request includes a first application program, and the test request is used to instruct the first test device to invoke the test framework to execute the test after installing the first application program.
  • the first application is tested to obtain a test result, and the first test device is any one of the at least one test device; the test response sent by the first test device is received through the first communication channel, The test response includes the test result, and the test result includes the image when the first application is tested on the first test device; according to the texture feature value corresponding to each pixel in the image, determine the Compatibility problems exist when the first application is run on the first test device.
  • a fourth aspect of the present application provides a computer-readable storage medium, where 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 method: through a first communication channel Send a test request to the first test device, where the test request includes a first application, and the test request is used to instruct the first test device to install the first application and call the test framework to execute the first application Perform a test to obtain a test result, where the first test device is any one of at least one test device; receive a test response sent by the first test device through the first communication channel, where the test response includes all The test result, the test result includes the image of the first application program when tested on the first test device; according to the texture feature value corresponding to each pixel in the image, it is determined that the first application program is in There is a compatibility problem when running on the first test device.
  • FIG. 1 is a schematic diagram of a testing system provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a testing method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a gray value pair provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another testing method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a testing device provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a testing device of a hardware operating environment according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a test system provided by an embodiment of the present application.
  • the test system 100 includes an electronic device 110 and a test device cluster 120 .
  • 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, and various forms of user equipment (User Equipment, UE), mobile station Station, MS), terminal equipment (terminal device) and so on.
  • Test equipment cluster 120 includes a plurality of test equipment.
  • Each of the multiple test devices may be, for example, various handheld devices with wireless communication capabilities, computing devices, or other processing devices connected to wireless modems, and various forms of user equipment (UE), mobile Station (Mobile Station, MS), terminal equipment (terminal device) and so on.
  • the electronic device 110 and the test device cluster 120 may communicate with each other.
  • the electronic device 110 is deployed with N containers, and each container in the N containers can communicate with the test device cluster 120 with each other.
  • the container (Docker) is an open source container engine and a lightweight virtualization technology, which has little performance loss and is easy to encapsulate.
  • testing system 100 may further include a testing server 130 .
  • the test server 130 can communicate with the electronic device 110, and the test server 130 can also communicate with the N containers.
  • each test device in the test device cluster 120 can be connected to a USB Hub device through a USB cable, respectively.
  • the Hub device supports Multi-TT transmission, is responsible for supplying power to 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 a host based on an ARM or X86 architecture, which may be connected to a router or switch using a network cable, and run a Linux or MacOS operating system, which is not limited herein.
  • each test device in the test device cluster 120 can communicate with a wireless access point (AP) device through a WIFI hotspot, and the wireless access point (AP) device can be connected to a switch or router through a network cable. .
  • AP wireless access point
  • the testing system 100 may further include a display panel 140 , and the display panel 140 is used to display the real-time hardware status of each testing device in the testing device cluster 120 .
  • the application 1 is running on the test device 1 in the test device cluster 120 ; then, the display panel 140 may display that the application 1 is running on the test device 1 in the test device cluster 120 .
  • the display panel 140 may communicate with the electronic device 110 through a transmission line, which is not limited herein.
  • the testing system 100 may further include a database 150 for storing data.
  • the database 150 is used for storing measurement results, etc., which is not limited here.
  • the embodiment of the present application proposes a testing method to solve the above problem, and the embodiment of the present application will be described in detail below.
  • FIG. 2 is a schematic flowchart of a testing method provided by an embodiment of the present application.
  • the method is applied to an electronic device, where N containers are deployed on the electronic device, the N containers are in one-to-one correspondence with N applications, the first container is any one of the N containers, and the first container is any one of the N containers.
  • the container is used to process all test results of the first application program in the N application programs after being tested on at least one test device, the first container corresponds to the first application program, and the N is greater than 1 Integer, the method includes the following steps.
  • the first container sends a test request to a first test device through a first communication channel, where the test request includes the first application, and the test request is used to instruct the first test device to install the first test device.
  • a test framework is invoked to test the first application program, and a test result is obtained, and the first test device is any one of the at least one test device.
  • an application program refers to a computer program for completing one or more specific tasks, it runs in the user mode, can interact with the user, and has a visual user interface.
  • the testing framework may be, for example, appnium or other frameworks that use the C/S protocol for testing, which is not limited here.
  • the testing framework supports operations such as dragging, swiping, long-pressing, clicking, and inputting elements involved in the first application.
  • an element refers to an element in hypertext markup language (hyper textmarkup language, HTML).
  • the element can be, for example, a button element in HTML.
  • 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.
  • the application layer may include, for example, a hyper text transfer protocol (hyper text transfer protocol, HTTP), which is not limited herein.
  • HTTP hyper text transfer protocol
  • 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 the first application in the Image at test time on the first test device.
  • the image can be one or more images, which is not limited here. Understandably, the image may include screenshots such as black screen, white screen, blurry screen, no response, crash, etc., which are not limited here.
  • the first container determines, according to the texture feature value corresponding to each pixel in the image, that there is a compatibility problem when the first application runs on the first test device.
  • the first container is any one of the N containers, and the first container is used to process the first application among the N applications.
  • the first container corresponds to the first application. Therefore, different containers process all the test results of different applications after being tested on different test devices, avoiding the compatibility problem that the existing solutions cannot efficiently determine which devices the applications are running on, thus realizing a single container. It can independently determine the compatibility problems on which devices the same application runs on, thereby realizing the efficient determination of the compatibility problems on which devices the application runs.
  • the test request is issued and the test result is obtained through the communication channel, which avoids the situation of data leakage and realizes the safe transmission of data.
  • the texture feature value corresponding to each pixel in the image included in the test result it is possible to accurately determine the compatibility problem when the application runs on the test device.
  • the first container determines, according to 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 application; A container performs grayscale processing on the image to obtain a grayscale image; the first container is composed of the grayscale value of each pixel in the grayscale image and the grayscale value of the first pixel in its adjacent pixels.
  • the grayscale value pair determines the texture feature value corresponding to each pixel in the grayscale image, and the difference between the grayscale value of each pixel in the grayscale image and the grayscale value of the first pixel in the adjacent pixels is the largest ;
  • the first container obtains a template image, and the template image is an image corresponding to the first application without compatibility problems at runtime;
  • the first container stores the corresponding image of each pixel in the grayscale image
  • the texture feature value is compared 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 The first container determines that there is a compatibility problem when the first application runs on the first test device.
  • FIG. 3 is a schematic diagram of a gray value pair provided by an embodiment of the present application. Specifically, with reference to FIG. 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 gray value of pixel 2 and the gray value of pixel 1 is greater than the difference between the gray value of pixel 3 and the gray value of pixel 1, the gray value of pixel 2 and the gray value of pixel 1 The difference between the intensity values is greater than the difference between the gray value of pixel 4 and the gray value of pixel 1, and the difference between the gray value of pixel 2 and the gray value of pixel 1 is greater than the gray value of pixel 5.
  • the difference between the intensity value and the gray value of pixel 1, then, the gray value of pixel 1 and the gray value of pixel 2 can form a gray value pair. If the difference between the gray value of pixel 3 and the gray value of pixel 1 is greater than the difference between the gray value of pixel 2 and the gray value of pixel 1, the gray value of pixel 3 and the gray value of pixel 1 The difference between the intensity values is greater than the difference between the gray value of pixel 4 and the gray value of pixel 1, and the difference between the gray value of pixel 3 and the gray value of pixel 1 is greater than the gray value of pixel 5. The difference between the intensity value and the gray value of pixel 1, then, the gray value of pixel 1 and the gray value of pixel 3 can form a gray value pair.
  • the gray value of pixel 4 and the gray value of pixel 1 are greater than the difference between the gray value of pixel 2 and the gray value of pixel 1, the gray value of pixel 4 and the gray value of pixel 1
  • the difference between the intensity values is greater than the difference between the gray value of pixel 3 and the gray value of pixel 1, and the difference between the gray value of pixel 4 and the gray value of pixel 1 is greater than the gray value of pixel 5.
  • the difference between the intensity value and the gray value of pixel 1, then, the gray value of pixel 1 and the gray value of pixel 4 can form a gray value pair.
  • the gray value of pixel 5 and the gray value of pixel 1 is greater than the difference between the gray value of pixel 2 and the gray value of pixel 1, the gray value of pixel 5 and the gray value of pixel 1
  • the difference between the intensity values is greater than the difference between the gray value of pixel 3 and the gray value of pixel 1, and the difference between the gray value of pixel 5 and the gray value of pixel 1 is greater than the gray value of pixel 4.
  • the difference between the intensity value and the gray value of pixel 1, then, the gray value of pixel 1 and the gray value of pixel 5 can form a gray value pair.
  • FIG. 4 is a schematic flowchart of another testing method provided by an embodiment of the present application.
  • the method is applied to an electronic device, where N containers are deployed on the electronic device, the N containers are in one-to-one correspondence with N applications, the first container is any one of the N containers, and the first container is any one of the N containers.
  • the container is used to process all test results of the first application program in the N application programs after being tested on at least one test device, the first container corresponds to the first application program, and the N is greater than 1 Integer, the method includes the following steps.
  • the first container sends a request for establishing the first communication channel to the first testing device, where the request for establishing the first communication channel includes an identifier of the electronic device, and the establishment of the first communication channel
  • the request is used to instruct the first testing device to determine that the first container has the authority to establish the first communication channel with the first testing device according to the identification of the electronic device.
  • the first container receives the establishment response of the first communication channel sent by the first test device.
  • Steps 403 to 405 are the same as steps 201 to 203 in FIG. 2 , and are not repeated here.
  • the first container is any one of the N containers, and the first container is used to process the first application among the N applications.
  • the first container corresponds to the first application. Therefore, different containers process all the test results of different applications after being tested on different test devices, avoiding the compatibility problem that the existing solutions cannot efficiently determine which devices the applications are running on, thus realizing a single container. It can independently determine the compatibility problems on which devices the same application runs on, thereby realizing the efficient determination of the compatibility problems on which devices the application runs.
  • the test request is issued and the test result is obtained through the communication channel, which avoids the situation of data leakage and realizes the safe transmission of data.
  • the texture feature value corresponding to each pixel in the image included in the test result it is possible to accurately determine the compatibility problem when the application runs on the test device.
  • the first container after the first container receives the establishment response of the first communication channel sent by the first test device, the first container sends the first test device to the first test device through the first communication channel.
  • the method further includes: the first container receives, through the second communication channel, a test task sent by the test server, where the test task includes the type of the device used to test the first application and the test task.
  • the 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, and the type of the first test device is the same as that used to test the first application.
  • the test framework detection request includes the version identifier of the test framework
  • the test framework detection request is used to instruct the first test device to determine the first test according to the version identifier of the test framework.
  • the version of the test framework running on the device is the latest version; the first container sends a test request to the first test device through the first communication channel, including: if receiving the first test device through the first communication channel
  • the sent test framework detection response the first container sends a test request to the first test device through the first communication channel
  • the test framework detection response includes the version of the test framework running on the first test device: Information on the latest version.
  • the type of the device used for testing the first application is determined according to the model of the device used for testing the first application; the type of the first testing device is determined according to the model of the first testing device of.
  • the second communication channel is a communication channel between the transport layer of the first container and the transport layer of the test server.
  • the test task is received through the communication channel, which avoids the situation of data leakage and realizes the safe transmission of data.
  • a test framework detection request is sent to the test device, so that when it is detected that the version of the test framework running on the test device is the latest version, a test request is sent to the test device, which avoids possible problems caused when the version of the test framework is an old version. Test failure problem.
  • the method further includes: the first container pre-pre-empts every interval Set a time period to obtain the state information corresponding to the first test device, wherein the state information corresponding to the first test device includes at least one of the following: the CPU usage of the first test device, the first test device The CPU temperature of the first test device, the remaining storage space size of the first test device, and the state of the service process of the first test device; the first container sends the test frame to the first test device through the first communication channel
  • the detection request includes: if the state information corresponding to the first test device satisfies a preset condition, the first container sends a test frame detection request to the first test device through the first communication channel.
  • the state information corresponding to the test equipment is obtained at every preset time period, and the test frame detection request is sent to the test equipment when the state information corresponding to the test equipment meets the preset conditions, avoiding the need for the test equipment.
  • the version of the test framework cannot be detected normally.
  • the preset conditions include at least one of the following: the CPU usage rate of the first testing device is lower than a first threshold, and the CPU temperature of the first testing device is lower than a second threshold , the size of the remaining storage space of the first test device is higher than the third threshold, the state 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 invoking a test framework.
  • 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 herein.
  • the test request is used to instruct the first test device to install the first application program on the service process used to run the application program in the first test device
  • the service process used to call the test framework in the test framework calls the test framework to test the first application, and obtains the test result.
  • FIG. 5 is a schematic diagram of a testing device provided by an embodiment of the present application.
  • the testing device 500 is any one of N containers, the N containers are in one-to-one correspondence with N applications, the N containers are deployed on electronic devices, and the N containers are deployed on electronic devices.
  • the testing device 500 is configured to process all the test results of the first application program in the N application programs after being tested by at least one test device, the testing device 500 corresponds to the first application program, and the N is greater than
  • the test device 500 includes a sending module 501 , a receiving module 502 and a determining module 503 .
  • the sending module 501 is configured to send a test request to a first test device through a first communication channel, where the test request includes the first application, and the test request is used to instruct the first test device to install the After the first application program, the test framework is invoked to test the first application program, and a test result is obtained, and the first test device is any one of the at least one test device.
  • the receiving module 502 is configured to receive, through the first communication channel, a test response sent by the first test device, where the test response includes the test result, and the test result includes where the first application is located. The image during the test on the first test device.
  • the determining module 503 is configured to determine, according to the texture feature value corresponding to each pixel in the image, that there is a compatibility problem when the first application runs on the first test device.
  • the first container is any one of the N containers, and the first container is used to process the first application among the N applications.
  • the first container corresponds to the first application. Therefore, different containers process all the test results of different applications after being tested on different test devices, avoiding the compatibility problem that the existing solutions cannot efficiently determine which devices the applications are running on, thus realizing a single container. It can independently determine the compatibility problems on which devices the same application runs on, thereby realizing the efficient determination of the compatibility problems on which devices the application runs.
  • the test request is issued and the test result is obtained through the communication channel, which avoids the situation of data leakage and realizes the safe transmission of data.
  • the texture feature value corresponding to each pixel in the image included in the test result it is possible to accurately determine the compatibility problem when the application runs on the test device.
  • the sending module 501 is further configured to send the first testing device to the first testing device.
  • a communication channel establishment request, the first communication channel establishment request includes the identification of the electronic device, and the first communication channel establishment request is used to instruct the first testing device to determine according to the identification of the electronic device.
  • the first container has the authority to establish the first communication channel with the first test device; the receiving module 502 is further configured for the first test device to send the establishment response of the first communication channel; wherein , 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.
  • the first container after the first container receives the establishment response of the first communication channel sent by the first test device, the first container sends the first test device to the first test device through the first communication channel.
  • the receiving module 502 is further configured to receive the test task sent by the test server through the second communication channel, where the test task includes the type of the device used to test the first application and the test framework
  • the sending module 501 is further configured to send a test framework detection request to the first testing device through the first communication channel, the type of the first testing device is the same as that used to test the first application
  • the devices of the program are of the same type, the test framework detection request includes the version identifier of the test framework, and the test framework detection request is used to instruct the first test device to determine the first test device according to the version identifier of the test framework.
  • the version of the test framework running on a test device is the latest version; when a test request is sent to the first test device through the first communication channel, if the test request sent by the first test device is received through the first communication channel framework detection response, the sending module 501 is configured to send a test request to the first test device through the first communication channel, and the test framework detection response includes the version of the test framework running on the first test device: Information on the latest version.
  • the test task is received through the communication channel, which avoids the situation of data leakage and realizes the safe transmission of data.
  • a test framework detection request is sent to the test device, so that when it is detected that the version of the test framework running on the test device is the latest version, a test request is sent to the test device, which avoids possible problems caused when the version of the test framework is an old version. Test failure problem.
  • the testing apparatus before the first container sends a testing framework detection request to the first testing device through the first communication channel, the testing apparatus further includes an obtaining module 504 .
  • the obtaining module 504 is configured to obtain state information corresponding to the first test device every preset time period, wherein the state information corresponding to the first test device includes at least one of the following: the first test device The CPU usage rate of the first test device, the CPU temperature of the first test device, the size of the remaining storage space of the first test device, and the status of the service process of the first test device.
  • the sending module 501 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 satisfies a preset condition, the sending module 501 is configured to pass the The first communication channel sends a test framework detection request to the first test device.
  • the state information corresponding to the test equipment is obtained at every preset time period, and the test frame detection request is sent to the test equipment when the state information corresponding to the test equipment meets the preset conditions, avoiding the need for the test equipment.
  • the version of the test framework cannot be detected normally.
  • the preset conditions include at least one of the following: the CPU usage rate of the first testing device is lower than a first threshold, and the CPU temperature of the first testing device is lower than a second threshold , the size of the remaining storage space of the first test device is higher than the third threshold, the state 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 invoking a test framework.
  • the test The modules also include a processing module 505 and a comparison module 506 .
  • the processing module 505 is configured to perform grayscale processing on the image to obtain a grayscale image.
  • the determining module 503 is configured to determine 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 the adjacent pixels.
  • the corresponding texture feature value, the difference between the gray value of each pixel in the grayscale image and the grayscale value of the first pixel in the adjacent pixels is the largest.
  • the acquiring module 504 is configured to acquire a template image, where the template image is an image corresponding to the first application without a compatibility problem at runtime.
  • the comparison module 506 is configured 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.
  • the determining module 503 is configured to determine that the first application is in the first application A compatibility issue exists when running on a test device.
  • FIG. 6 is a schematic structural diagram of a testing apparatus of a hardware operating environment involved in an embodiment of the present application.
  • An 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 configured to be processed by the processor is executed by a tester to execute instructions including steps in any one of the test methods.
  • the testing apparatus of the hardware operating environment involved in the embodiments of the present application may include: a processor 601 , such as a CPU.
  • the memory 602 optionally, the memory may be a high-speed RAM memory, or may be a stable memory, such as a disk memory.
  • the communication interface 603 is used to realize the connection communication between the processor 601 and the memory 602 .
  • the structure of the testing device shown in FIG. 6 does not constitute a limitation thereof, and may include more or less components than the one shown, or combine some components, or arrange different components.
  • the memory 602 may include an operating system, a network communication module, and one or more programs.
  • An 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 the communication between the various components in the memory 602, as well as the communication with other hardware and software in the test device.
  • the test device shown in FIG. 6 is any one of N containers, the N containers are in one-to-one correspondence with N applications, the N containers are deployed on electronic equipment, and the test device is used for Process all the test results of the first application program in the N application programs after being tested by at least one test device, the test device corresponds to the first application program, and the N is an integer greater than 1, as shown in Fig.
  • the processor 601 is configured to execute one or more programs in the memory 602, and realize the following steps: send a test request to the first test equipment through the first communication channel, and the test request includes the first test request.
  • the test request is used to instruct the first test device to call the test framework to test the first application after installing the first application, and obtain a test result
  • the first test device is the Any one of at least one test device; receiving 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 the first application
  • the image when the program is tested on the first test device ; according to the texture feature value corresponding to each pixel in the image, it is determined that there is a compatibility problem when the first application program runs on the first test device.
  • the present application also provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to realize the following steps: sending a message to the first communication channel through the first communication channel.
  • a test device sends a test request, the test request includes the first application, and the test request is used to instruct the first test device to install the first application and call the test framework to execute the first application Perform a test to obtain a test result, the first test device is any one of the at least one test device; receive a test response sent by the first test device through the first communication channel, the test response Including the test result, the test result including the image when the first application is tested on the first test device; according to the texture feature value corresponding to each pixel in the image, the first application is determined There is a compatibility problem when the program runs on the first test device.
  • the storage medium involved in this application may be non-volatile or volatile.
  • information such as test data and/or compatibility test results involved in this application may be stored in a database, or may be stored in a blockchain, which is not limited in this application.

Abstract

一种测试方法、装置、电子设备和存储介质,该方法包括:通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果(201);通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像(202);根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题(203)。该方法能够高效确定出同一应用程序在哪些设备上运行时存在兼容性问题。

Description

一种测试方法、装置、电子设备和存储介质
本申请要求于2020年12月3日提交中国专利局、申请号为202011396681.X,发明名称为“一种测试方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种测试方法、装置、电子设备和存储介质。
背景技术
移动端机型适配测试用来发现应用程序在不同设备上运行是否存在兼容性问题,需要大量真实的测试机器。通常一次机型适配测试需要在几十到几百台设备上进行测试,以覆盖不同的终端厂商、手机型号和设备参数等。因此,可以看出,针对同一应用程序,需要在多个设备上进行测试,以检测该应用程序在不同设备上运行时是否存在兼容性问题。
然而,发明人发现,在现有方案中,在对不同应用程序进行测试时会涉及到大量的数据。后台也需要对这些数据进行分析处理,以确定应用程序在不同设备上运行时是否存在兼容性问题。具体的,若应用程序1在三个设备上测试,应用程序2在另外四个设备上测试,由于在对应用程序进行测试时,每个设备测试完成的时间先后不一致,导致后台可能先处理应用程序1在一个设备上测试时涉及的数据,再处理应用程序2在一个设备上测试时涉及的数据,接着再处理应用程序1在另一个设备上测试时涉及的数据等。因此,可以看出,现有方案中,在分析处理数据时并不是先将同一应用程序在不同设备上测试时所涉及的全部数据分析处理完成后,再处理另一应用程序在不同设备上测试时所涉及的全部数据。这导致无法高效确定出同一应用程序在哪些设备上运行时存在兼容性问题。因此,亟需一种能够高效确定出同一应用程序在哪些设备上运行时存在兼容性问题的技术手段。
技术问题
本申请实施例提供了一种测试方法、装置、电子设备和存储介质,能够高效确定出同一应用程序在哪些设备上运行时存在兼容性问题。
技术解决方案
本申请第一方面提供了一种测试方法,所述方法应用于电子设备,所述电子设备部署有N个容器,所述N个容器与N个应用程序一一对应,第一容器为所述N个容器中的任意一个容器,所述第一容器用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述第一容器与所述第一应用程序对应,所述N为大于1的整数,所述方法包括:所述第一容器通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;所述第一容器通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;所述第一容器根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
本申请第二方面提供了一种测试装置,所述测试装置为N个容器中的任意一个容器,所述N个容器与N个应用程序一一对应,所述N个容器部署在电子设备上,所述测试装置用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述测试装置与所述第一应用程序对应,所述N为大于1的整数,所述测试装置包括发送模块、接收模块和确定模块;所述发送模块,用于通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;所述接收模块,用于通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;所述确定模块,用于根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
本申请第三方面提供了一种测试装置,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述测试装置为N个容器中的任意一个容器,所述N个容器与N个应用程序一一对应,所述N个容器部署在电子设备上,所述测试装置用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述测试装置与所述第一应用程序对应,所述N为大于1的整数,所述一个或多个程序被存储在所述存储器中,并且被生成由所述处理器执行以下方法:通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
本申请第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述存储计算机程序被所述处理器执行,以实现以下方法:通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为至少一个测试设备中的任意一个测试设备;通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
有益效果
可以看出,上述技术方案中,不同容器处理不同应用程序在不同测试设备进行测试后的所有测试结果,避免了现有方案中无法高效确定出应用程序在哪些设备上运行时存在的兼容性问题,从而实现了在一个容器中独立确定出同一应用程序在哪些设备上运行时存在的兼容性问题,进而实现了高效确定出应用程序在哪些设备上运行时存在的兼容性问题。
附图说明
图1是本申请实施例提供的一种测试系统的示意图。
图2是本申请实施例提供的一种测试方法的流程示意图。
图3是本申请实施例提供的一种灰度值对的示意图。
图4是本申请实施例提供的又一种测试方法的流程示意图。
图5为本申请实施例提供的一种测试装置的示意图。
图6为本申请的实施例涉及的硬件运行环境的测试装置结构示意图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
首先,参见图1,图1是本申请实施例提供的一种测试系统的示意图,该测试系统100包括电子设备110和测试设备集群120。其中,电子设备110可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。测试设备集群120包括多个测试设备。多个测试设备中的每个测试设备例如可以为各种具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。电子设备110可以与测试设备集群120之间可以相互通信。
其中,电子设备110部署有N个容器,N个容器中的每个容器可以与测试设备集群120之间可以相互通信。其中,容器(Docker)是一个开源的容器引擎,也是一种轻量级的虚拟化技术,且对性能损耗小,易于封装。
另外,该测试系统100还可以包括测试服务器130。测试服务器130可以与电子设备110相互通信,测试服务器130还可以与N个容器相互通信。
需要说明的,在本申请中,在一种可能的实施方式中,测试设备集群120中的每个测试设备分别可以通过USB线连接到USB Hub设备,USB Hub设备支持Multi-TT传输,负责向若干台测试设备供电,提供测试设备与电子设备之间的USB通信通道。多个USB Hub设备之间采用树形拓扑结构进行连接。电子设备110可以包括基于ARM或者X86架构的轻量级开发板或主机,其可以采用网线连接路由器或交换机,运行Linux或者MacOS操作系统,在此不做限制。进一步的,测试设备集群120中的每个测试设备例如可以通过WIFI热点与无线接入点(access point,AP)设备通信,无线接入点(access point,AP)设备可以通过网线连接交换机或路由器。
进一步的,该测试系统100还可以包括显示面板140,显示面板140用于显示测试设备集群120中每个测试设备的硬件实时状态。示例性的,测试设备集群120中测试设备1上正在运行应用程序1;那么,显示面板140可以显示出测试设备集群120中测试设备1上正在运行应用程序1。
需要说明的,在本申请中,在一种可能的实施方式中,显示面板140可以通过传输线与电子设备110之间相互通信,在此不做限制。
进一步的,该测试系统100还可以包括数据库150,数据库150用于存储数据。示例性的,数据库150用于存储测量结果等,在此不做限制。
另外,在现有方案中,在对不同应用程序进行测试时会涉及到大量的数据。后台也需要对这些数据进行分析处理,以确定应用程序在不同设备上运行时是否存在兼容性问题。具体的,若应用程序1在三个设备上测试,应用程序2在另外四个设备上测试,由于在对应用程序进行测试时,每个设备测试完成的时间先后不一致,导致后台可能先处理应用程序1在一个设备上测试时涉及的数据,再处理应用程序2在一个设备上测试时涉及的数据,接着再处理应用程序1在另一个设备上测试时涉及的数据等。因此,可以看出,现有方案中,在分析处理数据时并不是先将同一应用程序在不同设备上测试时所涉及的全部数据分析处理完成后,再处理另一应用程序在不同设备上测试时所涉及的全部数据。这导致无法高效确定出同一应用程序在哪些设备上运行时存在兼容性问题。因此,亟需一种能够高效确定出同一应用程序在哪些设备上运行时存在兼容性问题的技术手段。
基于此,本申请实施例提出一种测试方法以解决上述问题,下面对本申请实施例进行详细介绍。
参见图2,图2是本申请实施例提供的一种测试方法的流程示意图。该方法应用于电子设备,所述电子设备部署有N个容器,所述N个容器与N个应用程序一一对应,第一容器为所述N个容器中的任意一个容器,所述第一容器用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述第一容器与所述第一应用程序对应,所述N为大于1的整数,所述方法包括以下步骤。
201、所述第一容器通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备。
其中,应用程序,指为完成某项或多项特定工作的计算机程序,它运行在用户模式,可以和用户进行交互,具有可视的用户界面。
其中,测试框架例如可以为appnium或其他采用C/S协议进行测试的框架,在此不做限制。
可选的,测试框架支持对所述第一应用程序所涉及的元素进行拖动、划动、长按、点击、输入等操作。可以理解的,在本申请中,元素指超文本标记语言(hyper textmarkup language,HTML)中的元素。示例性的,元素例如可以为HTML中的button元素。
其中,所述第一通信通道为所述第一容器的应用层和所述第一测试设备的应用层之间的通信通道。
示例性的,应用层例如可以包括超文本传输协议(hyper texttransfer protocol,HTTP),在此不做限制。
202、所述第一容器通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像。
其中,该图像可以为一张或多张图像,在此不做限制。可以理解的的,该图像可以包括黑屏、白屏、花屏、无响应、崩溃等截图,在此不做限制。
203、所述第一容器根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
可以看出,上述技术方案中,由于N个容器与N个应用程序一一对应,第一容器为N个容器中的任意一个容器,第一容器用于处理N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,第一容器与第一应用程序对应。因此,不同容器处理不同应用程序在不同测试设备进行测试后的所有测试结果,避免了现有方案中无法高效确定出应用程序在哪些设备上运行时存在的兼容性问题,从而实现了在一个容器中独立确定出同一应用程序在哪些设备上运行时存在的兼容性问题,进而实现了高效确定出应用程序在哪些设备上运行时存在的兼容性问题。同时,针对任意一个容器,均通过通信通道下发测试请求以及获取测试结果,避免了数据泄露的情况,实现了数据的安全性传输。最后,根据测试结果包括的图像中每个像素对应的纹理特征值,实现了精准确定出应用程序在测试设备上运行时存在兼容性问题。
可选的,所述第一容器根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题,包括:所述第一容器将所述图像进行灰度化处理,得到灰度图像;所述第一容器根据所述灰度图像中每个像素的灰度值与其相邻像素中第一像素的灰度值组成的灰度值对确定所述灰度图像中每个像素对应的纹理特征值,所述灰度图像中每个像素的灰度值与其相邻像素中所述第一像素的灰度值之差最大;所述第一容器获取模板图像,所述模板图像为所述第一应用程序在运行时无兼容性问题所对应的图像;所述第一容器将所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值进行对比;若所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值对比失败,则所述第一容器确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
示例性的,参见图3,图3是本申请实施例提供的一种灰度值对的示意图。具体的,结合图3,可以看出,像素1分别与像素2、像素3、像素4和像素5相邻。若像素2的灰度值与像素1的灰度值之间的差值大于像素3的灰度值与像素1的灰度值之间的差值,像素2的灰度值与像素1的灰度值之间的差值大于像素4的灰度值与像素1的灰度值之间的差值,像素2的灰度值与像素1的灰度值之间的差值大于像素5的灰度值与像素1的灰度值之间的差值,那么,像素1的灰度值可以与像素2的灰度值组成一个灰度值对。若像素3的灰度值与像素1的灰度值之间的差值大于像素2的灰度值与像素1的灰度值之间的差值,像素3的灰度值与像素1的灰度值之间的差值大于像素4的灰度值与像素1的灰度值之间的差值,像素3的灰度值与像素1的灰度值之间的差值大于像素5的灰度值与像素1的灰度值之间的差值,那么,像素1的灰度值可以与像素3的灰度值组成一个灰度值对。若像素4的灰度值与像素1的灰度值之间的差值大于像素2的灰度值与像素1的灰度值之间的差值,像素4的灰度值与像素1的灰度值之间的差值大于像素3的灰度值与像素1的灰度值之间的差值,像素4的灰度值与像素1的灰度值之间的差值大于像素5的灰度值与像素1的灰度值之间的差值,那么,像素1的灰度值可以与像素4的灰度值组成一个灰度值对。若像素5的灰度值与像素1的灰度值之间的差值大于像素2的灰度值与像素1的灰度值之间的差值,像素5的灰度值与像素1的灰度值之间的差值大于像素3的灰度值与像素1的灰度值之间的差值,像素5的灰度值与像素1的灰度值之间的差值大于像素4的灰度值与像素1的灰度值之间的差值,那么,像素1的灰度值可以与像素5的灰度值组成一个灰度值对。
可以看出,上述技术方案中,通过根据图像中每个像素对应的纹理特征值,实现了精准确定出应用程序在测试设备上运行时存在兼容性问题。
参见图4,图4是本申请实施例提供的又一种测试方法的流程示意图。该方法应用于电子设备,所述电子设备部署有N个容器,所述N个容器与N个应用程序一一对应,第一容器为所述N个容器中的任意一个容器,所述第一容器用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述第一容器与所述第一应用程序对应,所述N为大于1的整数,所述方法包括以下步骤。
401、所述第一容器向所述第一测试设备发送所述第一通信通道的建立请求,所述第一通信通道的建立请求包括所述电子设备的标识,所述第一通信通道的建立请求用于指示所述第一测试设备根据所述电子设备的标识确定所述第一容器有与所述第一测试设备建立所述第一通信通道的权限。
其中,关于第一通信通道,可以参考图2中相关描述,在此不加赘述。
402、所述第一容器接收所述第一测试设备发送所述第一通信通道的建立响应。
403-405、与图2中步骤201-203相同,在此不加赘述。
可以看出,上述技术方案中,由于N个容器与N个应用程序一一对应,第一容器为N个容器中的任意一个容器,第一容器用于处理N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,第一容器与第一应用程序对应。因此,不同容器处理不同应用程序在不同测试设备进行测试后的所有测试结果,避免了现有方案中无法高效确定出应用程序在哪些设备上运行时存在的兼容性问题,从而实现了在一个容器中独立确定出同一应用程序在哪些设备上运行时存在的兼容性问题,进而实现了高效确定出应用程序在哪些设备上运行时存在的兼容性问题。同时,针对任意一个容器,均通过通信通道下发测试请求以及获取测试结果,避免了数据泄露的情况,实现了数据的安全性传输。最后,根据测试结果包括的图像中每个像素对应的纹理特征值,实现了精准确定出应用程序在测试设备上运行时存在兼容性问题。
在一种可能的实施方式中,在所述第一容器接收所述第一测试设备发送所述第一通信通道的建立响应之后,在所述第一容器通过第一通信通道向第一测试设备发送测试请求之前,所述方法还包括:所述第一容器通过第二通信通道接收测试服务器发送的测试任务,所述测试任务包括用于测试所述第一应用程序的设备的类型和所述测试框架的版本标识;所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,所述第一测试设备的类型与用于测试所述第一应用程序的设备的类型相同,所述测试框架检测请求包括所述测试框架的版本标识,所述测试框架检测请求用于指示所述第一测试设备根据所述测试框架的版本标识,确定所述第一测试设备上运行的所述测试框架的版本为最新版本;所述第一容器通过第一通信通道向第一测试设备发送测试请求,包括:若通过所述第一通信通道接收所述第一测试设备发送的测试框架检测响应,则所述第一容器通过第一通信通道向第一测试设备发送测试请求,所述测试框架检测响应包括所述第一测试设备上运行的所述测试框架的版本为最新版本的信息。
其中,用于测试所述第一应用程序的设备的类型是根据用于测试所述第一应用程序的设备的型号确定的;所述第一测试设备的类型是根据第一测试设备的型号确定的。
其中,第二通信通道为第一容器的传输层与测试服务器的传输层之间的通信通道。
可以看出,上述技术方案中,通过通信通道接收测试任务,避免了数据泄露的情况,实现了数据的安全性传输。同时,向测试设备发送测试框架检测请求,从而实现了在检测到测试设备上运行的测试框架的版本为最新版本时向测试设备发送测试请求,避免了测试框架的版本为旧版本时可能导致的测试失败的问题。
在一种可能的实施方式中,在所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求之前,所述方法还包括:所述第一容器每间隔预设时间段获取所述第一测试设备对应的状态信息,其中,所述第一测试设备对应的状态信息包括以下至少一种:所述第一测试设备的CPU使用率、所述第一测试设备的CPU温度、所述第一测试设备的剩余存储空间大小和所述第一测试设备的服务进程的状态;所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,包括:若所述第一测试设备对应的状态信息满足预设条件,则所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求。
可以看出,上述技术方案中,通过每间隔预设时间段获取测试设备对应的状态信息,并测试设备对应的状态信息满足预设条件时向测试设备发送测试框架检测请求,避免了由于测试设备对应的状态信息不满足预设条件时导致的无法正常检测出测试框架的版本的情况。
在一种可能的实施方式中,所述预设条件包括以下至少一种:所述第一测试设备的CPU使用率低于第一阈值、所述第一测试设备的CPU温度低于第二阈值、所述第一测试设备的剩余存储空间大小高于第三阈值,所述第一测试设备的服务进程的状态处于空闲状态或等待状态,所述第一测试设备的服务进程包括以下至少一种:所述第一测试设备中用于运行应用程序的服务进程和所述第一测试设备中用于调用测试框架的服务进程。
其中,第一阈值、第二阈值和第三阈值可以由管理员设置,或配置在配置文件中,在此不做限定。
可选的,所述测试请求用于指示所述第一测试设备在所述第一测试设备中用于运行应用程序的服务进程上安装所述第一应用程序后,在所述第一测试设备中用于调用测试框架的服务进程上调用测试框架对所述第一应用程序进行测试,得到测试结果。
参见图5,图5为本申请实施例提供的一种测试装置的示意图。其中,如图5所示,所述测试装置500为N个容器中的任意一个容器,所述N个容器与N个应用程序一一对应,所述N个容器部署在电子设备上,所述测试装置500用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述测试装置500与所述第一应用程序对应,所述N为大于1的整数,该测试装置500包括发送模块501、接收模块502和确定模块503。
所述发送模块501,用于通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备。
所述接收模块502,用于通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像。
所述确定模块503,用于根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
可以看出,上述技术方案中,由于N个容器与N个应用程序一一对应,第一容器为N个容器中的任意一个容器,第一容器用于处理N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,第一容器与第一应用程序对应。因此,不同容器处理不同应用程序在不同测试设备进行测试后的所有测试结果,避免了现有方案中无法高效确定出应用程序在哪些设备上运行时存在的兼容性问题,从而实现了在一个容器中独立确定出同一应用程序在哪些设备上运行时存在的兼容性问题,进而实现了高效确定出应用程序在哪些设备上运行时存在的兼容性问题。同时,针对任意一个容器,均通过通信通道下发测试请求以及获取测试结果,避免了数据泄露的情况,实现了数据的安全性传输。最后,根据测试结果包括的图像中每个像素对应的纹理特征值,实现了精准确定出应用程序在测试设备上运行时存在兼容性问题。
在一种可能的实施方式中,在所述第一容器通过第一通信通道向第一测试设备发送测试请求时,所述发送模块501,还用于向所述第一测试设备发送所述第一通信通道的建立请求,所述第一通信通道的建立请求包括所述电子设备的标识,所述第一通信通道的建立请求用于指示所述第一测试设备根据所述电子设备的标识确定所述第一容器有与所述第一测试设备建立所述第一通信通道的权限;所述接收模块502,还用于所述第一测试设备发送所述第一通信通道的建立响应;其中,所述第一通信通道为所述第一容器的应用层和所述第一测试设备的应用层之间的通信通道。
可以看出,上述技术方案中,通过向测试设备发送通信通道的建立请求,从而实现了通信通道的建立,避免了数据泄露的情况,实现了数据的安全性传输。
在一种可能的实施方式中,在所述第一容器接收所述第一测试设备发送所述第一通信通道的建立响应之后,在所述第一容器通过第一通信通道向第一测试设备发送测试请求之前,所述接收模块502,还用于通过第二通信通道接收测试服务器发送的测试任务,所述测试任务包括用于测试所述第一应用程序的设备的类型和所述测试框架的版本标识;所述发送模块501,还用于通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,所述第一测试设备的类型与用于测试所述第一应用程序的设备的类型相同,所述测试框架检测请求包括所述测试框架的版本标识,所述测试框架检测请求用于指示所述第一测试设备根据所述测试框架的版本标识,确定所述第一测试设备上运行的所述测试框架的版本为最新版本;在通过第一通信通道向第一测试设备发送测试请求时,若通过所述第一通信通道接收所述第一测试设备发送的测试框架检测响应,则所述发送模块501,用于通过第一通信通道向第一测试设备发送测试请求,所述测试框架检测响应包括所述第一测试设备上运行的所述测试框架的版本为最新版本的信息。
可以看出,上述技术方案中,通过通信通道接收测试任务,避免了数据泄露的情况,实现了数据的安全性传输。同时,向测试设备发送测试框架检测请求,从而实现了在检测到测试设备上运行的测试框架的版本为最新版本时向测试设备发送测试请求,避免了测试框架的版本为旧版本时可能导致的测试失败的问题。
在一种可能的实施方式中,在所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求之前,所述测试装置还包括获取模块504。
所述获取模块504,用于每间隔预设时间段获取所述第一测试设备对应的状态信息,其中,所述第一测试设备对应的状态信息包括以下至少一种:所述第一测试设备的CPU使用率、所述第一测试设备的CPU温度、所述第一测试设备的剩余存储空间大小和所述第一测试设备的服务进程的状态。
在通过所述第一通信通道向所述第一测试设备发送测试框架检测请求时,若所述第一测试设备对应的状态信息满足预设条件,则所述发送模块501,用于通过所述第一通信通道向所述第一测试设备发送测试框架检测请求。
可以看出,上述技术方案中,通过每间隔预设时间段获取测试设备对应的状态信息,并测试设备对应的状态信息满足预设条件时向测试设备发送测试框架检测请求,避免了由于测试设备对应的状态信息不满足预设条件时导致的无法正常检测出测试框架的版本的情况。
在一种可能的实施方式中,所述预设条件包括以下至少一种:所述第一测试设备的CPU使用率低于第一阈值、所述第一测试设备的CPU温度低于第二阈值、所述第一测试设备的剩余存储空间大小高于第三阈值,所述第一测试设备的服务进程的状态处于空闲状态或等待状态,所述第一测试设备的服务进程包括以下至少一种:所述第一测试设备中用于运行应用程序的服务进程和所述第一测试设备中用于调用测试框架的服务进程。
在一种可能的实施方式中,在根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题时,所述测试模块还包括处理模块505和对比模块506。
所述处理模块505,用于将所述图像进行灰度化处理,得到灰度图像。
所述确定模块503,用于根据所述灰度图像中每个像素的灰度值与其相邻像素中第一像素的灰度值组成的灰度值对确定所述灰度图像中每个像素对应的纹理特征值,所述灰度图像中每个像素的灰度值与其相邻像素中所述第一像素的灰度值之差最大。
所述获取模块504,用于获取模板图像,所述模板图像为所述第一应用程序在运行时无兼容性问题所对应的图像。
所述对比模块506,用于将所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值进行对比。
若所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值对比失败,则所述确定模块503,用于确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
可以看出,上述技术方案中,通过根据图像中每个像素对应的纹理特征值,实现了精准确定出应用程序在测试设备上运行时存在兼容性问题。
参见图6,图6为本申请的实施例涉及的硬件运行环境的测试装置结构示意图。
本申请实施例提供了一种测试装置,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,以执行包括任一项测试方法中的步骤的指令。其中,如图6所示,本申请的实施例涉及的硬件运行环境的测试装置可以包括:处理器601,例如CPU。存储器602,可选的,存储器可以为高速RAM存储器,也可以是稳定的存储器,例如磁盘存储器。通信接口603,用于实现处理器601和存储器602之间的连接通信。
本领域技术人员可以理解,图6中示出的测试装置的结构并不构成对其的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图6所示,存储器602中可以包括操作系统、网络通信模块以及一个或多个程序。操作系统是管理和控制服务器硬件和软件资源的程序,支持一个或多个程序的运行。网络通信模块用于实现存储器602内部各组件之间的通信,以及与测试装置内部其他硬件和软件之间通信。
其中,图6所示的测试装置为N个容器中的任意一个容器,所述N个容器与N个应用程序一一对应,所述N个容器部署在电子设备上,所述测试装置用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述测试装置与所述第一应用程序对应,所述N为大于1的整数,在图6所示的测试装置中,处理器601用于执行存储器602中一个或多个程序,实现以下步骤:通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
本申请涉及的测试装置的具体实施可参见上述测试方法的各实施例,在此不做赘述。
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述存储计算机程序被所述处理器执行,以实现以下步骤:通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
本申请涉及的计算机可读存储介质的具体实施可参见上述测试方法的各实施例,在此不做赘述。可选的,本申请涉及的存储介质如计算机可读存储介质可以是非易失性的,也可以是易失性的。
在一些实施例中,本申请涉及的测试数据和/或兼容性测试结果等信息可存储于数据库中,或者可以存储于区块链中,本申请不做限定。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应所述知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应所述知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (20)

  1. 一种测试方法,其中,所述方法应用于电子设备,所述电子设备部署有N个容器,所述N个容器与N个应用程序一一对应,第一容器为所述N个容器中的任意一个容器,所述第一容器用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述第一容器与所述第一应用程序对应,所述N为大于1的整数,所述方法包括:
    所述第一容器通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;
    所述第一容器通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;
    所述第一容器根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
  2. 根据权利要求1所述的方法,其中,在所述第一容器通过第一通信通道向第一测试设备发送测试请求之前,所述方法还包括:
    所述第一容器向所述第一测试设备发送所述第一通信通道的建立请求,所述第一通信通道的建立请求包括所述电子设备的标识,所述第一通信通道的建立请求用于指示所述第一测试设备根据所述电子设备的标识确定所述第一容器有与所述第一测试设备建立所述第一通信通道的权限;
    所述第一容器接收所述第一测试设备发送所述第一通信通道的建立响应;
    其中,所述第一通信通道为所述第一容器的应用层和所述第一测试设备的应用层之间的通信通道。
  3. 根据权利要求2所述的方法,其中,在所述第一容器接收所述第一测试设备发送所述第一通信通道的建立响应之后,在所述第一容器通过第一通信通道向第一测试设备发送测试请求之前,所述方法还包括:
    所述第一容器通过第二通信通道接收测试服务器发送的测试任务,所述测试任务包括用于测试所述第一应用程序的设备的类型和所述测试框架的版本标识;
    所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,所述第一测试设备的类型与用于测试所述第一应用程序的设备的类型相同,所述测试框架检测请求包括所述测试框架的版本标识,所述测试框架检测请求用于指示所述第一测试设备根据所述测试框架的版本标识,确定所述第一测试设备上运行的所述测试框架的版本为最新版本;
    所述第一容器通过第一通信通道向第一测试设备发送测试请求,包括:
    若通过所述第一通信通道接收所述第一测试设备发送的测试框架检测响应,则所述第一容器通过第一通信通道向第一测试设备发送测试请求,所述测试框架检测响应包括所述第一测试设备上运行的所述测试框架的版本为最新版本的信息。
  4. 根据权利要求3所述的方法,其中,在所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求之前,所述方法还包括:
    所述第一容器每间隔预设时间段获取所述第一测试设备对应的状态信息,其中,所述第一测试设备对应的状态信息包括以下至少一种:所述第一测试设备的CPU使用率、所述第一测试设备的CPU温度、所述第一测试设备的剩余存储空间大小和所述第一测试设备的服务进程的状态;
    所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,包括:
    若所述第一测试设备对应的状态信息满足预设条件,则所述第一容器通过所述第一通信通道向所述第一测试设备发送测试框架检测请求。
  5. 根据权利要求4所述的方法,其中,所述预设条件包括以下至少一种:所述第一测试设备的CPU使用率低于第一阈值、所述第一测试设备的CPU温度低于第二阈值、所述第一测试设备的剩余存储空间大小高于第三阈值,所述第一测试设备的服务进程的状态处于空闲状态或等待状态,所述第一测试设备的服务进程包括以下至少一种:所述第一测试设备中用于运行应用程序的服务进程和所述第一测试设备中用于调用测试框架的服务进程。
  6. 根据权利要求1所述的方法,其中,所述第一容器根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题,包括:
    所述第一容器将所述图像进行灰度化处理,得到灰度图像;
    所述第一容器根据所述灰度图像中每个像素的灰度值与其相邻像素中第一像素的灰度值组成的灰度值对确定所述灰度图像中每个像素对应的纹理特征值,所述灰度图像中每个像素的灰度值与其相邻像素中所述第一像素的灰度值之差最大;
    所述第一容器获取模板图像,所述模板图像为所述第一应用程序在运行时无兼容性问题所对应的图像;
    所述第一容器将所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值进行对比;
    若所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值对比失败,则所述第一容器确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
  7. 一种测试装置,其中,所述测试装置为N个容器中的任意一个容器,所述N个容器与N个应用程序一一对应,所述N个容器部署在电子设备上,所述测试装置用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述测试装置与所述第一应用程序对应,所述N为大于1的整数,所述测试装置包括发送模块、接收模块和确定模块,
    所述发送模块,用于通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;
    所述接收模块,用于通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;
    所述确定模块,用于根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
  8. 根据权利要求7所述的装置,其中,在所述第一容器通过第一通信通道向第一测试设备发送测试请求时,
    所述发送模块,还用于向所述第一测试设备发送所述第一通信通道的建立请求,所述第一通信通道的建立请求包括所述电子设备的标识,所述第一通信通道的建立请求用于指示所述第一测试设备根据所述电子设备的标识确定所述第一容器有与所述第一测试设备建立所述第一通信通道的权限;
    所述接收模块,还用于所述第一测试设备发送所述第一通信通道的建立响应;
    其中,所述第一通信通道为所述第一容器的应用层和所述第一测试设备的应用层之间的通信通道。
  9. 一种测试装置,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述测试装置为N个容器中的任意一个容器,所述N个容器与N个应用程序一一对应,所述N个容器部署在电子设备上,所述测试装置用于处理所述N个应用程序中第一应用程序在至少一个测试设备进行测试后的所有的测试结果,所述测试装置与所述第一应用程序对应,所述N为大于1的整数,所述一个或多个程序被存储在所述存储器中,并且被生成由所述处理器执行以下方法:
    通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为所述至少一个测试设备中的任意一个测试设备;
    通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;
    根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
  10. 根据权利要求9所述的测试装置,其中,在所述通过第一通信通道向第一测试设备发送测试请求之前,所述处理器还用于执行:
    向所述第一测试设备发送所述第一通信通道的建立请求,所述第一通信通道的建立请求包括所述电子设备的标识,所述第一通信通道的建立请求用于指示所述第一测试设备根据所述电子设备的标识确定所述测试装置有与所述第一测试设备建立所述第一通信通道的权限;
    接收所述第一测试设备发送所述第一通信通道的建立响应;
    其中,所述第一通信通道为所述测试装置的应用层和所述第一测试设备的应用层之间的通信通道。
  11. 根据权利要求10所述的测试装置,其中,在所述接收所述第一测试设备发送所述第一通信通道的建立响应之后,在所述通过第一通信通道向第一测试设备发送测试请求之前,所述处理器还用于执行:
    通过第二通信通道接收测试服务器发送的测试任务,所述测试任务包括用于测试所述第一应用程序的设备的类型和所述测试框架的版本标识;
    通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,所述第一测试设备的类型与用于测试所述第一应用程序的设备的类型相同,所述测试框架检测请求包括所述测试框架的版本标识,所述测试框架检测请求用于指示所述第一测试设备根据所述测试框架的版本标识,确定所述第一测试设备上运行的所述测试框架的版本为最新版本;
    执行所述通过第一通信通道向第一测试设备发送测试请求,包括:
    若通过所述第一通信通道接收所述第一测试设备发送的测试框架检测响应,则通过第一通信通道向第一测试设备发送测试请求,所述测试框架检测响应包括所述第一测试设备上运行的所述测试框架的版本为最新版本的信息。
  12. 根据权利要求11所述的测试装置,其中,在所述通过所述第一通信通道向所述第一测试设备发送测试框架检测请求之前,所述处理器还用于执行:
    每间隔预设时间段获取所述第一测试设备对应的状态信息,其中,所述第一测试设备对应的状态信息包括以下至少一种:所述第一测试设备的CPU使用率、所述第一测试设备的CPU温度、所述第一测试设备的剩余存储空间大小和所述第一测试设备的服务进程的状态;
    执行所述通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,包括:
    若所述第一测试设备对应的状态信息满足预设条件,则通过所述第一通信通道向所述第一测试设备发送测试框架检测请求。
  13. 根据权利要求12所述的测试装置,其中,所述预设条件包括以下至少一种:所述第一测试设备的CPU使用率低于第一阈值、所述第一测试设备的CPU温度低于第二阈值、所述第一测试设备的剩余存储空间大小高于第三阈值,所述第一测试设备的服务进程的状态处于空闲状态或等待状态,所述第一测试设备的服务进程包括以下至少一种:所述第一测试设备中用于运行应用程序的服务进程和所述第一测试设备中用于调用测试框架的服务进程。
  14. 根据权利要求9所述的测试装置,其中,执行所述根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题,包括:
    将所述图像进行灰度化处理,得到灰度图像;
    根据所述灰度图像中每个像素的灰度值与其相邻像素中第一像素的灰度值组成的灰度值对确定所述灰度图像中每个像素对应的纹理特征值,所述灰度图像中每个像素的灰度值与其相邻像素中所述第一像素的灰度值之差最大;
    获取模板图像,所述模板图像为所述第一应用程序在运行时无兼容性问题所对应的图像;
    将所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值进行对比;
    若所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值对比失败,则确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质用于存储计算机程序,所述计算机程序被处理器执行,以实现以下方法:
    通过第一通信通道向第一测试设备发送测试请求,所述测试请求包括所述第一应用程序,所述测试请求用于指示所述第一测试设备安装所述第一应用程序后调用测试框架对所述第一应用程序进行测试,得到测试结果,所述第一测试设备为至少一个测试设备中的任意一个测试设备;
    通过所述第一通信通道接收所述第一测试设备发送的测试响应,所述测试响应包括所述测试结果,所述测试结果包括所述第一应用程序在所述第一测试设备上测试时的图像;
    根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
  16. 根据权利要求15所述的计算机可读存储介质,其中,在所述通过第一通信通道向第一测试设备发送测试请求之前,所述计算机程序被所述处理器执行时还用于实现:
    向所述第一测试设备发送所述第一通信通道的建立请求,所述第一通信通道的建立请求包括所述电子设备的标识,所述第一通信通道的建立请求用于指示所述第一测试设备根据所述电子设备的标识确定第一容器有与所述第一测试设备建立所述第一通信通道的权限;
    接收所述第一测试设备发送所述第一通信通道的建立响应;
    其中,所述第一通信通道为所述第一容器的应用层和所述第一测试设备的应用层之间的通信通道。
  17. 根据权利要求16所述的计算机可读存储介质,其中,在所述接收所述第一测试设备发送所述第一通信通道的建立响应之后,在所述通过第一通信通道向第一测试设备发送测试请求之前,所述计算机程序被所述处理器执行时还用于实现:
    通过第二通信通道接收测试服务器发送的测试任务,所述测试任务包括用于测试所述第一应用程序的设备的类型和所述测试框架的版本标识;
    通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,所述第一测试设备的类型与用于测试所述第一应用程序的设备的类型相同,所述测试框架检测请求包括所述测试框架的版本标识,所述测试框架检测请求用于指示所述第一测试设备根据所述测试框架的版本标识,确定所述第一测试设备上运行的所述测试框架的版本为最新版本;
    执行所述通过第一通信通道向第一测试设备发送测试请求,包括:
    若通过所述第一通信通道接收所述第一测试设备发送的测试框架检测响应,则通过第一通信通道向第一测试设备发送测试请求,所述测试框架检测响应包括所述第一测试设备上运行的所述测试框架的版本为最新版本的信息。
  18. 根据权利要求17所述的计算机可读存储介质,其中,在所述通过所述第一通信通道向所述第一测试设备发送测试框架检测请求之前,所述计算机程序被所述处理器执行时还用于实现:
    每间隔预设时间段获取所述第一测试设备对应的状态信息,其中,所述第一测试设备对应的状态信息包括以下至少一种:所述第一测试设备的CPU使用率、所述第一测试设备的CPU温度、所述第一测试设备的剩余存储空间大小和所述第一测试设备的服务进程的状态;
    执行所述通过所述第一通信通道向所述第一测试设备发送测试框架检测请求,包括:
    若所述第一测试设备对应的状态信息满足预设条件,则通过所述第一通信通道向所述第一测试设备发送测试框架检测请求。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述预设条件包括以下至少一种:所述第一测试设备的CPU使用率低于第一阈值、所述第一测试设备的CPU温度低于第二阈值、所述第一测试设备的剩余存储空间大小高于第三阈值,所述第一测试设备的服务进程的状态处于空闲状态或等待状态,所述第一测试设备的服务进程包括以下至少一种:所述第一测试设备中用于运行应用程序的服务进程和所述第一测试设备中用于调用测试框架的服务进程。
  20. 根据权利要求15所述的计算机可读存储介质,其中,执行所述根据所述图像中每个像素对应的纹理特征值,确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题,包括:
    将所述图像进行灰度化处理,得到灰度图像;
    根据所述灰度图像中每个像素的灰度值与其相邻像素中第一像素的灰度值组成的灰度值对确定所述灰度图像中每个像素对应的纹理特征值,所述灰度图像中每个像素的灰度值与其相邻像素中所述第一像素的灰度值之差最大;
    获取模板图像,所述模板图像为所述第一应用程序在运行时无兼容性问题所对应的图像;
    将所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值进行对比;
    若所述灰度图像中每个像素对应的纹理特征值与模板图像中每个像素对应的纹理特征值对比失败,则确定所述第一应用程序在所述第一测试设备上运行时存在兼容性问题。
PCT/CN2021/083241 2020-12-03 2021-03-26 一种测试方法、装置、电子设备和存储介质 WO2022116427A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011396681.X 2020-12-03
CN202011396681.XA CN112506768A (zh) 2020-12-03 2020-12-03 一种测试方法、装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022116427A1 true WO2022116427A1 (zh) 2022-06-09

Family

ID=74968566

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083241 WO2022116427A1 (zh) 2020-12-03 2021-03-26 一种测试方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN112506768A (zh)
WO (1) WO2022116427A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506768A (zh) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 一种测试方法、装置、电子设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104008055A (zh) * 2014-05-30 2014-08-27 广州华多网络科技有限公司 软件测试的方法、设备及系统
CN104424093A (zh) * 2013-08-26 2015-03-18 阿里巴巴集团控股有限公司 一种兼容性测试方法及系统
CN105573902A (zh) * 2014-10-10 2016-05-11 阿里巴巴集团控股有限公司 一种应用程序的测试方法及系统
US20180089068A1 (en) * 2016-09-28 2018-03-29 Wipro Limited Methods and systems for testing mobile applications
CN111104321A (zh) * 2019-12-16 2020-05-05 烽火通信科技股份有限公司 一种基于docker的云平台稳定性测试方法及系统
CN112506768A (zh) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 一种测试方法、装置、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424093A (zh) * 2013-08-26 2015-03-18 阿里巴巴集团控股有限公司 一种兼容性测试方法及系统
CN104008055A (zh) * 2014-05-30 2014-08-27 广州华多网络科技有限公司 软件测试的方法、设备及系统
CN105573902A (zh) * 2014-10-10 2016-05-11 阿里巴巴集团控股有限公司 一种应用程序的测试方法及系统
US20180089068A1 (en) * 2016-09-28 2018-03-29 Wipro Limited Methods and systems for testing mobile applications
CN111104321A (zh) * 2019-12-16 2020-05-05 烽火通信科技股份有限公司 一种基于docker的云平台稳定性测试方法及系统
CN112506768A (zh) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 一种测试方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN112506768A (zh) 2021-03-16

Similar Documents

Publication Publication Date Title
US9800673B2 (en) Service compiler component and service controller for open systems interconnection layer 4 through layer 7 services in a cloud computing system
JP2019509681A (ja) クラウド検証及びテスト自動化
CN110442524B (zh) 一种针对带有认证授权的web服务接口测试方法和装置
CN108307021B (zh) 移动终端的并行跟随测试设备、云真机及方法
CN107608901B (zh) 基于Jmeter的测试方法及装置、存储介质、电子设备
CN111078539B (zh) 一种测试方法、装置、系统、计算机可读存储介质
CN110933095A (zh) 一种报文解析方法及装置
CN108319552A (zh) 一种埋点测试方法,装置及系统
CN111786939B (zh) 物联网管理平台测试的方法、装置和系统
CN113553257B (zh) 测试方法、装置、存储介质及电子设备
CN111611054A (zh) 一种应用部署方法及装置
WO2022116427A1 (zh) 一种测试方法、装置、电子设备和存储介质
WO2022142931A1 (zh) 一种网络设备的巡检方法、装置、设备和存储介质
CN111159019A (zh) 一种应用程序的测试方法、测试控制终端以及测试终端
CN114726789A (zh) 流量管理、配置流量管理策略的方法、装置、设备及介质
US10073689B2 (en) Managing application lifecycles within a federation of distributed software applications
CN111506393A (zh) 一种基于arm的虚拟化装置及其使用方法
CN111193636A (zh) 测试单机可用性的方法及装置
CN108288135B (zh) 系统兼容方法及装置、计算机可读存储介质及电子设备
US20230071504A1 (en) Multi-client orchestrated automated testing platform
CN115357258B (zh) 应用的部署方法、装置、存储介质及电子装置
CN110445628A (zh) 一种基于nginx的任务控制方法和装置
CN111782420B (zh) 基于Java Web框架的信息处理方法、装置、设备和介质
US20240004782A1 (en) Remote debugging of local gui rendering by playing back a capture file to recreate a real-time local network environment
CN110022244A (zh) 用于发送信息的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21899471

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21899471

Country of ref document: EP

Kind code of ref document: A1