CN112799891A - iOS device test method, device, system, storage medium and computer device - Google Patents

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

Info

Publication number
CN112799891A
CN112799891A CN202110056459.3A CN202110056459A CN112799891A CN 112799891 A CN112799891 A CN 112799891A CN 202110056459 A CN202110056459 A CN 202110056459A CN 112799891 A CN112799891 A CN 112799891A
Authority
CN
China
Prior art keywords
tested
ios
ios device
industrial control
screen
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.)
Granted
Application number
CN202110056459.3A
Other languages
Chinese (zh)
Other versions
CN112799891B (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)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the application discloses an iOS device testing method, device, system, storage medium and computer equipment, which can avoid dependence on MacOS and facilitate expansion of a testing system. The method comprises the following steps: acquiring state information and equipment information of the iOS equipment to be tested through connection established by the simulation integrated development environment and the iOS equipment to be tested; issuing the state information and the equipment information of the iOS equipment to be tested to message middleware coupled with upper equipment; if the measured iOS device is determined to be on-line according to the state information, receiving a test instruction which is transmitted back from the upper layer device and aims at the measured iOS device; sending the test instruction to the iOS device to be tested through the connection with the iOS device to be tested; and uploading the operation result returned after the test instruction is executed by the iOS device to the upper layer device. The technical scheme of the application gets rid of the dependence of an industrial control computer on the iOS, and is convenient for the extension of a test system.

Description

