CN112799891B - iOS device testing method, device, system, storage medium and computer device - Google Patents

iOS device testing method, device, system, storage medium and computer device Download PDF

Info

Publication number
CN112799891B
CN112799891B CN202110056459.3A CN202110056459A CN112799891B CN 112799891 B CN112799891 B CN 112799891B CN 202110056459 A CN202110056459 A CN 202110056459A CN 112799891 B CN112799891 B CN 112799891B
Authority
CN
China
Prior art keywords
ios
tested
ios device
equipment
industrial control
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110056459.3A
Other languages
Chinese (zh)
Other versions
CN112799891A (en
Inventor
朱明�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110056459.3A priority Critical patent/CN112799891B/en
Publication of CN112799891A publication Critical patent/CN112799891A/en
Application granted granted Critical
Publication of CN112799891B publication Critical patent/CN112799891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/273Tester hardware, i.e. output processing circuits
    • G06F11/2733Test interface between tester and unit under test

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses an iOS device testing method, an iOS device testing device, an iOS device testing system, a storage medium and computer equipment, dependence on MacOS can be avoided, and meanwhile expansion of a testing system is facilitated. The method comprises the following steps: acquiring state information and equipment information of the iOS equipment to be tested through connection with the iOS equipment to be tested, which is established by an analog integrated development environment; the method comprises the steps of publishing state information and device information of the iOS device to be tested to a message middleware coupled with upper-layer devices; if the detected iOS equipment is determined to be online according to the state information, receiving a test instruction which is returned from the upper equipment and is aimed at the detected iOS equipment; transmitting a test instruction to the iOS device to be tested through connection with the iOS device to be tested; uploading an operation result returned after the tested iOS device executes the test instruction to the upper device. The technical scheme gets rid of the dependence of the industrial control computer on the iOS, and is convenient for the expansion of the test system.

Description

iOS device testing method, device, system, storage medium and computer device
Technical Field
The application relates to the technical field of computers, in particular to an iOS device testing method, device, system, storage medium and computer device.
Background
Testing of iOS devices is an essential element to guarantee the quality of iOS device based applications. In order to save cost or in the case of lack of the iOS equipment locally, the industry generally tests the iOS equipment in a remote mode, specifically connects the iOS equipment to be tested to a server in a network, and test staff remotely tests the iOS equipment through the network to complete the test work of the iOS equipment.
However, although the problem of insufficient local iOS devices is solved, the existing iOS device testing method still has the following drawbacks:
1) An apple operating system (MacOS) needs to be relied upon because the computer to which the iOS device is connected, on which the integrated development environment running must be a MacOS-dependent integrated development environment;
2) The test system is difficult to expand because the coupling between the computer connected to the iOS device and the upper-layer device (e.g., web server) is too strong.
Disclosure of Invention
The embodiment of the application provides an iOS device testing method, an iOS device testing device, an iOS device testing system, a storage medium and computer equipment, dependence on MacOS can be avoided, and meanwhile expansion of a testing system is facilitated.
The embodiment of the application provides an iOS device testing method, which comprises the following steps:
Acquiring state information and equipment information of tested iOS equipment through connection with the tested iOS equipment established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS equipment, and the analog integrated development environment runs on an industrial control machine;
the industrial control machine issues the state information and the equipment information of the iOS equipment to be tested to a message middleware coupled with upper equipment, wherein the upper equipment comprises a Web server or a terminal for running an automatic test tool;
the upper layer equipment subscribes the state information and the equipment information of the iOS equipment to be tested from the message middleware, and if the iOS equipment to be tested is determined to be online according to the state information, a test instruction which is returned from the upper layer equipment and aims at the iOS equipment to be tested is received;
transmitting the test instruction to the iOS device under test through the connection with the iOS device under test;
uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
Optionally, the method further comprises: receiving a screenshot of the iOS device under test; and optimizing the screenshot so that the screen of the tested iOS equipment is displayed on the display end of the upper equipment in real time.
Optionally, the receiving a screenshot of the iOS device under test includes: optimizing the connection with the iOS device under test as a long connection with the iOS device under test; calling a private interface of the tested iOS device, and continuously receiving a compressed screenshot of a screen of the tested iOS device through long connection with the tested iOS device to obtain a screenshot picture stream of the tested iOS device, wherein the compressed screenshot of the screen of the tested iOS device is obtained by compressing the screenshot of the tested iOS device; and performing optimization processing on the screenshot to enable the screen of the tested iOS device to be displayed on the display end of the upper device in real time, wherein the optimization processing comprises the following steps: converting the screen capturing picture stream of the detected iOS equipment into the screen capturing video stream of the detected iOS equipment based on a video coding algorithm; uploading the screen capturing video stream of the tested iOS device to the upper layer device, so that the screen of the tested iOS device is displayed on the display end of the upper layer device after the screen capturing video stream is decoded.
Optionally, the converting the screenshot picture stream of the iOS device under test into the screenshot video stream of the iOS device under test based on the video coding algorithm includes: determining difference pixels between non-key image frames and key image frames in a screen capturing picture stream of the iOS device to be tested; and based on the video coding algorithm, carrying out coding compression on the key image frames and the difference pixels to form a screen capturing video stream of the iOS device to be tested.
Optionally, the converting the screenshot picture stream of the iOS device under test into the screenshot video stream of the iOS device under test based on the video coding algorithm includes: when the screen capturing picture stream of the detected iOS equipment is an image frame in an RGB format, converting the image frame in the RGB format into an image frame in a YUV format so as to obtain a plurality of image frames in the YUV format; respectively carrying out coding compression on the plurality of YUV format image frames by a preset coding method to form an image data packet corresponding to the plurality of YUV format image frames; and generating a screen capturing video stream of the iOS device to be tested according to the plurality of image data packets.
Optionally, the receiving a test instruction for the iOS device under test, which is returned from the upper layer device, includes: optimizing the connection with the upper layer device to a long connection with the upper layer device; and receiving a test instruction aiming at the tested iOS equipment through long connection with the upper equipment, wherein the test instruction is obtained after the upper equipment analyzes the operation of a user on the screen displayed in real time and packages the operation.
Optionally, the sending the test instruction to the iOS device under test through the connection with the iOS device under test includes: optimizing the connection with the iOS device under test as a long connection with the iOS device under test; and calling a private interface of the iOS device to be tested, and sending the test instruction to the iOS device to be tested through long connection with the iOS device to be tested.
Another embodiment of the present application provides an iOS device testing method, including:
the upper layer device displays the screen of the tested iOS device on the display end in real time;
the upper layer equipment analyzes the operation performed by the user on the screen displayed in real time, and encapsulates the operation into a test instruction aiming at the iOS equipment to be tested;
the upper layer device sends a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through an analog integrated development environment, so that the industrial control computer receives the test instruction and then sends the test instruction to the tested iOS device through connection with the tested iOS device;
the upper device receives an operation result returned after the tested iOS device uploaded by the industrial control computer executes the test instruction;
the industrial control computer establishes connection with the tested iOS device through the simulation integrated development environment, acquires state information and device information of the tested iOS device, issues the state information and the device information to a message middleware connected with the upper device, and receives a test instruction for the tested iOS device returned from the upper device if the tested iOS device is determined to be online according to the state information.
Another embodiment of the present application provides an iOS device testing method, including:
screenshot and compression are carried out on a screen of the tested iOS device, and a compressed screenshot of the screen of the tested iOS device is obtained;
the method comprises the steps that through connection with an industrial control computer established by adopting an analog integrated development environment, a compressed screenshot of a screen of an iOS device to be tested is transmitted back to the industrial control computer, so that the industrial control computer processes the compressed screenshot of the screen of the iOS device to be tested into a screenshot video stream of the iOS device to be tested and then uploads the screenshot video stream to upper-layer equipment, and the upper-layer equipment decodes the screenshot video stream and then displays the screen of the iOS device to be tested on a display end of the upper-layer equipment in real time;
receiving a test instruction aiming at the iOS equipment to be tested, which is sent by the industrial control computer;
executing the test instruction;
and transmitting the operation result obtained by executing the test instruction back to the industrial control computer through the connection with the industrial control computer so that the industrial control computer can upload the operation result to the upper-layer equipment, the upper-layer equipment is coupled to a message middleware, and the message middleware receives the state information and the equipment information of the tested iOS equipment issued by the industrial control computer.
The embodiment of the application also provides an iOS device testing device, which comprises:
the information acquisition module is used for acquiring the state information and the equipment information of the tested iOS equipment through connection with the tested iOS equipment, which is established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS equipment, and the analog integrated development environment runs on an industrial control machine;
the information release module is used for releasing the state information and the equipment information of the iOS equipment to be tested to a message middleware coupled with upper equipment, wherein the upper equipment comprises a Web server or a terminal for running an automatic test tool;
the first receiving module is used for subscribing the state information and the device information of the iOS device to be tested from the message middleware, and receiving a test instruction for the iOS device to be tested, which is returned from the upper device, if the iOS device to be tested is determined to be online according to the state information;
the first sending module is used for sending the test instruction to the iOS equipment to be tested through the connection with the iOS equipment to be tested;
And the first uploading module is used for uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
Another embodiment of the present application further provides an iOS device testing apparatus, including:
the real-time processing module is used for displaying the screen of the tested iOS device on the display end in real time by the upper device;
the analysis module is used for analyzing the operation performed by the user on the screen displayed in real time by the upper-layer equipment and packaging the operation into a test instruction aiming at the iOS equipment to be tested;
the second sending module is used for sending a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through an analog integrated development environment, so that the industrial control computer receives the test instruction and then sends the test instruction to the tested iOS device through connection with the tested iOS device;
the third receiving module is used for receiving an operation result returned after the tested iOS device uploaded by the industrial control computer executes the test instruction by the upper device;
the industrial control computer establishes connection with the tested iOS device through the simulation integrated development environment, acquires state information and device information of the tested iOS device, issues the state information and the device information to a message middleware connected with the upper device, and receives a test instruction for the tested iOS device returned from the upper device if the tested iOS device is determined to be online according to the state information.
Another embodiment of the present application further provides an iOS device testing apparatus, including:
the screen capturing processing module is used for capturing and compressing the screen of the tested iOS equipment to obtain a compressed screen capturing of the screen of the tested iOS equipment;
the first return module is used for returning the compressed screenshot of the screen of the tested iOS device to the industrial control computer through connection with the industrial control computer established by adopting an analog integrated development environment, so that the industrial control computer processes the compressed screenshot of the screen of the tested iOS device into a screenshot video stream of the tested iOS device and then uploads the screenshot video stream to the upper device, and the upper device decodes the screenshot video stream and then displays the screen of the tested iOS device on a display end of the upper device in real time;
a fourth receiving module, configured to receive a test instruction for the iOS device under test sent by the industrial control computer;
the instruction execution module is used for executing the test instruction;
and the second feedback module is used for transmitting the operation result obtained by executing the test instruction back to the industrial control computer through the connection with the industrial control computer so that the industrial control computer can upload the operation result to the upper-layer equipment, the upper-layer equipment is coupled to a message middleware, and the message middleware receives the state information and the equipment information of the tested iOS equipment issued by the industrial control computer.
Embodiments of the present application also provide a computer readable storage medium storing a computer program adapted to be loaded by a processor to perform the steps in the iOS device testing method according to any of the embodiments above.
The embodiment of the application further provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps in the iOS device testing method according to any embodiment by calling the computer program stored in the memory.
According to the technical scheme provided by the embodiment of the application, on one hand, because the simulation integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS equipment, in the testing process of the iOS equipment, the connection with the tested iOS equipment can be realized through the simulation integrated development environment, so that the connection with the iOS equipment does not need to be an iOS-based computer, and the dependence on the iOS is eliminated; on the other hand, the state information and the device information of the measured iOS device are released to the message middleware coupled with the upper device, which means that the upper device (for example, a Web server, etc.) can directly obtain the state information and the device information of the measured iOS device from the message middleware, so that the decoupling of the upper device by the industrial control computer can be realized, and the expansion of the system is convenient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system schematic diagram of an iOS device testing apparatus provided in an embodiment of the present application.
Fig. 2 is a flow chart of an iOS device testing method according to an embodiment of the present application.
Fig. 3 is a flowchart of an iOS device testing method according to another embodiment of the present application.
Fig. 4 is a flowchart of an iOS device testing method according to another embodiment of the present application.
Fig. 5 is a schematic structural diagram of an iOS device testing apparatus according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an iOS device testing apparatus according to another embodiment of the present application.
Fig. 7 is a schematic structural diagram of an iOS device testing apparatus according to another embodiment of the present application.
FIG. 8 is a schematic structural diagram of an iOS device testing apparatus according to another embodiment of the present application
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides an iOS device testing method and device, a storage medium and computer equipment. Specifically, the iOS device testing method of the embodiment of the application may be executed by a computer device, where the computer device may be an industrial control computer (industrial control computer), a Web server, an iOS device, or the like. The industrial control computer can be an electronic device based on an operating system such as a Windows operating system, a Ubuntu operating system or a Linux operating system, the Web server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content distribution network, and basic cloud computing services such as big data and an artificial intelligent platform, and the iOS device can be an iOS-based device, including iOS electronic devices based on apple corporation such as iphone and iPAD.
For example, when the iOS device testing method is run on an industrial control computer, the industrial control computer stores a game application program and is used to present a virtual scene in a game screen. The industrial control computer is used to interact with the user through a graphical user interface, such as by downloading an installation game application and running through the industrial control computer. The manner in which the industrial control computer provides the graphical user interface to the user may include a variety of ways, for example, the graphical user interface may be rendered for display on a display screen of the industrial control computer, or presented by holographic projection. For example, an industrial control computer may include a touch display screen for presenting a graphical user interface including game visuals and receiving operational instructions generated by a user acting on the graphical user interface, and a processor for running the game, generating the graphical user interface, responding to the operational instructions, and controlling the display of the graphical user interface on the touch display screen.
For example, when the iOS device testing method is running on a Web server, it may be a cloud game. Cloud gaming refers to a game style based on cloud computing. In the running mode of the cloud game, a running main body of the game application program and a game picture presentation main body are separated, and the storage and the running of the iOS device testing method are completed on the cloud game server. The game image presentation is completed at a cloud game client, which is mainly used for receiving and sending game data and presenting game images, for example, the cloud game client may be a display device with a data transmission function, such as a mobile terminal, a television, a computer, a palm computer, a personal digital assistant, etc., near a user side, but the terminal device for processing game data is a cloud game server in the cloud. When playing the game, the user operates the cloud game client to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, codes and compresses data such as game pictures and the like, returns the data to the cloud game client through a network, and finally decodes the data through the cloud game client and outputs the game pictures.
Referring to fig. 1, fig. 1 is a schematic diagram of a system for iOS device testing according to an embodiment of the present application. The system may include at least one iOS device under test 1000, at least one upper layer device 2000, at least one database 3000, a network 4000, an industrial control computer 5000, and message middleware 6000. The tested iOS device 1000 is a tested object, and is mainly used for capturing and compressing a screen of the tested iOS device 1000 to obtain a compressed capturing of the screen of the tested iOS device 1000, the compressed capturing of the screen of the tested iOS device 1000 is transmitted back to the industrial control computer 5000 by adopting connection with the industrial control computer 5000 established by an analog integrated development environment, the purpose is that the industrial control computer 5000 processes the compressed capturing of the screen of the tested iOS device 1000 into a screen capturing video stream of the tested iOS device 1000 and then uploads the screen of the tested iOS device 1000 to the upper layer device 2000 of the industrial control computer 5000, the upper layer device 2000 decodes the screen capturing video stream and then displays the screen of the tested iOS device 1000 on the display end of the upper layer device 2000 in real time, then the tested iOS device 1000 receives a test instruction for the tested iOS device 1000 sent by the industrial control computer 5000, executes the test instruction for the tested iOS device 1000, and an operation result obtained by executing the test instruction is transmitted back to the industrial control computer 5000 through connection with the industrial control computer 5000, so that the industrial control computer 5000 uploads the operation result to the upper layer device 2000 of the industrial control computer 5000. The industrial control computer 5000 is mainly used for obtaining state information and device information of the iOS device 1000 under test through connection with the iOS device 1000 under test established by an analog integrated development environment (the analog integrated development environment is an integrated development environment obtained by simulating an iOS device native integrated development environment), publishing the state information and device information of the iOS device 1000 under test to a message middleware 6000 connected with an upper device 2000 (the upper device 2000 here comprises a Web server or a terminal running an automated test tool), if it is determined that the iOS device 1000 under test is online according to the state information, receiving a test instruction for the iOS device 1000 under test returned from the upper device 2000, sending the test instruction to the iOS device 1000 under test through connection with the iOS device 1000 under test, uploading an operation result returned after the iOS device 1000 under test executes the test instruction to the upper device 2000. The upper layer device 2000 is mainly used for displaying the screen of the iOS device 1000 to be tested on the display end in real time, analyzing operations performed by a user on the screen displayed in real time, encapsulating the operations into test instructions for the iOS device 1000 to be tested, sending the test instructions for the iOS device 1000 to an industrial control computer connected with the iOS device 1000 to be tested through an analog integrated development environment (the purpose is that the industrial control computer 5000 receives the test instructions and sends the test instructions to the iOS device 1000 to be tested through the connection with the iOS device 1000 to be tested), and receiving operation results returned after the iOS device 1000 to be tested uploaded by the industrial control computer 5000 executes the test instructions. It should be noted that, in the iOS device testing system of the present application, the upper device 2000 is further connected to a display device (not shown in fig. 1) to serve as a display end thereof. As an interaction device with a user, the display end receives decoding data of a screen capturing video stream of the iOS device 1000 to be tested from the upper layer device 2000, and renders a screen of the iOS device 1000 to be tested; on the other hand, the display end receives the operation of the user on the screen of the iOS device 1000 to be tested, sends the operation to the upper layer device 2000, and sends the operation to the iOS device 1000 to be tested for execution after the upper layer device 2000 analyzes the test instruction corresponding to the operation.
The iOS device under test 1000 and the industrial control computer 5000, the industrial control computer 5000 and the upper layer device 2000, the industrial control computer 5000 and the message middleware 6000, and the upper layer device 2000 and the message middleware 6000 can be connected to each other through the network 4000. The network 4000 may be a wireless network or a wired network, such as a Wireless Local Area Network (WLAN), a Local Area Network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, the system may include a plurality of databases 3000, the plurality of databases 3000 being coupled to different upper layer devices 2000, status information and device information of the measured iOS devices may be continuously and permanently stored, and the message middleware 6000 is mainly used to temporarily store status information and device information of the measured iOS devices 1000 published by the industrial control computer 5000, so as to subscribe to the upper layer devices 2000 in real time.
Referring to fig. 2, a flow chart of an iOS device testing method according to an embodiment of the present application is shown, and an execution subject of the iOS device testing method may be the industrial control computer 5000 in the system illustrated in fig. 1. The method illustrated in fig. 2 mainly includes steps S201 to S205, and is described in detail as follows:
Step S201, acquiring state information and device information of the tested iOS device through connection with the tested iOS device established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS device.
In the prior art, in order to test the iOS device, the electronic device connected to the iOS device must be an iOS-based industrial personal computer or other terminal. Although the technical solution of the embodiment of the present application is also to test iOS devices, the industrial control computer of the embodiment of the present application may not be iOS-based electronic devices, i.e., the industrial control computer may be electronic devices based on an operating system such as Windows, ubuntu or Linux. In order to realize the connection between the industrial control computer and the iOS device to be tested, the native integrated development environment of the iOS device, such as Xcode, can be simulated to obtain a simulated integrated development environment, the simulated integrated development environment is run on the industrial control computer which is not the iOS, the connection between the industrial control computer and the iOS device to be tested is established, and then the state information and the device information of the iOS device to be tested are acquired through the connection.
The device information of the tested iOS device mainly comprises information such as the model number, serial number, central processing unit model number, version, model number, version of the graphic processor, screen size, ROM, RAM, electric quantity, intellectual property and the like of the tested iOS device. The device information of the detected iOS device can be specifically obtained by adopting a device tool to obtain the serial number of the detected iOS device, obtain other device information of the detected iOS device according to the serial number, analyze and sort the device information, and convert the device information into a device information format capable of being directly presented. For example, for the type, version, screen size, etc. of the cpu of the iOS device under test, the serial number of the iOS device under test may be obtained first, then a type of the iOS device under test is obtained accordingly, and finally, the corresponding device information is obtained from the consolidated device information according to the type of the iOS device under test.
The state information of the measured iOS device in the embodiment of the present application mainly refers to whether the measured iOS device is in an on-line state or an off-line state, which is mainly determined by whether the measured iOS device can be invoked by an upper layer, that is, if the measured iOS device can be invoked by the upper layer, the state of the measured iOS device is in the on-line state, otherwise, the measured iOS device is in the off-line state. In particular implementations, a thread may be maintained at the industrial control computer that continually probes the state of the iOS device under test, e.g., calls to the iOS device under test. If the tested iOS equipment can normally return information, the tested iOS equipment can be normally called, namely the tested iOS equipment is in an on-line state; if the detected iOS device fails to return information or fails to detect within the preset time, the detected iOS device is indicated to be unable to be normally called, that is, the detected iOS device is in an offline state, and at this time, the service to the detected iOS device should be restarted.
Step S202, state information and device information of the iOS device under test are published to message middleware coupled with upper layer devices, wherein the upper layer devices comprise Web servers or terminals running automated test tools.
In the embodiment of the application, the upper-layer device includes a Web server or a terminal running an automated test tool, which is called an upper-layer device because these devices are located on top of the whole processing logic from the processing logic of the data stream, where the Web server may also be connected to a display end, and the entity of the display end may be a display device, on which a Web page is presented by the client, i.e. a Web browser, through which a user may interact with the Web server. And the terminal of the automatic test tool can be connected with the tested iOS equipment through the industrial control computer after the IP address and the forwarding port address of the industrial control computer are acquired, and the automatic test script is operated to start testing the tested iOS equipment.
Unlike the prior art, in the embodiment of the present application, an upper layer device is coupled to a message middleware, such as a Redis database or other message middleware, such as Rabbitmq, activatemq, etc. After the industrial control computer acquires the state information and the equipment information of the tested iOS equipment, the information is published to the message middleware in real time. The upper layer device subscribes the state information and the device information of the tested iOS device from the message middleware periodically or in real time, so that the situation that the upper layer device has to acquire the state information and the device information of the tested iOS device from the industrial control computer is avoided, decoupling of the upper layer device and the industrial control computer is realized, and the expansion of a system is facilitated. For example, assuming that no message middleware exists as in the prior art, the industrial control computer and the upper device need to know the IP address of each other to realize that the industrial control computer transmits the state information and the device information of the iOS device under test to the upper device. Thus, when the new industrial control computer needs to be added, the new industrial control computer and the upper-layer device need to know the IP address of each other, which means that some additional works such as configuration and packaging need to be done again. However, after adding the message middleware coupled with the upper-layer device, the upper-layer device can acquire the state information and the device information of the tested iOS device from the message middleware without interacting with the industrial control computer because the state information and the device information of the tested iOS device are issued to the message middleware in real time by the industrial control computer. Since the upper layer device does not need to interact with the industrial control computer, the new addition of the industrial control computer is no longer associated with the upper layer device, thereby decoupling the upper layer device from the industrial control computer, and expanding the system (e.g., by increasing the number of industrial control computers) becomes exceptionally convenient.
Step S203, if it is determined that the tested iOS device is online according to the status information of the tested iOS device, a test instruction for the tested iOS device, which is returned from the upper device, is received.
As described above, it is determined whether the iOS device under test is online, and the state of the iOS device under test can be continuously detected by one thread maintained by the industrial control computer. If the iOS device under test is able to return information normally, for example, a specific value indicating the state of the iOS device, it indicates that the iOS device under test may be invoked normally, and the state of the iOS device under test is online. After determining that the iOS device to be tested is online, a test instruction for the iOS device to be tested, which is returned from the upper device, may be received and ready to be sent to the iOS device to be tested, where the test instruction is an instruction obtained by the upper device analyzing an operation performed by a user on a screen of the iOS device to be tested, which is displayed in real time on a display end of the upper device, and encapsulating the operation into a format that can be recognized by an industrial control computer. As to how to display the screen of the iOS device under test on the display side of the upper device in real time, reference is made to the description of the following embodiments.
Step S204, a test instruction for the tested iOS device is sent to the tested iOS device through connection with the tested iOS device.
As described above, the connection with the iOS device to be tested is established through the analog integrated development environment, and the industrial control computer can interact with the iOS device to be tested, so that the iOS device to be tested can respond quickly, even if the test instruction is sent, and the iOS device to be tested can be sent quickly in an ideal state in consideration of real-time performance, i.e. operation of a user to input at the display end of the upper device is desired. As an embodiment of the application, sending the test instruction for the iOS device under test to the iOS device under test through the connection with the iOS device under test may be optimizing the connection of the industrial control computer and the iOS device under test to a long connection of the industrial control computer and the iOS device under test, calling a private interface of the iOS device under test, and sending the test instruction to the iOS device under test through the long connection of the industrial control computer and the iOS device under test. Here, the long connection between the industrial control computer and the iOS device under test is realized by a socket (socket), which means that a plurality of data packets can be continuously transmitted over one connection, and if no data packet is transmitted during connection maintenance, both the client and the server need to transmit a link detection packet, and only one socket object is used. As an embodiment of the present application, optimizing the connection between the industrial control computer and the iOS device under test to be a long connection between the industrial control computer and the iOS device under test, invoking a private interface of the iOS device under test, and sending a test instruction to the iOS device under test through the long connection between the industrial control computer and the iOS device under test may be: after the handshake request between the industrial control computer and the tested iOS equipment is successful, the tested iOS equipment sends a data request to the industrial control computer, sends a heartbeat packet to the industrial control computer at regular time, maintains long connection in a multi-channel multiplexing mode with the industrial control computer, calls a private interface of the tested iOS equipment, and sends a test instruction to the tested iOS equipment through the long connection in the multi-channel multiplexing mode of the tested iOS equipment, wherein the long connection in the multi-channel multiplexing mode with the industrial control computer can be: initiating a connection request to an industrial control computer, and establishing connection after the industrial control computer receives the connection request; the method comprises the steps of performing data interaction with an industrial control computer by using a multichannel transceiving mode; after the data interaction is completed, the long connection in the multi-channel multiplexing mode is kept for use in the next data interaction, and obviously, the data interaction comprises the industrial control computer sending a test instruction to the iOS device to be tested.
Step S205, uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
In order to improve transmission efficiency and reduce delay of instruction response, in the embodiment of the application, the connection between the industrial control computer and the upper device is also a socket-based long connection, and the industrial control computer can upload an operation result returned after the tested iOS device executes the test instruction to the upper device through the long connection, and the display end of the upper device displays the operation result.
It should be noted that, in the embodiment of the present application, the test instruction is a generic term. In principle, any operation that may be executed on a real iOS device may correspond to the parsed instruction, which may constitute the test instruction in the embodiments of the present application. For example, clicking, sliding, clicking a home button on a screen of the real iOS device, and operations such as shortcut setting, text input, application list presentation, application installation, and application uninstallation performed on the real iOS device, which are performed on the screen of the detected iOS device presented on a display end of the upper device, all the same operations performed on the detected iOS device can be resolved into test instructions by the upper device, and a specific resolving process can refer to the related description of the subsequent embodiments.
Indeed, a user (here, a person who has a test requirement on the iOS device or needs to perform a test operation on the iOS device) may implement the operation on the iOS device under test by inputting a command at the display end of the upper device, however, this is not the best choice for most users, and is more suitable for the use habit of the user to perform the operation on the iOS device under test. Since the iOS device under test is not a local device but is connected to an upper device through a network with respect to the user, the user cannot manipulate the iOS device under test locally. One possible method is to enable the screen of the iOS device under test to be displayed on the display side of the upper device, so that the user can remotely control the iOS device under test through the display side of the upper device as if the iOS device under test is locally controlled.
Therefore, the method provided by the embodiment of the application further comprises the steps of receiving the screen shot of the tested iOS device, and optimizing the screen shot of the tested iOS device, so that the screen of the tested iOS device is displayed on the display end of the upper device in real time. In other words, to enable the screen of the iOS device under test to be displayed on the display end of the upper layer device, one precondition is that the screen of the iOS device under test can be quickly captured on the iOS device under test, and then the screen capture of the iOS device under test obtained by the screen capture is quickly uploaded to the upper layer device, and then the screen capture of the iOS device under test obtained by the screen capture is quickly refreshed on the display end like a slide show (PPT), which means that as long as the screen capture of the iOS device under test obtained per second is enough, and meanwhile, the screen capture of the iOS device under test is quickly transmitted, and the screen capture of the iOS device under test can be displayed on the display end like the screen capture of the real iOS device. Considering that the frame rate of the image transmission needs to reach at least 15 frames/second to be seen by the human eye so as not to feel significant jamming of the picture, in the above embodiment, "fast enough" means that more than 15 screen shots of the iOS device under test need to be acquired per second.
In this embodiment of the present application, the screenshot of the iOS device under test may specifically be: optimizing the connection of the industrial control computer and the iOS device to be tested into a long connection with the iOS device to be tested; calling a private interface of the tested iOS device, and continuously receiving a compressed screenshot of a screen of the tested iOS device through long connection of an industrial control computer and the tested iOS device to obtain a screenshot image stream of the tested iOS device, wherein the compressed screenshot of the screen of the tested iOS device is obtained by compressing the screenshot of the tested iOS device; and the screen capture of the tested iOS device is optimized, so that the screen of the tested iOS device can be displayed on the display end of the upper device in real time: based on a video coding algorithm, converting a screen capture picture stream of the detected iOS device into a screen capture video stream of the detected iOS device, and uploading the screen capture video stream of the detected iOS device to the upper device so as to display a screen of the detected iOS device on a display end of the upper device after decoding the screen capture video stream. In the above embodiment, the optimization of the connection between the industrial control computer and the iOS device to be tested is the same as the optimization of the connection between the industrial control computer and the iOS device to be tested in the foregoing embodiment, and the description thereof will not be repeated.
The screen of the iOS device under test presented at the display end of the upper layer device is essentially the screen shots of the iOS device under test, and the presenting process is the process of "showing" the screen shots, the screen of the iOS device under test is to be displayed at the display end of the upper layer device in real time, and the key or each processing link is as fast as possible. In the above embodiment, it has been described that the compressed screen shots of the screen of the measured iOS device are obtained by compressing the screen shots of the measured iOS device, so as to reduce the capacity of the screen shots of the measured iOS device, and by calling the private interface of the measured iOS device and the long connection between the industrial control computer and the measured iOS device, the delay of transmission is reduced, and these may be regarded as the process of presenting the early stage or the early link of the screen of the measured iOS device at the display end of the upper device, and the later stage, that is, "showing" the screen shots of the measured iOS device, or the process of converting the screen shot image stream of the measured iOS device into the screen shot video stream of the measured iOS device based on the video coding algorithm and uploading the screen shot video stream of the measured iOS device to the upper device.
In one embodiment of the present application, based on a video encoding algorithm, converting a screenshot picture stream of a measured iOS device into a screenshot video stream of the measured iOS device, and uploading the screenshot video stream of the measured iOS device to an upper device may be: and determining difference pixels between non-key image frames and key image frames in the screenshot picture stream of the detected iOS device, and carrying out coding compression on the key image frames and the difference pixels in the screenshot picture stream of the detected iOS device based on a video coding algorithm so as to form the screenshot video stream of the detected iOS device. The video encoding algorithm herein may be a video compression algorithm such as H264, H265, etc., which is not limited in this application. It should be noted that, in the embodiment of the present application, the key image frames in the screenshot image stream of the iOS device to be tested may be acquired first, then, in the encoding compression process, the difference pixels between the non-key image frames and the key image frames may be determined, and then, encoding compression may be performed. Because the screen capturing video stream of the tested iOS device is formed by encoding and compressing the image frames, the compression amount is reduced by compressing the image frames into the video stream only once aiming at the same pixel, the data transmission amount is greatly reduced, the bandwidth is saved, and the picture blocking phenomenon is further reduced.
As an embodiment of the application, based on a video coding algorithm, encoding and compressing key image frames and difference pixels in a screenshot video stream of an iOS device under test to form a screenshot video stream of the iOS device under test can be implemented through steps S1 to S3, which are described as follows:
step S1: when the screen capturing picture stream of the detected iOS equipment is an image frame in an RGB format, converting the image frame in the RGB format into an image frame in a YUV format so as to obtain a plurality of image frames in the YUV format.
The YUV format refers to a pixel format in which luminance parameters and chrominance parameters are separately expressed, and the advantage of separating the luminance parameters and the chrominance parameters is that not only mutual interference can be avoided, but also the sampling rate of chrominance can be reduced without greatly affecting the image quality. Because YUV does not require three independent video signals to be transmitted simultaneously like RGB, in the embodiment of the present application, the image frames in RGB format are converted into the image frames in YUV format for transmission, which can occupy very little bandwidth and save a lot of resources.
Step S2: and respectively carrying out coding compression on the plurality of YUV format image frames by a preset coding method to form image data packets corresponding to the plurality of YUV format image frames.
In the process of respectively encoding and compressing the image frames in the plurality of YUV formats through a preset encoding method, parameters of preset video encoding software can be adjusted to ensure video quality, speed up encoding and compressing and reduce delay of video streams, wherein the parameters of the video encoding software can comprise code rate, width and height of pictures during encoding and compressing, video frequency, how many frames are required to restore normal pictures after frame loss, delay frame number input from an encoder to output from a decoder, the number of threads of encoding and compressing, encoding format, encoding and compressing algorithm and the like. When forming an image data packet corresponding to the image frames in the plurality of YUV formats, a sequence number corresponding to the image frame and a time stamp corresponding to the generated image data packet may be written into the image frame, for example, the image frames may be numbered while being generated such that each image frame has a corresponding sequence number, then when forming the image data packet according to the image frame shape, the corresponding time stamp is acquired, and the sequence number of the image frame and the time stamp corresponding to the image data packet are added to the image data packet corresponding to the image frames in the plurality of YUV formats.
Step S3: and generating a screen capturing video stream of the iOS device to be tested according to the plurality of image data packets.
Through the technical scheme, the transmission quantity of data can be reduced, the blocking of the screen capturing video stream is reduced, and the real-time performance of screen display is improved.
After the above-mentioned main operation of displaying the screen of the tested iOS device on the display end of the upper layer device in real time is completed, the user can operate the tested iOS device on the screen of the tested iOS device displayed on the display end of the upper layer device in real time like operating the iOS device on the real iOS device, and at this time, in step S203 of the foregoing embodiment, the receiving the test instruction for the tested iOS device sent back from the upper layer device may specifically be: optimizing the connection of the industrial control computer and the upper equipment to be a long connection of the industrial control computer and the upper equipment; and receiving a test instruction aiming at the tested iOS device through long connection of the industrial control computer and the upper device, wherein the test instruction is an operation of a user on the tested iOS device on a screen of the tested iOS device displayed at the display end of the upper device in real time, and is obtained after analysis and encapsulation of the upper device. In other words, through the technical solution provided in the foregoing embodiment, the screen of the iOS device under test is displayed on the display end of the upper device in real time, and the user performs some operations on the iOS device under test on the screen of the iOS device under test that is displayed in real time, and these test instructions that can be identified by the industrial control computer are obtained after being resolved and packaged by the upper device, and are transmitted to the industrial control computer through the long connection established between the upper device and the industrial control computer.
As can be seen from the above-mentioned iOS device testing method illustrated in fig. 2, on one hand, since the analog integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS device, in the iOS device testing process, the connection with the iOS device to be tested can be realized through the analog integrated development environment, so that the connection with the iOS device does not need to be an iOS-based computer, and thus the dependence on the iOS is eliminated; on the other hand, the state information and the device information of the measured iOS device are released to the message middleware coupled with the upper device, which means that the upper device (for example, a Web server, etc.) can directly obtain the state information and the device information of the measured iOS device from the message middleware, so that the decoupling of the upper device by the industrial control computer can be realized, and the expansion of the system is convenient.
The steps S201 to S204 illustrated in fig. 2 are technical solutions of the present application using an industrial control computer as an execution subject, and fig. 3 illustrates the technical solutions of the present application using the above-layer device as an execution subject, and mainly include steps S301 to S304:
step S301: and displaying the screen of the tested iOS equipment on a display end in real time.
As described above, the industrial control computer converts the screenshot of the iOS device under test obtained from the iOS device under test into a screenshot video stream of the iOS device under test according to the video coding algorithm, and then uploads the screenshot video stream of the iOS device under test to the upper device. At this time, the upper layer device performs an operation opposite to the industrial control computer on the screen capturing video stream of the iOS device under test, i.e., performs a decoding operation on the screen capturing video stream of the iOS device under test. The upper layer device sends the decoded data to the display end, the display end renders the image frame in real time, and the screen of the tested iOS device is presented.
Step S302: analyzing the operation performed by the screen of the tested iOS device displayed by the user at the display end in real time, and packaging the operation into a test instruction aiming at the tested iOS device.
In the embodiment of the present application, the operations performed by the user (the user mentioned in the foregoing embodiment is the same as the user mentioned in the foregoing embodiment, and refers to the person who has a test requirement on the iOS device or needs to perform a test operation on the iOS device) on the screen of the iOS device to be tested, where the operations performed by the screen of the iOS device to be tested are mainly classified into two types, and one type mainly includes clicking, sliding, clicking, shortcut setting, and text input on the screen of the iOS device to be tested, and the other type mainly includes application list presentation, application installation, application uninstallation, and the like. The operations firstly occur on the Web page at the display end, then the Web page is transmitted to the upper-layer equipment and then is analyzed by the upper-layer equipment, and finally, the Web page is packaged into data in a format which can be understood by an industrial control computer, namely, a test instruction.
For the operation of the screen of the iOS device under test, the principle is described by merely taking sliding on the screen of the iOS device under test as an example, and other operation principles are similar and will not be described in detail. First, the display terminal simulates an operation on a Web page displayed by the display terminal, converts the simulated operation into data such as specific point coordinates (including start coordinates and end coordinates), duration and the like, and sends the data to an upper device (for example, a Web server, etc.), the upper device analyzes the data, analyzes a sliding operation instruction, further combines the sliding operation instruction, and encapsulates the sliding operation instruction into a format which can be understood by an industrial control computer, namely, a test instruction (the test instruction is seen as a sliding operation instruction by the iOS device to be tested, and the sliding operation instruction is still a test instruction because the test instruction is used for testing the response of the iOS device to the sliding operation).
For operation with respect to an application, the industrial control computer implements a Web service based on tornado, listening in real-time for requests from an upper device (e.g., web server) that are actually issued by the user from the display side of the upper device. When a request is received, such as an application list, application installation, or application uninstallation, the Web service on the industrial control computer correspondingly performs the relevant operation. For example, when a user needs to obtain an application list on the iOS device under test, after an application list presentation request sent from a Web page on a display end is sent to an upper layer device, the upper layer device parses the request and encapsulates the request into a corresponding test instruction (the test instruction is an instruction for requesting to present the application list in view of the iOS device under test, and the test instruction is still a test instruction because the test instruction is used for testing the response of the iOS device under test to the operation of requesting to present the application list); when a user needs to install an application on an iOS device to be tested, the user needs to send an IPA inclusion of the application of the iOS device to an upper device from an interface provided on a Web page of a display end, the upper device analyzes the IPA inclusion and returns an IPA inclusion address link for downloading to the Web page of the display end, then the upper device analyzes the IPA inclusion address link, and packages a request of application installation as a test instruction (the test instruction is an instruction for requesting to install the application in view of the iOS device to be tested, and the test instruction is a test instruction for testing the response of the iOS device to the operation for requesting to install the application, so the instruction for requesting to install the application is still a test instruction); for the operation of application uninstallation, the test instruction that is packaged to be specific to the iOS device under test is similar to the foregoing embodiment, and will not be described in detail.
Step S303: and sending a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through the simulation integrated development environment, so that the test instruction is received by the industrial control computer and then sent to the tested iOS device through the connection of the industrial control computer and the tested iOS device.
After the test instruction obtained by the encapsulation of the upper device is sent to the industrial control computer through the long connection between the upper device and the industrial control computer, the industrial control computer sends the test instruction to the iOS-Tagent service of the iOS device to be tested by using the connection (which may be a socket-based long connection as in the foregoing embodiment) established between the upper device and the iOS device to be tested through the analog integrated development environment.
Step S304: and receiving an operation result returned after the tested iOS equipment uploaded by the industrial control computer executes the test instruction.
The iOS-Tagent service on the tested iOS device receives the test instruction, rapidly responds to the test instruction, uploads the operation result of the test instruction to the industrial control computer through the long connection between the industrial control computer and the industrial control computer, the industrial control computer uploads the operation result to the upper device, and the upper device displays the operation result on the display end of the upper device.
As can be seen from the above-mentioned iOS device testing method illustrated in fig. 3, on one hand, since the analog integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS device, in the iOS device testing process, the connection with the iOS device to be tested can be realized through the analog integrated development environment, so that the connection with the iOS device does not need to be an iOS-based computer, and thus the dependence on the iOS is eliminated; on the other hand, as the screen of the tested iOS device is displayed on the display end of the upper device in real time, the user can control the tested iOS device on the display end of the upper device, and remote test of the tested iOS device is realized.
The steps S301 to S304 illustrated in fig. 3 are the above-mentioned devices for describing the technical solution of the present application by using the iOS device to be tested as the execution subject, and fig. 4 mainly includes steps S401 to S405:
step S401: and performing screenshot and compression on the screen of the tested iOS device to obtain a compressed screenshot of the screen of the tested iOS device.
The screen capture of the iOS device under test may be based on iOS-Tagent modified from the Facebook open-source tool Web Driver Agent (WDA). After obtaining a screenshot of the tested iOS device by using the iOS-taggent, removing auxiliary information and redundant information of the screenshot of the tested iOS device according to a preset mode, setting compression parameters for original picture data of the screenshot of the tested iOS device, from which the auxiliary and redundant information are removed, compressing the compressed screenshot of the screen of the tested iOS device into a preset format type, specifically, removing auxiliary information in the screenshot of the tested iOS device when the screenshot of the tested iOS device is in a PNG format, and further, removing blocks of the tested iOS device as auxiliary data from the screenshot of the tested iOS device if the screenshot of the tested iOS device contains transparent channel data, wherein the other data except the transparent channel data in the auxiliary blocks are removed as redundant data, and the RGB color values of transparent pixels in the transparent channel data are modified into preset color values; after the screen capturing of the tested iOS equipment with the auxiliary and redundant information removed is obtained, when the screen capturing format of the tested iOS equipment is PNG format, selecting various combinations from preset filtering types and preset compression parameters, performing traversal compression on the screen capturing of the tested iOS equipment with the auxiliary and redundant information removed, and selecting the result with the maximum compression rate from the result after the preset times as the compressed result, namely, the compressed screenshot of the screen of the tested iOS equipment.
Step S402: the method comprises the steps of connecting detected iOS equipment and an industrial control computer by adopting an analog integrated development environment, and transmitting compressed screenshot of a screen of the detected iOS equipment back to the industrial control computer, so that the industrial control computer processes the compressed screenshot of the screen of the detected iOS equipment into a screenshot video stream of the detected iOS equipment and then uploads the screenshot video stream to upper equipment, and the upper equipment decodes the screenshot video stream and then displays the screen of the detected iOS equipment on a display end of the upper equipment in real time.
And the compressed screenshot of the screen of the tested iOS device is transmitted back to the industrial control computer through the connection between the tested iOS device and the industrial control computer, which is established by adopting the analog integrated development environment. As for how the industrial control computer processes the compressed screenshot of the screen of the iOS device to be tested into the screenshot video stream of the iOS device to be tested and then uploads the screenshot video stream to the upper device, and how the upper device decodes the screenshot video stream and then displays the screen of the iOS device to be tested on the display end of the upper device in real time, the relevant description of the foregoing embodiments may be referred to, and details will not be repeated here.
Step S403: and receiving a test instruction aiming at the iOS equipment to be tested, which is sent by the industrial control computer.
It should be noted that, the test instruction sent by the industrial control computer for the tested iOS device actually comes from the upper device, specifically, the user performs an operation on the screen of the tested iOS device displayed in real time on the display end, the operation is transmitted to the upper device, and the upper device parses and encapsulates the operation into the test instruction which can be identified by both the industrial control computer and the tested iOS device, and then the test instruction is transmitted to the tested iOS device through the industrial control computer.
Step S404: executing the test instruction for the iOS device under test.
As previously described, the test instruction for the iOS device under test may be, for example, an instruction corresponding to clicking, sliding, clicking of a home key on a screen, shortcut setting, text input, application list presentation, application installation, and application uninstallation, and the like.
Step S405: and the operation result obtained by executing the test instruction is transmitted back to the industrial control computer through the connection between the tested iOS device and the industrial control computer, so that the industrial control computer uploads the operation result to the upper device, wherein the upper device is coupled to the message middleware, and the message middleware receives the state information and the device information of the tested iOS device issued by the industrial control computer.
It should be noted that, in the embodiment of the present application, the upper layer device is coupled not only to the message middleware but also to the database. Although the message middleware and the database both store the state information and the device information of the iOS device under test, the database can store the state information and the device information of the iOS device under test for a long time as a more powerful and larger-capacity storage body, and the message middleware only needs to temporarily store the state information and the device information of the iOS device under test.
As can be seen from the above-mentioned iOS device testing method illustrated in fig. 4, on one hand, since the analog integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS device, in the iOS device testing process, the connection with the iOS device to be tested can be realized through the analog integrated development environment, so that the connection with the iOS device does not need to be an iOS-based computer, and thus the dependence on the iOS is eliminated; on the other hand, the industrial control computer processes the compressed screenshot of the screen of the tested iOS device into a screenshot video stream of the tested iOS device, and then uploads the screenshot video stream to the upper device, the upper device decodes the screenshot video stream and then displays the screen of the tested iOS device on the display end of the upper device in real time, and a user can control the tested iOS device on the display end of the upper device, so that remote testing of the tested iOS device is realized.
In order to facilitate better implementation of the iOS device testing method of the embodiment of the application, the embodiment of the application also provides an iOS device testing device. Please refer to fig. 5, which is a schematic structural diagram of an iOS device testing apparatus according to an embodiment of the present application. The apparatus illustrated in fig. 5 may be an industrial control computer or a functional module therein, and the apparatus may include an information acquisition module 501, an information distribution module 502, a first receiving module 503, a first transmitting module 504, and a first uploading module 505, where:
The information obtaining module 501 is configured to obtain status information and device information of the iOS device to be tested through connection between an industrial control computer and the iOS device to be tested, where the analog integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS device;
an information publishing module 502, configured to publish status information and device information of an iOS device under test to a message middleware coupled to an upper device, where the upper device includes a Web server or a terminal running an automated test tool;
a first receiving module 503, configured to receive a test instruction for the iOS device under test, where the test instruction is sent back from an upper device if it is determined that the iOS device under test is online according to the status information of the iOS device under test;
a first sending module 504, configured to send a test instruction for the iOS device under test to the iOS device under test through connection between the industrial control computer and the iOS device under test;
the first uploading module 505 is configured to upload, to an upper device, an operation result returned after the tested iOS device executes the test instruction.
Referring to fig. 6, another schematic structural diagram of the iOS device testing apparatus according to the embodiment of the present application is shown. Fig. 6 differs from fig. 5 in that: the iOS device testing apparatus further comprises a second receiving module 601 and a first optimizing module 602, wherein:
A second receiving module 601, configured to receive a screenshot of the iOS device under test;
the first optimizing module 602 is configured to optimize the screenshot of the iOS device under test, so that the screen of the iOS device under test is displayed on the display end of the upper device in real time.
Optionally, the second receiving module 601 illustrated in fig. 6 is specifically configured to optimize a connection between the industrial control computer and the iOS device under test as a long connection between the industrial control computer and the iOS device under test, call a private interface of the iOS device under test, and continuously receive, through the long connection between the industrial control computer and the iOS device under test, a compressed screenshot of a screen of the iOS device under test to obtain a screenshot film of the iOS device under test, where the compressed screenshot of the screen of the iOS device under test is obtained by compressing a screenshot of the iOS device under test.
Optionally, the first optimizing module 602 illustrated in fig. 6 is specifically configured to convert the screenshot picture stream of the iOS device under test into the screenshot video stream of the iOS device under test, upload the screenshot video stream of the iOS device under test to the upper device, so as to display the screen of the iOS device under test on the display end of the upper device after decoding the screenshot video stream.
Optionally, the converting the screenshot image stream of the iOS device to be tested into the screenshot video stream of the iOS device to be tested based on the video coding algorithm may be: and determining difference pixels between non-key image frames and key image frames in the screenshot picture stream of the detected iOS device, and carrying out coding compression on the key image frames and the difference pixels based on a video coding algorithm to form the screenshot video stream of the detected iOS device.
Optionally, the converting the screenshot picture stream of the iOS device to be tested into the screenshot video stream of the iOS device to be tested based on the video coding algorithm may further be: when the screen capturing picture stream of the detected iOS equipment is an image frame in an RGB format, converting the image frame in the RGB format into the image frame in a YUV format to obtain a plurality of image frames in the YUV format, respectively carrying out coding compression on the image frames in the YUV format through a preset coding method to form an image data packet corresponding to the image frames in the YUV format, and generating the screen capturing video stream of the detected iOS equipment according to the image data packets.
Optionally, the first receiving module 503 illustrated in fig. 6 is specifically configured to optimize connection between the industrial control computer and the upper device to long connection between the industrial control computer and the upper device, and receive, through long connection between the industrial control computer and the upper device, a test instruction for the iOS device to be tested, where the test instruction is obtained after the upper device analyzes an operation performed by a user on a screen displayed in real time, and encapsulates the operation.
Optionally, the first sending module 504 illustrated in fig. 5 is specifically configured to optimize the connection between the industrial control key computer and the iOS device under test to be a long connection between the industrial control key computer and the iOS device under test, call a private interface of the iOS device under test, and send a test instruction to the iOS device under test through the long connection between the industrial control key computer and the iOS device under test.
As can be seen from the iOS device testing apparatuses illustrated in fig. 5 and 6, on one hand, since the analog integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS device, in the process of testing the iOS device, the connection with the iOS device to be tested can be realized through the analog integrated development environment, so that the connection with the iOS device is not required to be an iOS-based computer, and the dependence on the iOS is eliminated; on the other hand, the state information and the device information of the measured iOS device are released to the message middleware coupled with the upper device, which means that the upper device (for example, a Web server, etc.) can directly obtain the state information and the device information of the measured iOS device from the message middleware, so that the decoupling of the upper device by the industrial control computer can be realized, and the expansion of the system is convenient.
Please refer to fig. 7, which is a schematic structural diagram of an iOS device testing apparatus according to an embodiment of the present application. The apparatus illustrated in fig. 7 may be an upper layer device or a functional module therein, and the apparatus may include a real-time processing module 701, an parsing module 702, a second transmitting module 703, and a third receiving module 704, where:
the real-time processing module 701 is configured to display a screen of the iOS device under test on a display end in real time;
The analysis module 702 is configured to analyze an operation performed by a user on a screen displayed in real time, and encapsulate the operation into a test instruction for the iOS device under test;
a second sending module 703, configured to send a test instruction for the iOS device under test to an industrial control computer connected to the iOS device under test through the analog integrated development environment, so that the test instruction is received by the industrial control computer, and then sent to the iOS device under test through connection between the industrial control computer and the iOS device under test;
and the third receiving module 704 is configured to receive an operation result returned after the tested iOS device uploaded by the industrial control computer executes the test instruction.
As can be seen from the iOS device testing apparatus illustrated in fig. 7, on one hand, since the analog integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS device, in the iOS device testing process, the connection with the iOS device to be tested can be achieved through the analog integrated development environment, so that the connection with the iOS device does not need to be an iOS-based computer, and thus the dependence on the iOS is eliminated; on the other hand, as the screen of the tested iOS device is displayed on the display end of the upper device in real time, the user can control the tested iOS device on the display end of the upper device, and remote test of the tested iOS device is realized.
Please refer to fig. 8, which is a schematic structural diagram of an iOS device testing apparatus according to an embodiment of the present application. The apparatus illustrated in fig. 8 may be an iOS device under test or a functional module therein, and the apparatus may include a screen capture processing module 801, a first backhaul module 802, a fourth receiving module 803, an instruction execution module 804, and a second backhaul module 805, where:
the screen capturing processing module 801 is configured to capture and compress a screen of the iOS device under test to obtain a compressed screen capture of the iOS device under test;
the first feedback module 802 is configured to, through connection with the industrial control computer established by using the analog integrated development environment, feedback the compressed screenshot of the screen of the iOS device under test to the industrial control computer, so that the industrial control computer processes the compressed screenshot of the screen of the iOS device under test into a screenshot video stream of the iOS device under test, and then uploads the screenshot video stream to the upper device, and the upper device decodes the screenshot video stream and then displays the screen of the iOS device under test on a display end of the upper device in real time;
a fourth receiving module 803, configured to receive a test instruction for the iOS device under test sent by the industrial control computer;
an instruction execution module 804 for executing the test instruction;
And the second feedback module 805 is configured to feedback an operation result obtained by executing the test instruction to the industrial control computer through the connection between the detected iOS device and the industrial control computer, so that the industrial control computer uploads the operation result to an upper device, where the upper device is coupled to a message middleware, and the message middleware receives state information and device information of the detected iOS device issued by the industrial control computer.
As can be seen from the iOS device testing apparatus illustrated in fig. 8, on one hand, since the analog integrated development environment is an integrated development environment obtained by simulating the native integrated development environment of the iOS device, in the iOS device testing process, the connection with the iOS device to be tested can be achieved through the analog integrated development environment, so that the connection with the iOS device does not need to be an iOS-based computer, and thus the dependence on the iOS is eliminated; on the other hand, the industrial control computer processes the compressed screenshot of the screen of the tested iOS device into a screenshot video stream of the tested iOS device, and then uploads the screenshot video stream to the upper device, the upper device decodes the screenshot video stream and then displays the screen of the tested iOS device on the display end of the upper device in real time, and a user can control the tested iOS device on the display end of the upper device, so that remote testing of the tested iOS device is realized.
All the above technical solutions may be combined to form an optional embodiment of the present application, which is not described here in detail.
Correspondingly, the embodiment of the application also provides a computer device, which can be a terminal or a server, wherein the terminal can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and the like. As shown in fig. 9, fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 900 includes a processor 901 having one or more processing cores, a memory 902 having one or more computer readable storage media, and a computer program stored on the memory 902 and executable on the processor. The processor 901 is electrically connected to the memory 902. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Processor 901 is a control center of computer device 900, connecting the various parts of the entire computer device 900 using various interfaces and lines, performing various functions of computer device 900 and processing data by running or loading software programs and/or modules stored in memory 902, and invoking data stored in memory 902, thereby performing overall monitoring of computer device 900.
In the embodiment of the present application, the processor 901 in the computer device 900 loads the instructions corresponding to the processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 executes the application programs stored in the memory 902, so as to implement the following functions: acquiring state information and equipment information of the tested iOS equipment through connection with the tested iOS equipment established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS equipment; the method comprises the steps that state information and device information of an iOS device to be tested are distributed to message middleware coupled with upper-layer devices, wherein the upper-layer devices comprise Web servers or terminals running automated testing tools; if the online of the tested iOS equipment is determined according to the state information of the tested iOS equipment, receiving a test instruction which is returned from the upper-layer equipment and is aimed at the tested iOS equipment; transmitting a test instruction for the iOS device under test to the iOS device under test through connection with the iOS device under test; uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
Alternatively, in the embodiment of the present application, the processor 901 in the computer device 900 loads the instructions corresponding to the processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 executes the application programs stored in the memory 902, so as to implement the following functions: displaying the screen of the tested iOS equipment on a display end in real time; analyzing the operation performed by the screen of the tested iOS equipment displayed by the user at the display end in real time, and packaging the operation into a test instruction aiming at the tested iOS equipment; transmitting a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through the analog integrated development environment, so that the test instruction is transmitted to the tested iOS device through the connection between the industrial control computer and the tested iOS device after the industrial control computer receives the test instruction; and receiving an operation result returned after the tested iOS equipment uploaded by the industrial control computer executes the test instruction.
Alternatively, in the embodiment of the present application, the processor 901 in the computer device 900 loads the instructions corresponding to the processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 executes the application programs stored in the memory 902, so as to implement the following functions: screenshot and compression are carried out on the screen of the tested iOS device, and a compressed screenshot of the screen of the tested iOS device is obtained; the method comprises the steps that compressed screen shots of a screen of an iOS device to be tested are transmitted back to an industrial control computer through connection between the iOS device to be tested and the industrial control computer, so that the industrial control computer processes the compressed screen shots of the screen of the iOS device to be tested into a screen capturing video stream of the iOS device to be tested and then uploads the screen capturing video stream to upper-layer equipment, and the upper-layer equipment decodes the screen capturing video stream and then displays the screen of the iOS device to be tested on a display end of the upper-layer equipment in real time; receiving a test instruction aiming at the iOS equipment to be tested, which is sent by an industrial control computer; executing a test instruction for the iOS device under test; and the operation result obtained by executing the test instruction is transmitted back to the industrial control computer through the connection between the tested iOS device and the industrial control computer, so that the industrial control computer uploads the operation result to the upper device, wherein the upper device is coupled to the message middleware, and the message middleware receives the state information and the device information of the tested iOS device issued by the industrial control computer.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 9, the computer device 900 further includes: a touch display 903, a radio frequency circuit 404, an audio circuit 905, an input unit 906, and a power supply 907. The processor 901 is electrically connected to the touch display 903, the radio frequency circuit 404, the audio circuit 905, the input unit 906, and the power supply 907, respectively. Those skilled in the art will appreciate that the computer device structure shown in FIG. 9 is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The touch display 903 may be used to display a graphical user interface and receive an operation instruction generated by a user acting on the graphical user interface. The touch display 903 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of a computer device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 901, and can receive and execute commands sent from the processor 901. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 901 to determine the type of touch event, and the processor 901 then provides a corresponding visual output on the display panel based on the type of touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display 903 to implement input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch display 903 may also implement an input function as part of the input unit 906.
In the embodiment of the application, a game application program executed by the processor 901 generates a graphical user interface on the touch display screen 903, where a virtual scene on the graphical user interface includes at least one skill control area, and the skill control area includes at least one skill control. The touch display 903 is used for presenting a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface.
The radio frequency circuitry 404 may be used to transceive radio frequency signals to establish wireless communications with a network device or other computer device via wireless communications.
The audio circuitry 905 may be used to provide an audio interface between a user and a computer device through a speaker, microphone. The audio circuit 905 may transmit the received electrical signal converted from audio data to a speaker, and convert the electrical signal into a sound signal to output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 905 and converted into audio data, which are processed by the audio data output processor 901 for transmission to, for example, another computer device via the radio frequency circuit 404, or which are output to the memory 902 for further processing. The audio circuit 905 may also include an ear bud jack to provide communication of the peripheral ear bud with the computer device.
The input unit 906 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 907 is used to power the various components of the computer device 900. Alternatively, the power supply 907 may be logically connected to the processor 901 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power supply 907 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 9, the computer device 900 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
As can be seen from the above, when the computer device provided in this embodiment sends the database operation instruction to the external database, the computer device intercepts the database operation instruction and executes the determined database operation, and synchronizes the data of the external database and the mirror database in real time according to the result of the database operation. Therefore, compared with the prior art that data is copied from the online database of the external service to the internal database in a whole manner to construct the mirror image data environment of the external service, the technical scheme of the application can construct the mirror image database in high efficiency and real time, and reduces the occupation of internal database resources.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the iOS device testing methods provided by the embodiments of the present application. For example, the computer program may perform the steps of: acquiring state information and equipment information of the tested iOS equipment through connection with the tested iOS equipment established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS equipment; the method comprises the steps that state information and device information of an iOS device to be tested are distributed to message middleware coupled with upper-layer devices, wherein the upper-layer devices comprise Web servers or terminals running automated testing tools; if the online of the tested iOS equipment is determined according to the state information of the tested iOS equipment, receiving a test instruction which is returned from the upper-layer equipment and is aimed at the tested iOS equipment; transmitting a test instruction for the iOS device under test to the iOS device under test through connection with the iOS device under test; uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
Alternatively, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the iOS device testing methods provided by the embodiments of the present application. For example, the computer program may perform the steps of: displaying the screen of the tested iOS equipment on a display end in real time; analyzing the operation performed by the screen of the tested iOS equipment displayed by the user at the display end in real time, and packaging the operation into a test instruction aiming at the tested iOS equipment; transmitting a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through the analog integrated development environment, so that the test instruction is transmitted to the tested iOS device through the connection between the industrial control computer and the tested iOS device after the industrial control computer receives the test instruction; and receiving an operation result returned after the tested iOS equipment uploaded by the industrial control computer executes the test instruction.
Alternatively, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the iOS device testing methods provided by the embodiments of the present application. For example, the computer program may perform the steps of: screenshot and compression are carried out on the screen of the tested iOS device, and a compressed screenshot of the screen of the tested iOS device is obtained; the method comprises the steps that compressed screen shots of a screen of an iOS device to be tested are transmitted back to an industrial control computer through connection between the iOS device to be tested and the industrial control computer, so that the industrial control computer processes the compressed screen shots of the screen of the iOS device to be tested into a screen capturing video stream of the iOS device to be tested and then uploads the screen capturing video stream to upper-layer equipment, and the upper-layer equipment decodes the screen capturing video stream and then displays the screen of the iOS device to be tested on a display end of the upper-layer equipment in real time; receiving a test instruction aiming at the iOS equipment to be tested, which is sent by an industrial control computer; executing a test instruction for the iOS device under test; and the operation result obtained by executing the test instruction is transmitted back to the industrial control computer through the connection between the tested iOS device and the industrial control computer, so that the industrial control computer uploads the operation result to the upper device, wherein the upper device is coupled to the message middleware, and the message middleware receives the state information and the device information of the tested iOS device issued by the industrial control computer.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any of the iOS device testing methods provided in the embodiments of the present application may be executed by the computer program stored in the storage medium, so that the beneficial effects that any of the iOS device testing methods provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not described herein.
The foregoing describes in detail an iOS device testing method, apparatus, storage medium and computer device provided in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (14)

1. An iOS device testing method, comprising:
acquiring state information and equipment information of tested iOS equipment through connection with the tested iOS equipment established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS equipment, and the analog integrated development environment runs on an industrial control machine;
the industrial control machine issues the state information and the equipment information of the iOS equipment to be tested to a message middleware coupled with upper equipment, wherein the upper equipment comprises a Web server or a terminal for running an automatic test tool;
the upper layer equipment subscribes the state information and the equipment information of the iOS equipment to be tested from the message middleware, and if the iOS equipment to be tested is determined to be online according to the state information, a test instruction which is returned from the upper layer equipment and aims at the iOS equipment to be tested is received;
transmitting the test instruction to the iOS device under test through the connection with the iOS device under test;
uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
2. The iOS device testing method according to claim 1, further comprising:
Receiving a screenshot of the iOS device under test;
and optimizing the screenshot so that the screen of the tested iOS equipment is displayed on the display end of the upper equipment in real time.
3. The iOS device testing method recited in claim 2, wherein the receiving a screenshot of the iOS device under test comprises: optimizing the connection with the iOS device under test as a long connection with the iOS device under test; calling a private interface of the tested iOS device, and continuously receiving a compressed screenshot of a screen of the tested iOS device through long connection with the tested iOS device to obtain a screenshot picture stream of the tested iOS device, wherein the compressed screenshot of the screen of the tested iOS device is obtained by compressing the screenshot of the tested iOS device;
and performing optimization processing on the screenshot to enable the screen of the tested iOS device to be displayed on the display end of the upper device in real time, wherein the optimization processing comprises the following steps: converting the screen capturing picture stream of the detected iOS equipment into the screen capturing video stream of the detected iOS equipment based on a video coding algorithm; uploading the screen capturing video stream of the tested iOS device to the upper layer device, so that the screen of the tested iOS device is displayed on the display end of the upper layer device after the screen capturing video stream is decoded.
4. The iOS device testing method according to claim 3, wherein the converting the screenshot picture stream of the iOS device under test into the screenshot video stream of the iOS device under test based on a video encoding algorithm comprises:
determining difference pixels between non-key image frames and key image frames in a screen capturing picture stream of the iOS device to be tested;
and based on the video coding algorithm, carrying out coding compression on the key image frames and the difference pixels to form a screen capturing video stream of the iOS device to be tested.
5. The iOS device testing method according to claim 3, wherein the converting the screenshot picture stream of the iOS device under test into the screenshot video stream of the iOS device under test based on a video encoding algorithm comprises:
when the screen capturing picture stream of the detected iOS equipment is an image frame in an RGB format, converting the image frame in the RGB format into an image frame in a YUV format so as to obtain a plurality of image frames in the YUV format;
respectively carrying out coding compression on the plurality of YUV format image frames by a preset coding method to form an image data packet corresponding to the plurality of YUV format image frames;
and generating a screen capturing video stream of the iOS device to be tested according to the plurality of image data packets.
6. The iOS device testing method according to claim 2, wherein the receiving a test instruction for the iOS device under test, which is returned from the upper layer device, comprises:
optimizing the connection with the upper layer device to a long connection with the upper layer device;
and receiving a test instruction aiming at the tested iOS equipment through long connection with the upper equipment, wherein the test instruction is obtained after the upper equipment analyzes the operation of a user on the screen displayed in real time and packages the operation.
7. The iOS device testing method according to claim 1, wherein the sending the test instruction to the iOS device under test through the connection with the iOS device under test comprises:
optimizing the connection with the iOS device under test as a long connection with the iOS device under test;
and calling a private interface of the iOS device to be tested, and sending the test instruction to the iOS device to be tested through long connection with the iOS device to be tested.
8. An iOS device testing method, comprising:
the upper layer device displays the screen of the tested iOS device on the display end in real time;
the upper layer equipment analyzes the operation performed by the user on the screen displayed in real time, and encapsulates the operation into a test instruction aiming at the iOS equipment to be tested;
The upper layer device sends a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through an analog integrated development environment, so that the industrial control computer receives the test instruction and then sends the test instruction to the tested iOS device through connection with the tested iOS device;
the upper device receives an operation result returned after the tested iOS device uploaded by the industrial control computer executes the test instruction;
the industrial control computer establishes connection with the tested iOS device through the simulation integrated development environment, acquires state information and device information of the tested iOS device, issues the state information and the device information to a message middleware connected with the upper device, and receives a test instruction for the tested iOS device, which is returned from the upper device, if the tested iOS device is determined to be online according to the state information.
9. An iOS device testing method, comprising:
screenshot and compression are carried out on a screen of the tested iOS device, and a compressed screenshot of the screen of the tested iOS device is obtained;
the method comprises the steps that through connection with an industrial control computer established by adopting an analog integrated development environment, a compressed screenshot of a screen of an iOS device to be tested is transmitted back to the industrial control computer, so that the industrial control computer processes the compressed screenshot of the screen of the iOS device to be tested into a screenshot video stream of the iOS device to be tested and then uploads the screenshot video stream to upper-layer equipment, and the upper-layer equipment decodes the screenshot video stream and then displays the screen of the iOS device to be tested on a display end of the upper-layer equipment in real time;
Receiving a test instruction aiming at the iOS equipment to be tested, which is sent by the industrial control computer;
executing the test instruction;
and transmitting the operation result obtained by executing the test instruction back to the industrial control computer through the connection with the industrial control computer so that the industrial control computer can upload the operation result to the upper-layer equipment, the upper-layer equipment is coupled to a message middleware, and the message middleware receives the state information and the equipment information of the tested iOS equipment issued by the industrial control computer.
10. An iOS device testing apparatus, comprising:
the information acquisition module is used for acquiring the state information and the equipment information of the tested iOS equipment through connection with the tested iOS equipment, which is established by an analog integrated development environment, wherein the analog integrated development environment is an integrated development environment obtained by simulating an original integrated development environment of the iOS equipment, and the analog integrated development environment runs on an industrial control machine;
the information release module is used for releasing the state information and the equipment information of the iOS equipment to be tested to a message middleware coupled with upper equipment, wherein the upper equipment comprises a Web server or a terminal for running an automatic test tool;
The first receiving module is used for subscribing the state information and the device information of the iOS device to be tested from the message middleware, and receiving a test instruction for the iOS device to be tested, which is returned from the upper device, if the iOS device to be tested is determined to be online according to the state information;
the first sending module is used for sending the test instruction to the iOS equipment to be tested through the connection with the iOS equipment to be tested;
and the first uploading module is used for uploading an operation result returned after the tested iOS device executes the test instruction to the upper device.
11. An iOS device testing apparatus, comprising:
the real-time processing module is used for displaying the screen of the tested iOS device on the display end in real time by the upper device;
the analysis module is used for analyzing the operation performed by the user on the screen displayed in real time by the upper-layer equipment and packaging the operation into a test instruction aiming at the iOS equipment to be tested;
the second sending module is used for sending a test instruction for the tested iOS device to an industrial control computer connected with the tested iOS device through an analog integrated development environment, so that the industrial control computer receives the test instruction and then sends the test instruction to the tested iOS device through connection with the tested iOS device;
The third receiving module is used for receiving an operation result returned after the tested iOS device uploaded by the industrial control computer executes the test instruction by the upper device;
the industrial control computer establishes connection with the tested iOS device through the simulation integrated development environment, acquires state information and device information of the tested iOS device, issues the state information and the device information to a message middleware connected with the upper device, and receives a test instruction for the tested iOS device, which is returned from the upper device, if the tested iOS device is determined to be online according to the state information.
12. An iOS device testing apparatus, comprising:
the screen capturing processing module is used for capturing and compressing the screen of the tested iOS equipment to obtain a compressed screen capturing of the screen of the tested iOS equipment;
the first return module is used for returning the compressed screenshot of the screen of the tested iOS device to the industrial control computer through connection with the industrial control computer established by adopting an analog integrated development environment, so that the industrial control computer processes the compressed screenshot of the screen of the tested iOS device into a screenshot video stream of the tested iOS device and then uploads the screenshot video stream to the upper device, and the upper device decodes the screenshot video stream and then displays the screen of the tested iOS device on a display end of the upper device in real time;
A fourth receiving module, configured to receive a test instruction for the iOS device under test sent by the industrial control computer;
the instruction execution module is used for executing the test instruction;
and the second feedback module is used for transmitting the operation result obtained by executing the test instruction back to the industrial control computer through the connection with the industrial control computer so that the industrial control computer can upload the operation result to the upper-layer equipment, the upper-layer equipment is coupled to a message middleware, and the message middleware receives the state information and the equipment information of the tested iOS equipment issued by the industrial control computer.
13. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded by a processor for performing the steps of the iOS device testing method according to any of claims 1 to 9.
14. A computer device comprising a memory in which a computer program is stored and a processor that performs the steps in the iOS device testing method according to any one of claims 1 to 9 by calling the computer program stored in the memory.
CN202110056459.3A 2021-01-15 2021-01-15 iOS device testing method, device, system, storage medium and computer device Active CN112799891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110056459.3A CN112799891B (en) 2021-01-15 2021-01-15 iOS device testing method, device, system, storage medium and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110056459.3A CN112799891B (en) 2021-01-15 2021-01-15 iOS device testing method, device, system, storage medium and computer device