iOS device test 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 equipment.
Background
The testing of the iOS device is an essential link for ensuring the quality of applications based on the iOS device. In order to save cost or in the case of local lack of iOS devices, the industry generally tests the iOS devices in a remote manner, specifically, connects the iOS devices to be tested to a server in a network, and a tester remotely tests the iOS devices through the network to complete testing work on the iOS devices.
However, although the problem of insufficient local iOS devices is solved, the above-mentioned existing iOS device testing method still has the following drawbacks:
1) the apple operating system (MacOS) dependency is required because the integrated development environment on which the computer connected to the iOS device runs must be a MacOS-dependent integrated development environment;
2) the test system is difficult to expand because the above-described computer connected to the iOS device has too strong coupling with an upper device (e.g., a Web server).
Disclosure of Invention
Embodiments of the present application provide an iOS device testing method, apparatus, system, storage medium, and computer device, which can avoid the dependence on a MacOS and facilitate the extension of a testing system.
The embodiment of the application provides an iOS device testing method, which comprises the following steps:
acquiring state information and equipment information of the iOS equipment to be tested through connection established by a simulation integrated development environment with the iOS equipment to be tested, wherein the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS equipment;
issuing the state information and the equipment information of the iOS equipment to be tested to message middleware coupled with upper equipment, wherein the upper equipment comprises a Web server or a terminal for running an automatic test tool;
if the measured iOS device is determined to be on-line according to the state information, receiving a test instruction which is transmitted back from the upper-layer device and aims at the measured iOS device;
sending the test instruction to the iOS device to be tested through the connection with the iOS device to be tested;
and uploading an operation result returned after the test instruction is executed by the iOS device to be tested to the upper layer device.
Optionally, the method further comprises: receiving a screenshot of the iOS device to be tested; and optimizing the screenshot, so that the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time.
Optionally, the receiving a screenshot of the iOS device under test includes: optimizing the connection with the iOS device to be tested into a long connection with the iOS device to be tested; calling a private interface of the iOS device to be tested, and continuously receiving compressed screenshots of the screen of the iOS device to be tested through long connection with the iOS device to be tested so as to obtain a screenshot picture stream of the iOS device to be tested, wherein the compressed screenshots of the screen of the iOS device to be tested are obtained by compressing the screenshot pictures of the iOS device to be tested; the screen capture is optimized, so that the screen of the measured iOS device is displayed on the display end of the upper layer device in real time, and the method comprises the following steps: converting the screen capture picture stream of the measured iOS device into a screen capture video stream of the measured iOS device based on a video coding algorithm; and uploading the screen capture video stream of the measured iOS device to the upper layer device, so that the screen of the measured iOS device is displayed on the display end of the upper layer device after the screen capture video stream is decoded.
Optionally, the converting the screen shot picture stream of the iOS device under test into a screen shot video stream of the iOS device under test based on a video coding algorithm includes: determining difference pixels between non-key image frames and key image frames in a screen capture picture stream of the iOS device to be tested; and based on the video coding algorithm, coding and compressing the key image frame and the difference pixels to form a screen capture video stream of the iOS device to be tested.
Optionally, the converting the screen shot picture stream of the iOS device under test into a screen shot video stream of the iOS device under test based on a video coding algorithm includes: when the screen capture picture stream of the iOS device to be tested is the image frame in the RGB format, converting the image frame in the RGB format into the image frame in the YUV format to obtain a plurality of image frames in the YUV format; respectively encoding and compressing the image frames in the YUV formats by a preset encoding method to form image data packets corresponding to the image frames in the YUV formats; and generating a screen capture 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 returned from the upper device includes: optimizing a connection with the upper level device to a long connection with the upper level device; receiving a test instruction aiming at the iOS device to be tested through long connection with the upper layer device, wherein the test instruction is that the upper layer device analyzes the operation of a user on the screen displayed in real time, and the operation is obtained after packaging.
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 to be tested into a long connection with the iOS device to be tested; 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, the method including:
displaying a screen of the iOS device to be tested on a display end in real time;
analyzing the operation of the user on the real-time display screen, and packaging the operation into a test instruction aiming at the iOS device to be tested;
sending a test instruction aiming at the iOS device to an industrial control computer connected with the iOS device to be tested through a simulation integrated development environment, so that the test instruction is sent to the iOS device to be tested through the connection with the iOS device to be tested after the industrial control computer receives the test instruction;
and receiving an operation result returned by the tested iOS equipment after the test instruction is executed by the tested iOS equipment uploaded by the industrial control computer.
Another embodiment of the present application provides an iOS device testing method, the method including:
screenshot and compression are carried out on a screen of the iOS device to be tested, and a compressed screenshot of the screen of the iOS device to be tested is obtained;
transmitting the compressed screenshot of the screen of the iOS device to be tested back to the industrial control computer by adopting the connection established by a simulation integrated development environment and 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 an upper layer device, and the upper layer device 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 device in real time;
receiving a test instruction which is sent by the industrial control computer and aims at the iOS device to be tested;
executing the test instruction;
and transmitting an operation result obtained by executing the test instruction back to the industrial control computer through the connection with the industrial control computer so as to enable the industrial control computer to upload the operation result to the upper-layer equipment, wherein the upper-layer equipment is coupled to a message middleware, and the message middleware receives the state information and the equipment information of the iOS equipment to be tested, which are issued by the industrial control computer.
An embodiment of the present application further provides an iOS device testing apparatus, including:
the information acquisition module is used for acquiring the state information and the equipment information of the iOS equipment to be tested through the connection with the iOS equipment to be tested, which is established by simulating an integrated development environment, wherein the simulated integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS equipment;
the information issuing module is used for issuing the state information and the equipment information of the iOS equipment to be tested to message middleware coupled with upper-layer equipment, and the upper-layer equipment comprises a Web server or a terminal for running an automatic test tool;
the first receiving module is used for receiving a test instruction which is transmitted back from the upper layer equipment and aims at the iOS equipment to be tested if the iOS equipment to be tested is determined to be on line according to the state information;
the first sending module is used for sending the test instruction to the iOS device to be tested through the connection with the iOS device to be tested;
and the first uploading module is used for uploading an operation result returned after the test instruction is executed by the iOS device to be tested to the upper layer 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 iOS device to be tested on the display end in real time;
the analysis module is used for analyzing the operation of the user on the real-time display screen and packaging the operation into a test instruction aiming at the iOS device to be tested;
the second sending module is used for sending a test instruction aiming at the iOS device to be tested to an industrial control computer connected with the iOS device to be tested through a simulation integrated development environment, so that the test instruction is sent to the iOS device to be tested through the connection with the iOS device to be tested after the industrial control computer receives the test instruction;
and the third receiving module is used for receiving an operation result which is uploaded by the industrial control computer and returned after the test instruction is executed by the iOS device to be tested.
Another embodiment of the present application further provides an iOS device testing apparatus, including:
the screen capture processing module is used for capturing and compressing the screen of the iOS device to be tested to obtain a compressed screenshot of the screen of the iOS device to be tested;
the first feedback module is used for transmitting the compressed screenshot of the screen of the iOS device to be tested back to the industrial control computer through connection established by a simulation integrated development environment and 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 an upper layer device, and the upper layer device 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 device in real time;
the fourth receiving module is used for receiving a test instruction which is sent by the industrial control computer and aims at the iOS device to be tested;
the instruction execution module is used for executing the test instruction;
and the second return module is used for returning an operation result obtained by executing the test instruction to the industrial control computer through the connection with the industrial control computer so as to enable the industrial control computer to upload the operation result to the upper-layer equipment, the upper-layer equipment is coupled to the message middleware, and the message middleware receives the state information and the equipment information of the iOS equipment to be tested, which are issued by the industrial control computer.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, where the computer program is suitable for being loaded by a processor to perform the steps in the iOS device testing method according to any of the above embodiments.
An embodiment of the present application further provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and the processor executes the steps in the iOS device testing method according to any of the above embodiments by calling the computer program stored in the memory.
As can be seen from the technical solutions provided in the embodiments of the present application, on one hand, because the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS device, in a testing process of the iOS device, connection with the iOS device to be tested can be achieved through the simulation integrated development environment, and therefore, connection with the iOS device does not need to be an iOS-based computer, and dependence on the iOS is eliminated; on the other hand, the state information and the device information of the iOS device under test are distributed to the message middleware coupled to the upper layer device, which means that the upper layer device (e.g., a Web server, etc.) can directly obtain the state information and the device information of the iOS device under test from the message middleware, so that the industrial control computer can be decoupled from the upper layer device, and the system can be conveniently expanded.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a system schematic diagram of an iOS device testing apparatus according to an embodiment of the present application.
Fig. 2 is a schematic flowchart of an iOS device testing method provided in an embodiment of the present application.
Fig. 3 is a schematic flowchart of an iOS device testing method according to another embodiment of the present application.
Fig. 4 is a schematic 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 apparatus testing device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an iOS apparatus testing device according to another embodiment of the present application.
Fig. 7 is a schematic structural diagram of an iOS apparatus testing device 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 technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides an iOS device testing method, an iOS device testing device, a storage medium and computer equipment. Specifically, the iOS device testing method of the embodiment of the present application may be executed by a computer device, where the computer device may be an industrial control computer (industrial personal computer), a Web server, an iOS device, and the like. The industrial control computer can be an electronic device based on operating systems such as a Windows operating system, an 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, a cloud server providing basic cloud computing services such as cloud services, a cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content distribution network and a big data and artificial intelligence platform, and the iOS device can be an iOS-based device including an iOS-based electronic device such as iphone and iPAD based on apple corporation.
For example, when the iOS device testing method is run on an industrial control computer, the industrial control computer stores a game application and is used to present a virtual scene in a game screen. The industrial control computer is used to interact with a user through a graphical user interface, such as downloading and installing a gaming application and running through the industrial control computer. The manner in which the industrial control computer provides the graphical user interface to the user can include a variety of ways, for example, the graphical user interface can 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 a game screen and receiving operation instructions generated by a user acting on the graphical user interface, and a processor for executing the game, generating the graphical user interface, responding to the operation instructions, and controlling display of the graphical user interface on the touch display screen.
For example, when the iOS device testing method is run on a Web server, it may be a cloud game. Cloud gaming refers to a gaming regime based on cloud computing. In the running mode of the cloud game, the running main body of the game application program and the game picture presenting main body are separated, and the storage and the running of the iOS device testing method are finished on the cloud game server. The game screen presentation is performed at a cloud game client, which is mainly used for receiving and sending game data and presenting a game screen, for example, the cloud game client may be a display device with a data transmission function near a user side, such as a mobile terminal, a television, a computer, a palm computer, a personal digital assistant, and the like, but a terminal device for performing game data processing is a cloud game server at the cloud end. When a game is played, a 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, data such as game pictures and the like are encoded and compressed, the data are returned to the cloud game client through a network, and finally the data are decoded through the cloud game client and the game pictures are output.
Referring to fig. 1, fig. 1 is a schematic system diagram of an iOS device test 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 a messaging middleware 6000. The iOS device 1000 to be tested is a tested object, and is mainly used for screenshot and compressing the screen of the iOS device 1000 to obtain a compressed screenshot of the screen of the iOS device 1000 to be tested, and the compressed screenshot of the screen of the iOS device 1000 to be tested is transmitted back to the industrial control computer 5000 by using the connection with the industrial control computer 5000 established by the simulation integration development environment, so that the industrial control computer 5000 processes the compressed screenshot of the screen of the iOS device 1000 to be tested into a screenshot video stream of the iOS device 1000 to be tested and then uploads the screenshot video stream to the upper layer device 2000 of the industrial control computer 5000, the screenshot video stream is decoded by the upper layer device 2000 to display the screen of the iOS device 1000 to be tested on the display terminal of the upper layer device 2000 in real time, and then the iOS device 1000 to be tested receives a test instruction for the iOS device 1000 to be tested and executes the test instruction for the iOS device 1000 to be tested, which is sent by the industrial control computer 5000, the operation result obtained by executing the test instruction is transmitted back to the industrial control computer 5000 through the 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 acquiring the state information and the device information of the iOS device 1000 under test through the connection with the iOS device 1000 under test established by simulating the integrated development environment (here, the simulated integrated development environment is the integrated development environment obtained by simulating the native integrated development environment of the iOS device), distributing the state information and the device information of the iOS device 1000 under test to the message middleware 6000 connected with the upper device 2000 (here, the upper device 2000 includes a Web server or a terminal running an automated testing tool), if it is determined that the iOS device 1000 under test is on-line according to the state information, a test instruction for the iOS device 1000 under test returned from the upper device 2000 is received, the test instruction is sent to the iOS device 1000 under test through the connection with the iOS device 1000 under test, and an operation result returned after the test instruction is executed by the iOS device 1000 under test is uploaded to the upper device 2000. The upper layer device 2000 is mainly configured to display a screen of the iOS device 1000 to be tested on a display side in real time, analyze operations performed by a user on the screen displayed in real time, package the operations into test instructions for the iOS device 1000 to be tested, send the test instructions for the iOS device 1000 to an industrial control computer connected to the iOS device 1000 to be tested through the analog integrated development environment (for the purpose of sending the test instructions to the iOS device 1000 to be tested through the connection with the iOS device 1000 after the test instructions are received by the industrial control computer 5000), and receive operation results returned after the iOS device 1000 to be tested executes the test instructions uploaded by the industrial control computer 5000. In the system for testing the iOS device of the present application, the upper device 2000 is further connected to a display device (not shown in fig. 1) as a display terminal thereof. As an interactive device with a user, on one hand, the display end receives decoded data of a screenshot video stream of the iOS device 1000 to be tested from the upper layer device 2000, and renders the screen of the iOS device 1000 to be tested; on the other hand, the display end receives an operation of the user on the screen of the iOS device 1000 to be tested, and sends the operation to the upper layer device 2000, and the upper layer device 2000 analyzes a test instruction corresponding to the operation and sends the test instruction to the iOS device 1000 to be tested to execute.
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 may be connected to each other through a 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, and so on. In addition, the system may include a plurality of databases 3000, the plurality of databases 3000 are coupled to different upper level devices 2000, the status information and the device information of the iOS device under test may be continuously and permanently stored, and the message middleware 6000 is mainly used to temporarily store the status information and the device information of the iOS device under test 1000 published by the industrial control computer 5000 for the upper level devices 2000 to subscribe in real time.
Referring to fig. 2, a flowchart of an iOS device testing method according to an embodiment of the present application is shown, and an execution main body of the 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, which are explained in detail as follows:
step S201, acquiring state information and device information of the iOS device to be tested through connection established by the simulation integrated development environment with the iOS device to be tested, wherein the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS device.
In the prior art, in order to test the iOS device, the electronic device connected with 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 the iOS device, the industrial control computer of the embodiment of the present application may not be an iOS-based electronic device, that is, the industrial control computer may be an electronic device 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, a native integrated development environment, such as Xcode, of the iOS device may be simulated to obtain a simulated integrated development environment, the simulated integrated development environment is run on a non-iOS industrial control computer, 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 obtained through the connection.
The device information of the iOS device to be tested mainly comprises information such as the model, serial number, central processor model, version, graphics processor model, version, screen size, ROM, RAM, electric quantity, intellectual property and the like of the iOS device to be tested. Specifically, the device information of the iOS device to be tested can be obtained by using an idevice tool to obtain a serial number of the iOS device to be tested, obtaining other device information of the iOS device to be tested according to the serial number, analyzing and sorting the device information, and converting the device information into a device information format capable of being directly presented. For example, for the model and version of the central processing unit of the iOS device to be tested, the model, version, screen size, etc. of the graphics processor, the serial number of the iOS device to be tested may be first obtained, then a model of the iOS device to be tested is obtained based on the serial number, and finally, the corresponding device information is extracted from the sorted device information according to the model of the iOS device to be tested.
As for the state information of the iOS device under test, in the embodiment of the present application, it mainly refers to whether the iOS device under test is in an online state or an offline state, and it is mainly determined by whether the iOS device under test can be called by an upper layer, that is, if the iOS device under test can be called by the upper layer, the state of the iOS device under test is in the online state, otherwise, the state is in the offline state. In particular implementation, a thread may be maintained at the industrial control computer, and the thread may continuously detect the state of the iOS device under test, for example, call the iOS device under test. If the iOS device to be tested can normally return information, the iOS device to be tested can be normally called, namely the iOS device to be tested is in an online state; if the detected iOS device fails to return information or fails to detect within the preset time, it indicates that the detected iOS device cannot be normally called, that is, the detected iOS device is in an offline state, and at this time, the service of the detected iOS device should be restarted.
Step S202, the state information and the device information of the iOS device to be tested are issued to a message middleware coupled with an upper layer device, wherein the upper layer device comprises a Web server or a terminal for running an automatic test tool.
In this embodiment, the upper layer device includes a Web server or a terminal running an automation test tool, and is called an upper layer device because these devices are located at an upper layer of the entire 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 browser displays a Web page by a client, and a user may interact with the Web server through the Web page. And after the terminal running the automatic test tool acquires the IP address and the forwarding port address of the industrial control computer, the connection with the iOS device to be tested can be realized through the industrial control computer, and the automatic test script is run to start the test of the iOS device to be tested.
Unlike the prior art, in the embodiment of the present application, the upper layer device is coupled with a message middleware, such as a Redis database or other message middleware, such as Rabbitmq, activatemq, and the like. And after the industrial control computer acquires the state information and the equipment information of the measured iOS equipment, the information is issued to the message middleware in real time. The upper layer equipment subscribes the state information and the equipment information of the measured iOS equipment from the message middleware regularly or in real time, so that the situation that the upper layer equipment has to acquire the state information and the equipment information of the measured iOS equipment from the industrial control computer is avoided, decoupling of the upper layer equipment and the industrial control computer is realized, and system expansion is facilitated. For example, if there is no message middleware as in the prior art, the industrial control computer and the upper layer device need to mutually know the IP address of the other party to enable the industrial control computer to send the state information and the device information of the iOS device to be tested to the upper layer device. Thus, when an industrial control computer needs to be added, the added industrial control computer and the upper layer device need to mutually acquire the IP address of the other side, which means that additional work such as configuration, packaging and the like needs to be performed again. However, when the message middleware coupled to the upper layer device is added, since the state information and the device information of the iOS device under test can be issued to the message middleware by the industrial control computer in real time, the upper layer device can acquire the state information and the device information of the iOS device under test from the message middleware without interacting with 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 related to the upper layer device, so that the decoupling of the upper layer device and the industrial control computer is realized, and the expansion of the system (for example, by increasing the number of the industrial control computers) becomes extremely convenient.
Step S203, if it is determined that the iOS device under test is online according to the state information of the iOS device under test, receiving a test instruction for the iOS device under test returned from the upper layer device.
As described above, whether the iOS device under test is online is determined, and the state of the iOS device under test can be continuously detected through one thread maintained by the industrial control computer. If the iOS device under test can normally return information, for example, a specific value for indicating the state of the iOS device is returned, it indicates that the iOS device under test can be normally called, and the state of the iOS device under test is online. After the detected iOS device is determined to be online, a test instruction for the detected iOS device, which is transmitted back from the upper layer device, can be received and is ready to be transmitted to the detected iOS device, where the test instruction is an instruction obtained by the upper layer device analyzing an operation performed by a user on a screen of the detected iOS device, which is displayed in real time on a display terminal of the upper layer 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 end of the upper device in real time, reference may be made to the relevant description of the following embodiments.
And step S204, sending the test instruction aiming at the iOS device to be tested to the iOS device to be tested through the connection with the iOS device to be tested.
As described above, the connection with the iOS device under test is established by simulating the integrated development environment, so that the industrial control computer can interact with the iOS device under test, and the iOS device under test can respond quickly in consideration of real-time performance, that is, an operation input by a user on a display terminal of the upper-layer device is expected, and can be delivered to the iOS device under an ideal state even if a test command is sent. As an embodiment of the present application, the sending of the test instruction for the iOS device to be tested to the iOS device to be tested through the connection with the iOS device to be tested may be optimizing the connection between the industrial control computer and the iOS device to be tested to be a long connection between the industrial control computer and the iOS device to be tested, calling a private interface of the iOS device to be tested, and sending the test instruction to the iOS device to be tested through the long connection between the industrial control computer and the iOS device to be tested. Here, the long connection between the industrial control computer and the iOS device under test is realized by a long connection based on a socket (socket), and the long connection based on a socket (socket) means that a plurality of packets can be continuously transmitted over one connection, and if no packet is transmitted during the connection holding period, both the client and the server need to transmit a link check packet, and only one socket object is used for the client and the server. As an embodiment of the present application, optimizing the connection between the industrial control computer and the iOS device to be tested to be a long connection between the industrial control computer and the iOS device to be tested, calling a private interface of the iOS device to be tested, and sending the test instruction to the iOS device to be tested through the long connection between the industrial control computer and the iOS device to be tested may be: after the handshake request between the industrial control computer and the iOS device to be tested is successful, the iOS device to be tested sends a data request to the industrial control computer, and sends a heartbeat packet to the industrial control computer at regular time, the long connection with the industrial control computer in the multichannel multiplexing mode is maintained, a private interface of the iOS device to be tested is called, and a test instruction is sent to the iOS device to be tested through the long connection with the industrial control computer in the multichannel multiplexing mode, where the long connection with the industrial control computer in the multichannel multiplexing mode may be: initiating a connection request to an industrial control computer, and establishing connection after the industrial control computer receives the connection request; performing data interaction with an industrial control computer in a multi-channel transceiving mode; after the data interaction is completed, the long connection in the multi-channel multiplexing mode is maintained for use in the next data interaction, and obviously, the data interaction here comprises the industrial control computer sending a test instruction to the iOS device to be tested.
And step S205, uploading an operation result returned after the test instruction is executed by the iOS device to the upper layer device.
In order to improve transmission efficiency and reduce instruction response delay, in the embodiment of the present application, the connection between the industrial control computer and the upper layer device is also a socket-based long connection, and the industrial control computer can upload an operation result returned after the test instruction is executed by the iOS device to be tested to the upper layer device through the long connection, and the display end of the upper layer 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, and may constitute the test instruction in the embodiment of the present application. For example, the operations such as clicking, sliding, clicking a home button on the screen of the real iOS device, and performing shortcut setting, text input, application list presentation, application installation, and application uninstallation on the real iOS device may be analyzed by the upper device as a test instruction by performing the same operations on the measured iOS device on the screen of the measured iOS device presented on the display end of the upper device, and the specific analysis process may refer to the related description of the subsequent embodiment.
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) can control the iOS device to be tested by inputting a command on the display terminal of the upper-layer device, however, this is not the best choice for most users, and what is more suitable for the user's usage habit is to perform an operation on the iOS device to be tested. Since the iOS device under test is not a local device with respect to the user, but is connected to the upper layer device through the network, the user cannot locally manipulate the iOS device under test. One possible method is to enable the screen of the iOS device to be displayed on the display of the upper device, so that the user can remotely control the iOS device to be tested through the display of the upper device as if the user locally controls the iOS device to be tested.
Therefore, the method provided by the embodiment of the present application further includes receiving a screenshot of the iOS device to be tested, and performing optimization processing on the screenshot of the iOS device to be tested, so that the screen of the iOS device to be tested is displayed on the display terminal 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 of the preconditions is to be able to quickly capture a screen on the iOS device under test, and then quickly upload the screenshot of the iOS device under test obtained by capturing the screen to the upper layer device, so as to quickly refresh the obtained screenshot of the iOS device under test on the display end thereof, such as a slide show (PPT), which means that as long as the obtained screenshot of the iOS device under test per second is enough and the transmission is fast enough, the "slide show" on the display end is also fast enough, the screen of the iOS device under test can be displayed on the display end as the screen of the real iOS device. Considering that the frame rate of image transmission needs to reach at least 15 frames/second to prevent the frame from being significantly jammed, 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 receiving of the screenshot of the iOS device under test may specifically be: optimizing the connection between the industrial control computer and the iOS device to be tested into long connection with the iOS device to be tested; calling a private interface of the iOS device to be tested, and continuously receiving compressed screenshots of the screen of the iOS device to be tested through long connection of an industrial control computer and the iOS device to be tested to obtain a screenshot picture stream of the iOS device to be tested, wherein the compressed screenshots of the screen of the iOS device to be tested are obtained by compressing the screenshot pictures of the iOS device to be tested; and optimizing the screenshot of the iOS device to be tested, so that the real-time display of the screenshot of the iOS device to be tested on the display terminal of the upper device may specifically be: based on a video coding algorithm, converting the screen capture picture stream of the iOS device to be tested into a screen capture video stream of the iOS device to be tested, uploading the screen capture video stream of the iOS device to upper-layer equipment, and displaying a screen of the iOS device to be tested on a display end of the upper-layer equipment 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 to the long 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 to the long connection between the industrial control computer and the iOS device to be tested in the foregoing embodiment, and details are not repeated.
In the foregoing, the screen of the iOS device under test presented on the display end of the upper layer device is essentially still the screen shot of the iOS device under test, and the presentation process is the process of "showing" these screen shots, and it is critical that the screen of the iOS device under test is displayed on the display end of the upper layer device in real time, and each processing link is as fast as possible. In the above embodiment, it has been described that the compressed screenshot of the measured iOS device screen is obtained by compressing the screenshot of the measured iOS device to reduce the capacity of the screenshot of the measured iOS device, and the transmission delay is reduced by calling the private interface of the measured iOS device and the long connection between the industrial control computer and the measured iOS device, which may be regarded as an early stage or a early link when the screen of the measured iOS device is presented on the display end of the upper device, and a later stage, that is, a process of "showing" the screenshot of the measured iOS device, that is, it needs to be emphasized that in the process, the screenshot of the measured iOS device is converted into the screenshot video stream of the measured iOS device based on a video stream coding algorithm, and the screenshot video stream of the measured iOS device is uploaded to the upper device.
In an embodiment of the present application, based on a video coding algorithm, converting a screen capture picture stream of a 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 an upper device may be: determining the difference pixels between the non-key image frames and the key image frames in the screen capturing picture stream of the measured iOS device, and coding and compressing the key image frames and the difference pixels in the screen capturing picture stream of the measured iOS device based on a video coding algorithm to form the screen capturing video stream of the measured iOS device. The video coding algorithm 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 frame in the screenshot picture stream of the iOS device under test may be obtained first, then the difference pixel between the non-key image frame and the key image frame is determined in the process of encoding and compressing, and then encoding and compressing are performed. In the process of encoding the compressed image frame to form the screen capture video stream of the iOS device to be tested, the same pixels are compressed only once, so that the compression amount is reduced, and the image frame is compressed into the video stream, so that the data transmission amount is greatly reduced, the bandwidth is saved, and the occurrence of the picture pause phenomenon is further reduced.
As an embodiment of the present application, based on a video coding algorithm, coding and compressing key image frames and difference pixels in a screenshot picture stream of a detected iOS device to form a screenshot video stream of the detected iOS device may be implemented through steps S1 to S3, which are described as follows:
step S1: when the screen capture picture stream of the iOS device to be tested is an image frame in the RGB format, converting the image frame in the RGB format into an image frame in the YUV format to obtain a plurality of image frames in the YUV format.
The YUV format is a pixel format in which a luminance parameter and a chrominance parameter are expressed separately, and the advantage of separating the luminance parameter and the chrominance parameter 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 frame in RGB format can occupy very little bandwidth when being converted into the image frame in YUV format for transmission, thereby saving a large amount of resources.
Step S2: and respectively coding and compressing the image frames in the YUV formats by a preset coding method to form image data packets corresponding to the image frames in the YUV formats.
In the process of respectively coding and compressing a plurality of image frames in YUV format by a preset coding method, the video quality can be guaranteed, the coding and compression speed can be increased, and the delay of video stream can be reduced by adjusting the parameters of preset video coding software, wherein the parameters of the video coding software can comprise code rate, the width and height of a picture during coding and compression, video frequency, how many frames are needed to recover a normal picture after frame loss, the number of delay frames input from a coder to a decoder, the number of coding and compression threads, a coding format, a coding and compression algorithm and the like. When forming an image data packet corresponding to a plurality of image frames in YUV format, a sequence number corresponding to the image frame and a timestamp corresponding to the generated image data packet may be written into the image frame, for example, the image frame may be numbered while the image frame is generated, so that each image frame has a corresponding sequence number, then the corresponding timestamp may be acquired according to the image frame form image data packet, and the sequence number of the image frame and the timestamp corresponding to the image data packet may be added to the image data packet corresponding to the plurality of image frames in YUV format.
Step S3: and generating a screen capture 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 capture video stream is reduced, and the real-time performance of screen display is improved.
After the above-mentioned main work of displaying the screen of the iOS device to be tested in real time at the display end of the upper device is completed, the user can operate the iOS device to be tested on the screen of the iOS device to be tested displayed in real time at the display end of the upper device like operating the iOS device on the real iOS device, at this time, in step S203 of the foregoing embodiment, receiving the test instruction for the iOS device to be tested, which is returned from the upper device, may specifically be: optimizing the connection between the industrial control computer and the upper-layer equipment into long connection between the industrial control computer and the upper-layer equipment; and receiving a test instruction aiming at the iOS device to be tested through long connection between the industrial control computer and the upper-layer device, wherein the test instruction is obtained by analyzing and packaging the upper-layer device after a user operates the iOS device to be tested on a screen of the iOS device to be tested, which is displayed by a display end of the upper-layer device in real time. In other words, according to the technical solution provided by the foregoing embodiment, the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time, and the user performs some operations on the screen of the iOS device to be tested displayed in real time, and these operations are analyzed and encapsulated by the upper layer device to obtain the test instruction that can be recognized by the industrial control computer, and are transmitted to the industrial control computer through the long connection established between the upper layer device and the industrial control computer.
As can be seen from the iOS device testing method illustrated in fig. 2, on one hand, since the simulated integrated development environment is an integrated development environment obtained by simulating a 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 by the simulated integrated development environment, and therefore, the connection with the iOS device does not need to be an iOS-based computer, and the iOS is not dependent on the computer; on the other hand, the state information and the device information of the iOS device under test are distributed to the message middleware coupled to the upper layer device, which means that the upper layer device (e.g., a Web server, etc.) can directly obtain the state information and the device information of the iOS device under test from the message middleware, so that the industrial control computer can be decoupled from the upper layer device, and the system can be conveniently expanded.
In the example of fig. 2, steps S201 to S204 are performed by an industrial control computer, and fig. 3 is performed by an upper layer device, and mainly includes steps S301 to S304:
step S301: and displaying the screen of the iOS device to be tested on a display end in real time.
As described above, the industrial control computer converts the screen capture of the iOS device to be tested, which is obtained from the iOS device to be tested, into a screen capture video stream of the iOS device to be tested, and then uploads the screen capture video stream of the iOS device to be tested to the upper layer device according to the video coding algorithm. At the moment, the upper layer device executes the operation opposite to that of the industrial control computer on the screen capture video stream of the iOS device to be tested, namely, executes the decoding operation on the screen capture video stream of the iOS device to be tested. The upper layer device sends the decoded data to a display end, and the display end renders the image frame in real time to present a screen of the iOS device to be tested.
Step S302: analyzing the operation performed by the screen of the iOS device to be tested displayed by the user in real time at the display end, and packaging the operation into a test instruction aiming at the iOS device to be tested.
In the embodiment of the present application, operations performed by a user (the user here is the same as the user mentioned in the foregoing embodiment, and both refer to a person who has a test requirement on the iOS device or needs to perform a test operation on the iOS device) on a screen of the iOS device under test displayed on a display terminal in real time are mainly classified into two types, one type is an operation on the screen of the iOS device under test, and mainly includes clicking, sliding, clicking of a home button, shortcut setting, text input, and the like on the screen of the iOS device under test, and the other type is an operation on an application program, and mainly includes presentation of an application list, installation of the application, uninstallation of the application, and the like. The operations firstly occur in a Web page at a display end, then are transmitted to upper-layer equipment and then are analyzed by the upper-layer equipment, and finally are packaged into data in a format which can be understood by an industrial control computer, namely test instructions.
For the operation of the screen of the iOS device to be tested, the principle is described by only sliding on the screen of the iOS device to be tested, and other operation principles are similar and are not described in detail. Firstly, the display end simulates an operation on a Web page displayed by the display end, converts the simulated operation into specific data such as point coordinates (including a start coordinate and an end coordinate) and duration and sends the data to an upper layer device (such as a Web server, and the like), the upper layer device analyzes the data, analyzes a sliding operation instruction, and further combines the sliding operation instruction and packages the data into a format that can be understood by an industrial control computer, namely a test instruction (the test instruction is a sliding operation instruction when viewed 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 iOS device to be tested for responding to the sliding operation).
For the operation for the application program, the industrial control computer implements a Web service based on tornado, and listens in real time for a request from an upper device (e.g., Web server), which is actually issued by a user from a display side of the upper device. When a request such as an application list, application installation, or application uninstallation is received, the Web service on the industrial control computer implements the relevant operations accordingly. For example, when a user needs to obtain an application list on the iOS device to be tested, after an application list presentation request sent from a Web page on a display side reaches 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 presentation of the application list as viewed by the iOS device to be tested, and the test instruction is a response for testing the iOS device to be tested to an operation of requesting presentation of the application list, so the application list presentation request instruction is still a test instruction); when a user needs to install an application on a to-be-tested iOS device, the user needs to send an IPA packet body of the to-be-tested iOS device application to an upper layer device from an interface provided on a Web page of a display end, the upper layer device analyzes the IPA packet body and returns an IPA packet address link available for downloading to the Web page of the display end, and then the upper layer device analyzes the IPA packet address link and encapsulates the request for application installation into a test instruction (the test instruction is an instruction for requesting installation of the application as viewed by the to-be-tested iOS device, and the instruction for requesting installation of the application is still a test instruction as the test instruction is used for testing the response of the to the operation for requesting installation of the application by the to-be-tested iOS device); for the operation of application uninstallation, the test instruction encapsulated as the test instruction for the iOS device under test is similar to the foregoing embodiment, and is not described again.
Step S303: and sending a test instruction aiming at the iOS device to be tested to an industrial control computer connected with the iOS device to be tested through the simulation integrated development environment, and sending the test instruction to the iOS device to be tested through the connection between the industrial control computer and the iOS device to be tested after the industrial control computer receives the test instruction.
After the test command obtained by the encapsulation of the upper layer device is sent to the industrial control computer through the long connection between the upper layer device and the industrial control computer, the industrial control computer sends the test command to the iOS-Tagent service of the iOS device to be tested by using the connection (which may be a socket-based long connection here as described in the foregoing embodiment) established between the upper layer device and the iOS device to be tested through the simulation 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.
And the iOS-Tagent service on the iOS device to be tested receives the test instruction, quickly responds, and transmits the operation result of the test instruction to the industrial control computer through the long connection between the industrial control computer and the test instruction, and the industrial control computer transmits the operation result to the upper-layer device, and the upper-layer device displays the operation result on the display end of the upper-layer device.
As can be seen from the iOS device testing method illustrated in fig. 3, on one hand, since the simulated integrated development environment is an integrated development environment obtained by simulating a 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 by the simulated integrated development environment, and therefore, the connection with the iOS device does not need to be an iOS-based computer, and thus the iOS is not dependent on the computer; on the other hand, as the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time, the user can control the iOS device to be tested on the display end of the upper layer device, and the remote test of the iOS device to be tested is realized.
Fig. 3 illustrates steps S301 to S304, which are technical solutions of the present application explained by using upper-layer devices as execution subjects, and fig. 4 illustrates a technical solution of the present application by using an iOS device to be tested as an execution subject, which mainly includes steps S401 to S405:
step S401: and performing screenshot and compression on the screen of the iOS device to be tested to obtain a compressed screenshot of the screen of the iOS device to be tested.
Screenshot is performed on a screen of the iOS device to be tested, and the screenshot can be performed based on iOS-Tagent obtained by modifying a Facebook open source tool Web page Driver Agent (WDA). After screenshot of the iOS device to be tested is obtained by using the iOS-Tagent, in order to perform efficient compression, in this embodiment of the present application, auxiliary information and redundant information of the screenshot of the iOS device to be tested may be removed according to a preset manner, then compression parameters are set for original image data of the screenshot of the iOS device to be tested from which the auxiliary and redundant information is removed, and the compressed screenshot of the screen of the iOS device to be tested is compressed into a compressed screenshot of a predetermined format type, specifically, when the screenshot of the iOS device to be tested is in a PNG format, the auxiliary information in the screenshot of the iOS device to be tested is removed, further, if the screenshot of the iOS device to be tested contains transparent channel data, other data in the auxiliary block in the screenshot of the iOS device to be tested except the transparent channel data is removed as redundant data, and color values of transparent pixels in the transparent channel data are modified into preset color values, if the screen capture of the measured iOS equipment does not contain transparent channel data, removing the auxiliary block in the screen capture of the measured iOS equipment as redundant data; after the screen capture of the iOS device to be tested without the auxiliary and redundant information is obtained, when the screen capture format of the iOS device to be tested is the PNG format, various combinations are respectively selected from preset filtering types and preset compression parameters, the screen capture of the iOS device to be tested without the auxiliary and redundant information is subjected to traversal compression, and after the preset times, a result with the maximum compression ratio is selected as a compressed result, namely a compressed screenshot of the screen of the iOS device to be tested.
Step S402: the compressed screenshot of the screen of the iOS device to be tested is transmitted back to the industrial control computer by the connection of the iOS device to be tested and the industrial control computer established by the simulation integrated development environment, 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 uploads the screenshot video stream to the upper layer device, and the screenshot video stream is decoded by the upper layer device and then the screen of the iOS device to be tested is displayed on a display end of the upper layer device in real time.
And transmitting the compressed screenshot of the screen of the iOS device to be tested back to the industrial control computer by adopting the connection between the iOS device to be tested and the industrial control computer established by the simulation 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 a screenshot video stream of the iOS device to be tested and uploads the screenshot video stream to the upper layer device, and how the upper layer device decodes the screenshot video stream and displays the screen of the iOS device to be tested on the display end of the upper layer device in real time, reference may be made to the relevant description of the foregoing embodiment, which is not described herein again.
Step S403: and receiving a test instruction which is sent by the industrial control computer and aims at the iOS device to be tested.
It should be noted that the test instruction for the iOS device to be tested, which is sent by the industrial control computer, actually still comes from the upper layer device, specifically, the user performs an operation on the screen of the iOS device to be tested, which is displayed on the display end in real time, and the operation is transmitted to the upper layer device, and the upper layer device parses and packages the operation into the test instruction that can be recognized by both the industrial control computer and the iOS device to be tested, and then transmits the test instruction to the iOS device to be tested through the industrial control computer.
Step S404: and executing the test instruction aiming at the iOS device to be tested.
As described above, the test instruction for the iOS device under test may be, for example, an instruction corresponding to a click on a screen, a slide, a click of a home button, a shortcut setting, a text input, an application list presentation, an application installation, and an application uninstallation.
Step S405: and transmitting an operation result obtained by executing the test instruction back to the industrial control computer through the connection between the iOS device to be tested and the industrial control computer so that the industrial control computer uploads the operation result to the upper-layer device, wherein the upper-layer device is coupled to the message middleware, and the message middleware receives the state information and the device information of the iOS device to be tested, which are 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 with the message middleware but also with the database. Although the message middleware and the database both store the state information and the device information of the iOS device under test, as a storage bank with stronger performance and larger capacity, the database can store the state information and the device information of the iOS device under test for a long time, 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 iOS device testing method illustrated in fig. 4, on one hand, since the simulated integrated development environment is an integrated development environment obtained by simulating a 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 by the simulated integrated development environment, and therefore, the connection with the iOS device does not need to be an iOS-based computer, and the iOS is not dependent on the computer; on the other hand, the compressed screenshot of the screen of the iOS device to be tested is processed by the industrial control computer to be a screenshot video stream of the iOS device to be tested and uploaded to the upper layer device, the screenshot video stream is decoded by the upper layer device and then the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time, and a user can control the iOS device to be tested on the display end of the upper layer device, so that the remote test of the iOS device to be tested is realized.
In order to better implement the iOS device testing method of the embodiments of the present application, the embodiments of the present application further provide an iOS device testing apparatus. 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 may include an information obtaining module 501, an information publishing module 502, a first receiving module 503, a first sending module 504, and a first uploading module 505, where:
the information acquisition module 501 is configured to acquire state information and device information of the iOS device to be tested through connection between the industrial control computer and the iOS device to be tested, where the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS device;
the information issuing module 502 is configured to issue the state information and the device information of the iOS device to be tested to a message middleware coupled to an upper device, where the upper device includes a Web server or a terminal running an automated testing tool;
a first receiving module 503, configured to receive a test instruction for the iOS device to be tested, which is returned from an upper device, if it is determined that the iOS device to be tested is online according to the state information of the iOS device to be tested;
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 the upper layer device, an operation result returned after the test instruction is executed by the iOS device to be tested.
Please refer to fig. 6, which is a schematic structural diagram of an iOS device testing apparatus according to an embodiment of the present application. 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 optimization module 602 is configured to perform optimization processing on the screenshot of the iOS device to be tested, so that the screen of the iOS device to be tested 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 the connection between the industrial control computer and the iOS device to be tested into a long connection between the industrial control computer and the iOS device to be tested, call a private interface of the iOS device to be tested, and continuously receive the compressed screenshot of the screen of the iOS device to be tested through the long connection between the industrial control computer and the iOS device to be tested to obtain a screenshot stream of the iOS device to be tested, where the compressed screenshot of the screen of the iOS device to be tested is obtained by compressing the screenshot of the iOS device to be tested.
Optionally, the first optimization module 602 illustrated in fig. 6 is specifically configured to convert the screenshot image stream of the iOS device to be tested into a screenshot video stream of the iOS device to be tested based on a video coding algorithm, and upload the screenshot video stream of the iOS device to an upper device, so that a screen of the iOS device to be tested is displayed on a display end of the upper device after the screenshot video stream is decoded.
Optionally, the converting the screen capture picture stream of the iOS device to be tested into the screen capture video stream of the iOS device to be tested based on the video coding algorithm may be: determining difference pixels between non-key image frames and key image frames in the screen capture picture stream of the iOS device to be tested, and coding and compressing the key image frames and the difference pixels based on a video coding algorithm to form a screen capture video stream of the iOS device to be tested.
Optionally, the converting the screen capture picture stream of the iOS device to be tested into the screen capture video stream of the iOS device to be tested based on the video coding algorithm may further include: when the screen capture picture stream of the iOS device to be tested is an image frame in an RGB format, converting the image frame in the RGB format into an image frame in a YUV format to obtain a plurality of image frames in the YUV format, respectively encoding and compressing the plurality of image frames in the YUV format by a preset encoding method to form image data packets corresponding to the plurality of image frames in the YUV format, and generating the screen capture video stream of the iOS device to be tested according to the plurality of image data packets.
Optionally, the first receiving module 503 illustrated in fig. 6 is specifically configured to optimize the connection between the industrial control computer and the upper device to be long connection between the industrial control computer and the upper device, and receive a test instruction for the iOS device to be tested through the long connection between the industrial control computer and the upper device, where the test instruction is obtained by analyzing, by the upper device, an operation performed on a screen displayed in real time by a user, and encapsulating 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 to be tested into a long connection between the industrial control key computer and the iOS device to be tested, call a private interface of the iOS device to be tested, and send the test instruction to the iOS device to be tested through the long connection between the industrial control key computer and the iOS device to be tested.
As can be seen from the iOS device testing apparatus illustrated in fig. 5 and 6, on one hand, since the simulated integrated development environment is an integrated development environment obtained by simulating a 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 by simulating the integrated development environment, and therefore, the connection with the iOS device does not need to be an iOS-based computer, and the iOS is not dependent on the computer; on the other hand, the state information and the device information of the iOS device under test are distributed to the message middleware coupled to the upper layer device, which means that the upper layer device (e.g., a Web server, etc.) can directly obtain the state information and the device information of the iOS device under test from the message middleware, so that the industrial control computer can be decoupled from the upper layer device, and the system can be conveniently expanded.
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 may include a real-time processing module 701, a parsing module 702, a second sending module 703, and a third receiving module 704, where:
the real-time processing module 701 is used for displaying a screen of the iOS device to be tested 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 package the operation as a test instruction for the iOS device to be tested;
a second sending module 703, configured to send a test instruction for the iOS device to be tested to an industrial control computer connected to the iOS device to be tested through the analog integrated development environment, so that the test instruction is sent to the iOS device to be tested through the connection between the industrial control computer and the iOS device to be tested after the industrial control computer receives the test instruction;
and a third receiving module 704, configured to receive an operation result returned after the test instruction is executed by the iOS device under test and uploaded by the industrial control computer.
As can be seen from the iOS device testing apparatus illustrated in fig. 7, on one hand, since the simulated integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS device, during the testing of the iOS device, the connection with the iOS device to be tested can be realized by simulating the integrated development environment, and therefore, the connection with the iOS device does not need to be an iOS-based computer, and thus, the iOS is not dependent on the computer; on the other hand, as the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time, the user can control the iOS device to be tested on the display end of the upper layer device, and the remote test of the iOS device to be tested 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 executing module 804, and a second backhaul module 805, where:
a screen capture processing module 801, configured to capture and compress a screen of the iOS device under test to obtain a compressed capture of the screen of the iOS device under test;
the first feedback module 802 is configured to transmit the compressed screenshot of the measured iOS device screen back to the industrial control computer through a connection established with the industrial control computer by using the simulation integrated development environment, so that the industrial control computer processes the compressed screenshot of the measured iOS device screen into a screenshot video stream of the measured 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 measured iOS device on a display end of the upper device in real time;
a fourth receiving module 803, configured to receive a test instruction, which is sent by the industrial control computer and is for the iOS device under test;
an instruction execution module 804, configured to execute the test instruction;
the second returning module 805 is configured to return an operation result obtained by executing the test instruction to the industrial control computer through connection between the iOS device under test and the industrial control computer, so that the industrial control computer uploads the operation result to an upper layer device, where the upper layer device is coupled to the message middleware, and the message middleware receives state information and device information of the iOS device under test, which are 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 simulated integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS device, during the testing of the iOS device, the connection with the iOS device to be tested can be realized by simulating the integrated development environment, and therefore, the connection with the iOS device does not need to be an iOS-based computer, and thus, the iOS is not dependent on the computer; on the other hand, the compressed screenshot of the screen of the iOS device to be tested is processed by the industrial control computer to be a screenshot video stream of the iOS device to be tested and uploaded to the upper layer device, the screenshot video stream is decoded by the upper layer device and then the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time, and a user can control the iOS device to be tested on the display end of the upper layer device, so that the remote test of the iOS device to be tested is realized.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
Correspondingly, the embodiment of the present application further provides a Computer device, where the Computer device may be a terminal or a server, and the terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a game machine, a Personal Computer (PC), a 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. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 901 is a control center of the computer apparatus 900, connects various parts of the entire computer apparatus 900 by various interfaces and lines, performs various functions of the computer apparatus 900 and processes data by running or loading software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby monitoring the computer apparatus 900 as a whole.
In this embodiment of the application, the processor 901 in the computer device 900 loads instructions corresponding to processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs the application programs stored in the memory 902, so as to implement the following functions: acquiring state information and equipment information of the iOS equipment to be tested through connection established by a simulation integrated development environment with the iOS equipment to be tested, wherein the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS equipment; the method comprises the steps that state information and equipment information of the iOS equipment to be tested are issued to message middleware coupled with upper-layer equipment, wherein the upper-layer equipment comprises a Web server or a terminal for running an automatic test tool; if the fact that the iOS device to be tested is on line is determined according to the state information of the iOS device to be tested, receiving a test instruction which is transmitted back from the upper-layer device and aims at the iOS device to be tested; sending a test instruction aiming at the iOS device to be tested to the iOS device to be tested through connection with the iOS device to be tested; and uploading the operation result returned after the test instruction is executed by the iOS device to the upper layer device.
Alternatively, in this embodiment of the application, the processor 901 in the computer device 900 loads instructions corresponding to processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs the application programs stored in the memory 902, so as to implement the following functions: displaying a screen of the iOS device to be tested on a display end in real time; analyzing the operation performed by the screen of the iOS device to be tested, which is displayed by a user at the display end in real time, and packaging the operation into a test instruction aiming at the iOS device to be tested; sending a test instruction aiming at the iOS device to an industrial control computer connected with the iOS device to be tested through a simulation integrated development environment, and sending the test instruction to the iOS device to be tested through the connection of the industrial control computer and the iOS device to be tested 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 this embodiment of the application, the processor 901 in the computer device 900 loads instructions corresponding to processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs 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 iOS device to be tested, and a compressed screenshot of the screen of the iOS device to be tested is obtained; the method comprises the steps that a tested iOS device established by a simulation integrated development environment is connected with an industrial control computer, and a compressed screenshot of a screen of the tested iOS device is transmitted back to the industrial control computer, 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 uploads the screenshot video stream to an upper layer device, and the screenshot video stream is decoded by the upper layer device and then the screen of the tested iOS device is displayed on a display end of the upper layer device in real time; receiving a test instruction aiming at the iOS device to be tested, which is sent by an industrial control computer; executing a test instruction aiming at the iOS device to be tested; and transmitting an operation result obtained by executing the test instruction back to the industrial control computer through the connection between the iOS device to be tested and the industrial control computer so that the industrial control computer uploads the operation result to the upper-layer device, wherein the upper-layer device is coupled to the message middleware, and the message middleware receives the state information and the device information of the iOS device to be tested, which are issued by the industrial control computer.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 9, the computer device 900 further includes: touch display screen 903, radio frequency circuit 404, audio circuit 905, input unit 906 and power supply 907. The processor 901 is electrically connected to the touch display screen 903, the radio frequency circuit 404, the audio circuit 905, the input unit 906, and the power supply 907. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 9 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The touch screen 903 may be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface. The touch display screen 903 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the computer device, which may be made up 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), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), 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 direction 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 sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 901, and can receive and execute commands sent by the processor 901. The touch panel may cover the display panel, and when the touch panel detects a touch operation on or near the touch panel, the touch panel transmits the touch operation to the processor 901 to determine the type of the touch event, and then the processor 901 provides a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, a touch panel and a display panel may be integrated into the touch display screen 903 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display 903 may also be used as a part of the input unit 906 to implement an input function.
In the embodiment of the present application, a processor 901 executes a game application to generate a graphical user interface on a 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 screen 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 rf circuit 404 may be used for transceiving rf signals to establish wireless communication with a network device or other computer device via wireless communication, and for transceiving signals with the network device or other computer device.
The audio circuitry 905 may be used to provide an audio interface between a user and a computer device through speakers, microphones. The audio circuit 905 can transmit the electrical signal converted from the received audio data to a loudspeaker, and the electrical signal is converted into a sound signal by the loudspeaker and output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 905 and converted into audio data, and the audio data is processed by the audio data output processor 901, and then sent to another computer device via the radio frequency circuit 404, or output to the memory 902 for further processing. The audio circuitry 905 may also include an earbud jack to provide communication of peripheral headphones 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 generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
A power supply 907 is used to power the various components of the computer device 900. Optionally, 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, power consumption management, and the like through the power management system. Power supply 907 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, 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 in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
As can be seen from the above, the computer device provided in this embodiment intercepts and executes the database operation instruction when the game server sends the database operation instruction to the external database, 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 the mirror image data environment of the outerwear is constructed by periodically copying the data from the online database of the outerwear to the internal database, the technical scheme of the application can efficiently construct the mirror image database in real time and reduce the occupation of internal database resources.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, 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, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the 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 iOS equipment to be tested through connection established by a simulation integrated development environment with the iOS equipment to be tested, wherein the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS equipment; the method comprises the steps that state information and equipment information of the iOS equipment to be tested are issued to message middleware coupled with upper-layer equipment, wherein the upper-layer equipment comprises a Web server or a terminal for running an automatic test tool; if the fact that the iOS device to be tested is on line is determined according to the state information of the iOS device to be tested, receiving a test instruction which is transmitted back from the upper-layer device and aims at the iOS device to be tested; sending a test instruction aiming at the iOS device to be tested to the iOS device to be tested through connection with the iOS device to be tested; and uploading the operation result returned after the test instruction is executed by the iOS device to the upper layer device.
Alternatively, the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, where the computer programs can be loaded by a processor to execute the steps in any of the iOS device testing methods provided in the present application. For example, the computer program may perform the steps of: displaying a screen of the iOS device to be tested on a display end in real time; analyzing the operation performed by the screen of the iOS device to be tested, which is displayed by a user at the display end in real time, and packaging the operation into a test instruction aiming at the iOS device to be tested; sending a test instruction aiming at the iOS device to an industrial control computer connected with the iOS device to be tested through a simulation integrated development environment, and sending the test instruction to the iOS device to be tested through the connection of the industrial control computer and the iOS device to be tested 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, the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, where the computer programs can be loaded by a processor to execute the steps in any of the iOS device testing methods provided in the present application. For example, the computer program may perform the steps of: screenshot and compression are carried out on the screen of the iOS device to be tested, and a compressed screenshot of the screen of the iOS device to be tested is obtained; the method comprises the steps that a tested iOS device established by a simulation integrated development environment is connected with an industrial control computer, and a compressed screenshot of a screen of the tested iOS device is transmitted back to the industrial control computer, 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 uploads the screenshot video stream to an upper layer device, and the screenshot video stream is decoded by the upper layer device and then the screen of the tested iOS device is displayed on a display end of the upper layer device in real time; receiving a test instruction aiming at the iOS device to be tested, which is sent by an industrial control computer; executing a test instruction aiming at the iOS device to be tested; and transmitting an operation result obtained by executing the test instruction back to the industrial control computer through the connection between the iOS device to be tested and the industrial control computer so that the industrial control computer uploads the operation result to the upper-layer device, wherein the upper-layer device is coupled to the message middleware, and the message middleware receives the state information and the device information of the iOS device to be tested, which are issued by the industrial control computer.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any of the iOS device testing methods provided in the embodiments of the present application, beneficial effects that can be achieved by any of the iOS device testing methods provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The iOS device testing method, apparatus, storage medium, and computer device provided in the embodiments of the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (14)

1. An iOS device testing method, comprising:
acquiring state information and equipment information of the iOS equipment to be tested through connection established by a simulation integrated development environment with the iOS equipment to be tested, wherein the simulation integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS equipment;
issuing the state information and the equipment information of the iOS equipment to be tested to message middleware coupled with upper equipment, wherein the upper equipment comprises a Web server or a terminal for running an automatic test tool;
if the measured iOS device is determined to be on-line according to the state information, receiving a test instruction which is transmitted back from the upper-layer device and aims at the measured iOS device;
sending the test instruction to the iOS device to be tested through the connection with the iOS device to be tested;
and uploading an operation result returned after the test instruction is executed by the iOS device to be tested to the upper layer device.
2. The iOS device testing method of claim 1, the method further comprising:
receiving a screenshot of the iOS device to be tested;
and optimizing the screenshot, so that the screen of the iOS device to be tested is displayed on the display end of the upper layer device in real time.
3. The iOS device testing method of claim 2, wherein the receiving a screenshot of the iOS device under test comprises: optimizing the connection with the iOS device to be tested into a long connection with the iOS device to be tested; calling a private interface of the iOS device to be tested, and continuously receiving compressed screenshots of the screen of the iOS device to be tested through long connection with the iOS device to be tested so as to obtain a screenshot picture stream of the iOS device to be tested, wherein the compressed screenshots of the screen of the iOS device to be tested are obtained by compressing the screenshot pictures of the iOS device to be tested;
the screen capture is optimized, so that the screen of the measured iOS device is displayed on the display end of the upper layer device in real time, and the method comprises the following steps: converting the screen capture picture stream of the measured iOS device into a screen capture video stream of the measured iOS device based on a video coding algorithm; and uploading the screen capture video stream of the measured iOS device to the upper layer device, so that the screen of the measured iOS device is displayed on the display end of the upper layer device after the screen capture video stream is decoded.
4. The iOS device testing method of claim 3, wherein the converting the screenshot picture stream of the iOS device under test into a screenshot video stream of the iOS device under test based on a video coding algorithm comprises:
determining difference pixels between non-key image frames and key image frames in a screen capture picture stream of the iOS device to be tested;
and based on the video coding algorithm, coding and compressing the key image frame and the difference pixels to form a screen capture video stream of the iOS device to be tested.
5. The iOS device testing method of claim 3, wherein the converting the screenshot picture stream of the iOS device under test into a screenshot video stream of the iOS device under test based on a video coding algorithm comprises:
when the screen capture picture stream of the iOS device to be tested is the image frame in the RGB format, converting the image frame in the RGB format into the image frame in the YUV format to obtain a plurality of image frames in the YUV format;
respectively encoding and compressing the image frames in the YUV formats by a preset encoding method to form image data packets corresponding to the image frames in the YUV formats;
and generating a screen capture video stream of the iOS device to be tested according to the plurality of image data packets.
6. The iOS device testing method of claim 2, wherein the receiving of the test instruction for the iOS device under test returned from the upper device comprises:
optimizing a connection with the upper level device to a long connection with the upper level device;
receiving a test instruction aiming at the iOS device to be tested through long connection with the upper layer device, wherein the test instruction is that the upper layer device analyzes the operation of a user on the screen displayed in real time, and the operation is obtained after packaging.
7. The iOS device test method of claim 1, wherein the sending the test instruction to the iOS device under test via the connection with the iOS device under test comprises:
optimizing the connection with the iOS device to be tested into a long connection with the iOS device to be tested;
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, the method comprising:
displaying a screen of the iOS device to be tested on a display end in real time;
analyzing the operation of the user on the real-time display screen, and packaging the operation into a test instruction aiming at the iOS device to be tested;
sending a test instruction aiming at the iOS device to an industrial control computer connected with the iOS device to be tested through a simulation integrated development environment, so that the test instruction is sent to the iOS device to be tested through the connection with the iOS device to be tested after the industrial control computer receives the test instruction;
and receiving an operation result returned by the tested iOS equipment after the test instruction is executed by the tested iOS equipment uploaded by the industrial control computer.
9. An iOS device testing method, the method comprising:
screenshot and compression are carried out on a screen of the iOS device to be tested, and a compressed screenshot of the screen of the iOS device to be tested is obtained;
transmitting the compressed screenshot of the screen of the iOS device to be tested back to the industrial control computer by adopting the connection established by a simulation integrated development environment and 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 an upper layer device, and the upper layer device 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 device in real time;
receiving a test instruction which is sent by the industrial control computer and aims at the iOS device to be tested;
executing the test instruction;
and transmitting an operation result obtained by executing the test instruction back to the industrial control computer through the connection with the industrial control computer so as to enable the industrial control computer to upload the operation result to the upper-layer equipment, wherein the upper-layer equipment is coupled to a message middleware, and the message middleware receives the state information and the equipment information of the iOS equipment to be tested, which are issued by the industrial control computer.
10. An iOS device testing apparatus, characterized by comprising:
the information acquisition module is used for acquiring the state information and the equipment information of the iOS equipment to be tested through the connection with the iOS equipment to be tested, which is established by simulating an integrated development environment, wherein the simulated integrated development environment is an integrated development environment obtained by simulating a native integrated development environment of the iOS equipment;
the information issuing module is used for issuing the state information and the equipment information of the iOS equipment to be tested to message middleware coupled with upper-layer equipment, and the upper-layer equipment comprises a Web server or a terminal for running an automatic test tool;
the first receiving module is used for receiving a test instruction which is transmitted back from the upper layer equipment and aims at the iOS equipment to be tested if the iOS equipment to be tested is determined to be on line according to the state information;
the first sending module is used for sending the test instruction to the iOS device to be tested through the connection with the iOS device to be tested;
and the first uploading module is used for uploading an operation result returned after the test instruction is executed by the iOS device to be tested to the upper layer device.
11. An iOS device testing apparatus, characterized by comprising:
the real-time processing module is used for displaying the screen of the iOS device to be tested on the display end in real time;
the analysis module is used for analyzing the operation of the user on the real-time display screen and packaging the operation into a test instruction aiming at the iOS device to be tested;
the second sending module is used for sending a test instruction aiming at the iOS device to be tested to an industrial control computer connected with the iOS device to be tested through a simulation integrated development environment, so that the test instruction is sent to the iOS device to be tested through the connection with the iOS device to be tested after the industrial control computer receives the test instruction;
and the third receiving module is used for receiving an operation result which is uploaded by the industrial control computer and returned after the test instruction is executed by the iOS device to be tested.
12. An iOS device testing apparatus, characterized by comprising:
the screen capture processing module is used for capturing and compressing the screen of the iOS device to be tested to obtain a compressed screenshot of the screen of the iOS device to be tested;
the first feedback module is used for transmitting the compressed screenshot of the screen of the iOS device to be tested back to the industrial control computer through connection established by a simulation integrated development environment and 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 an upper layer device, and the upper layer device 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 device in real time;
the fourth receiving module is used for receiving a test instruction which is sent by the industrial control computer and aims at the iOS device to be tested;
the instruction execution module is used for executing the test instruction;
and the second return module is used for returning an operation result obtained by executing the test instruction to the industrial control computer through the connection with the industrial control computer so as to enable the industrial control computer to upload the operation result to the upper-layer equipment, the upper-layer equipment is coupled to the message middleware, and the message middleware receives the state information and the equipment information of the iOS equipment to be tested, which are issued by the industrial control computer.
13. A computer-readable storage medium, storing a computer program adapted to be loaded by a processor to perform the steps of the iOS device testing method according to any of claims 1 to 9.
14. A computer device, characterized in that the computer device comprises a memory in which a computer program is stored and a processor that executes 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 true CN112799891A (en) 2021-05-14
CN112799891B 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)

Cited By (4)

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

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1315768A (en) * 2000-03-31 2001-10-03 三菱电机株式会社 Adjustable dc voltage controller for non-transformer 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
CN109558450A (en) * 2018-10-30 2019-04-02 中国汽车技术研究中心有限公司 A kind of automobile remote monitoring method and apparatus based on distributed structure/architecture
CN109889567A (en) * 2018-12-28 2019-06-14 南京甄视智能科技有限公司 Support the implementation method of the platform of internet of things of bulk device access
CN111708568A (en) * 2020-05-06 2020-09-25 福建天泉教育科技有限公司 Component development decoupling method and terminal
CN111767178A (en) * 2020-05-20 2020-10-13 北京奇艺世纪科技有限公司 Physical machine performance testing method and device
CN111949420A (en) * 2020-08-10 2020-11-17 智业软件股份有限公司 Business operation flow control method, terminal equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1315768A (en) * 2000-03-31 2001-10-03 三菱电机株式会社 Adjustable dc voltage controller for non-transformer 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
CN109558450A (en) * 2018-10-30 2019-04-02 中国汽车技术研究中心有限公司 A kind of automobile remote monitoring method and apparatus based on distributed structure/architecture
CN109889567A (en) * 2018-12-28 2019-06-14 南京甄视智能科技有限公司 Support the implementation method of the platform of internet of things of bulk device access
CN111708568A (en) * 2020-05-06 2020-09-25 福建天泉教育科技有限公司 Component development decoupling method and terminal
CN111767178A (en) * 2020-05-20 2020-10-13 北京奇艺世纪科技有限公司 Physical machine performance testing method and device
CN111949420A (en) * 2020-08-10 2020-11-17 智业软件股份有限公司 Business operation flow control method, terminal equipment and storage medium

Cited By (5)

* 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
CN113656276A (en) * 2021-08-26 2021-11-16 深圳市腾讯网络信息技术有限公司 Equipment performance detection method and related device for game program
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

Also Published As

Publication number Publication date
CN112799891B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN112799891B (en) iOS device testing method, device, system, storage medium and computer device
KR101773638B1 (en) Methods for interfacing with a virtualized computing service over a network using a lightweight client
WO2019001347A1 (en) Screen projection method for mobile device, storage medium, terminal and screen projection system
US20160249106A1 (en) Remote Control of a Mobile Device
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
US20230215076A1 (en) Image frame display method, apparatus, device, storage medium, and program product
US20190051147A1 (en) Remote control method, apparatus, terminal device, and computer readable storage medium
CN112257135A (en) Model loading method and device based on multithreading, storage medium and terminal
CN110177300B (en) Program running state monitoring method and device, electronic equipment and storage medium
CN112596848A (en) Screen recording method and device, electronic equipment, storage medium and program product
CN110554831A (en) Operation synchronization method, device, equipment and storage medium
CN111444095A (en) Test platform system and test method of mobile equipment
CN113313804A (en) Image rendering method and device, electronic equipment and storage medium
CN115756881A (en) Data processing method, device, equipment and storage medium based on SDK
CN111475359A (en) System testing method, device and storage medium under multi-message interaction scene
CN109788251B (en) Video processing method, device and storage medium
CN109587118B (en) Distributed multi-terminal and multi-network supporting system for Android online game
CN114040189A (en) Multimedia test method, device, storage medium and electronic equipment
US20140104183A1 (en) Method and device for controlling at least one apparatus by at least one other apparatus, system implementing such a device
CN107168648B (en) File storage method and device and terminal
CN114666562A (en) 3D scene interaction method, device and system
CN114417201A (en) Message processing method and device, computer equipment and storage medium
CN107818469A (en) Data processing method, device and computer-readable recording medium
CN110990109A (en) Spliced screen redisplay method, terminal, system and storage medium
CN116954809B (en) Remote control method, device and system based on android device and electronic device

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