Publications (2)

Publication Number Publication Date
CN112799891A CN112799891A (en) 2021-05-14
CN112799891B true CN112799891B (en) 2023-05-09

Family

ID=75809736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110056459.3A Active CN112799891B (en) 2021-01-15 2021-01-15 iOS device testing method, device, system, storage medium and computer device

Country Status (1)

Country Link
CN (1) CN112799891B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514750A (en) * 2021-06-21 2022-12-23 北京字节跳动网络技术有限公司 Electronic device remote control method, server, system, medium, and device
CN113656276B (en) * 2021-08-26 2024-02-09 深圳市腾讯网络信息技术有限公司 Equipment performance detection method for game program and related device
US11886325B2 (en) * 2022-06-30 2024-01-30 Browserstack Limited Network status simulation for remote device infrastructure
US11860771B1 (en) 2022-09-26 2024-01-02 Browserstack Limited Multisession mode in remote device infrastructure

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1168564A1 (en) * 2000-03-31 2002-01-02 Mitsubishi Electric Corporation Controller of adjustable DC voltage for a transformerless reactive series compensator
CN103458087A (en) * 2013-08-30 2013-12-18 华南理工大学 Remote mobile phone test experiencing method based on RTMP
CN106874206A (en) * 2017-02-27 2017-06-20 网易(杭州)网络有限公司 Method, device and electronic equipment for cross-platform automatic test
CN108282542A (en) * 2018-02-13 2018-07-13 百度在线网络技术(北京)有限公司 Remote operation method and device for test equipment
CN108965457A (en) * 2018-08-02 2018-12-07 郑州云海信息技术有限公司 A kind of message delivery method of distributed cluster system, device, equipment and medium
CN109558450B (en) * 2018-10-30 2023-05-09 中国汽车技术研究中心有限公司 Automobile remote monitoring method and device based on distributed architecture
CN109889567B (en) * 2018-12-28 2020-10-02 南京甄视智能科技有限公司 Implementation method of Internet of things platform supporting mass equipment access
CN111708568B (en) * 2020-05-06 2023-07-07 福建天泉教育科技有限公司 Modularized development decoupling method and terminal
CN111767178B (en) * 2020-05-20 2023-09-01 北京奇艺世纪科技有限公司 Physical machine performance test method and device
CN111949420A (en) * 2020-08-10 2020-11-17 智业软件股份有限公司 Business operation flow control method, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN112799891A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN112799891B (en) iOS device testing method, device, system, storage medium and computer device
CN111544886B (en) Picture display method and related device
CN109218731B (en) Screen projection method, device and system of mobile equipment
US20160249106A1 (en) Remote Control of a Mobile Device
US20130254417A1 (en) System method device for streaming video
WO2022257699A1 (en) Image picture display method and apparatus, device, storage medium and program product
US20190051147A1 (en) Remote control method, apparatus, terminal device, and computer readable storage medium
WO2022022019A1 (en) Screen projection data processing method and apparatus
US10075761B2 (en) Methods, systems, and media for remote rendering of web content on a television device
CN113209632A (en) Cloud game processing method, device, equipment and storage medium
CN112596848A (en) Screen recording method and device, electronic equipment, storage medium and program product
CN112601096A (en) Video decoding method, device, equipment and readable storage medium
CN114240749A (en) Image processing method, image processing device, computer equipment and storage medium
CN111444095A (en) Test platform system and test method of mobile equipment
CN113645476B (en) Picture processing method and device, electronic equipment and storage medium
CN114647390B (en) Enhanced screen sharing method and system and electronic equipment
CN114040189A (en) Multimedia test method, device, storage medium and electronic equipment
CN109587118B (en) Distributed multi-terminal and multi-network supporting system for Android online game
CN114666562A (en) 3D scene interaction method, device and system
CN110990109B (en) Spliced screen back display method, terminal, system and storage medium
CN113821428A (en) Cloud testing method and device, electronic equipment and computer storage medium
CN114666561B (en) Video fusion method, device and system
CN106851134B (en) Method, device and system for transmitting image data
CN110876069A (en) Method, device and equipment for acquiring video screenshot and storage medium
TWI823146B (en) Edge side rendering operation method and system for real-time mr interactive application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant