Simulation test processing method and device, equipment, storage medium and program product
By obtaining page links on the terminal device and controlling the loading and execution of multiple virtual simulation devices, the problem of low efficiency in traditional simulation debugging is solved, and efficient simulation testing processing is achieved.
Patent Information
- Application Number
- CN202411088092.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2026-02-10
AI Technical Summary
Traditional simulation debugging methods are inefficient when testing on multiple terminal devices with different resolutions, requiring testers to perform repeated operations, resulting in cumbersome test processing issues.
By obtaining the page link of the terminal device and sending control commands to multiple different types of virtual simulation devices, the system controls them to load and display page content, and synchronously executes operations after receiving page operation records to obtain simulation test results.
This technology enables page operations performed on a single terminal device to be synchronized to multiple virtual simulation devices of different types, reducing cumbersome operations and improving the efficiency of simulation testing.
Smart Images

Figure CN121501409A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a simulation test processing method and device, computer equipment, a computer readable storage medium, and a computer program product. BACKGROUND
[0002] With the development of computer technology and the popularization and use of various application programs or websites, such as social application programs, data access websites, and small games (such as game applets in application programs and H5 page games on terminal devices), before being actually put into use on different types of terminal devices, it is necessary to perform display testing on the display pages of various application programs or websites or small games on different types of terminal devices to avoid problems such as display page incompatibility on different terminal devices, which leads to normal use.
[0003] Conventionally, a simulation mobile device tool attached in a browser debugging option is usually called to perform simulation debugging, such as modifying the browser resolution or simulating the terminal device UA (User-Agent, which represents a string of information that enables a server to identify the browser type, version, and operating system running the browser used by a user), to simulate the display effect of the pages of application programs or websites or small games on terminal devices, to exclude potential faults in time and reduce page incompatibility problems in actual use.
[0004] However, when there are multiple terminal devices with different resolutions that need to be debugged, the conventional simulation debugging method of calling the simulation mobile device tool attached in the browser debugging option has low automation, and the tester needs to repeatedly open the display page to execute test cases, which is relatively cumbersome and still has the problem of low test processing efficiency. SUMMARY
[0005] Therefore, it is necessary to provide a simulation test processing method, device, computer equipment, computer readable storage medium, and computer program product that can improve the test processing efficiency of display pages based on different types of terminal devices.
[0006] In a first aspect, the present application provides a simulation test processing method, comprising:
[0007] If there is a new web view window on the connected terminal device, a page link corresponding to a first display page loaded by the new web view window is obtained.
[0008] A first control command carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same;
[0009] If the terminal device receives a page operation record for the first display page, a second control instruction carrying the page operation record is sent to the multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results.
[0010] Secondly, this application also provides a simulation test processing device, comprising:
[0011] The page link acquisition module is used to acquire the page link corresponding to the first display page loaded by the newly added webpage view window if a newly added webpage view window exists on the connected terminal device.
[0012] The page display control module is used to send a first control command carrying the page link to multiple virtual simulation devices of different types, so as to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same;
[0013] The simulation test result acquisition module is used to, if it receives a page operation record for the first display page from the terminal device, send a second control instruction carrying the page operation record to the plurality of different types of virtual simulation devices, so as to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain the simulation test result.
[0014] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0015] If a new webpage view window exists on the connected terminal device, obtain the page link corresponding to the first display page loaded by the new webpage view window;
[0016] A first control command carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same;
[0017] If the terminal device receives a page operation record for the first display page, a second control instruction carrying the page operation record is sent to the multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results.
[0018] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0019] If a new webpage view window exists on the connected terminal device, obtain the page link corresponding to the first display page loaded by the new webpage view window;
[0020] A first control command carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same;
[0021] If the terminal device receives a page operation record for the first display page, a second control instruction carrying the page operation record is sent to the multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results.
[0022] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0023] If a new webpage view window exists on the connected terminal device, obtain the page link corresponding to the first display page loaded by the new webpage view window;
[0024] A first control command carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same;
[0025] If the terminal device receives a page operation record for the first display page, a second control instruction carrying the page operation record is sent to the multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results.
[0026] In the aforementioned simulation test processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product, if a new webpage view window exists on the connected terminal device, the page link corresponding to the first display page loaded by the new webpage view window is obtained, and a first control instruction carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link. Since the page display area sizes of different types of virtual simulation devices are different, and the page content of the first display page and the second display page are the same, it is possible to achieve the purpose of simultaneously performing simulated page display on multiple virtual simulation devices with different page display area sizes after executing the page display test case on one terminal device, thereby reducing the cumbersome operation when performing simulated page display on multiple different virtual simulation devices. Furthermore, if a page operation record for the first displayed page is received from the terminal device, a second control instruction carrying the page operation record is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results. In this way, page operations executed on one terminal device can be synchronized to multiple virtual simulation devices of different types, avoiding the situation where page operations on the same page need to be repeatedly tested and verified on different virtual simulation devices. This achieves the goal of performing a single operation on one terminal device to realize simulation testing on multiple different virtual simulation devices, thus improving the processing efficiency of simulation testing based on different types of terminal devices. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a diagram illustrating the application environment of a simulation test processing method in one embodiment;
[0029] Figure 2 This is a flowchart illustrating a simulation test processing method in one embodiment;
[0030] Figure 3 This is a schematic diagram of the service composition of a simulation test server in one embodiment;
[0031] Figure 4 This is a schematic diagram illustrating the data interaction between the monitoring service of the simulation test server and the terminal device in one embodiment;
[0032] Figure 5 This is a schematic diagram of the service composition of the driver service of the simulation test server in one embodiment;
[0033] Figure 6 This is a schematic diagram of information in the information encapsulation module of a driver service in one embodiment;
[0034] Figure 7 This is a schematic diagram illustrating the process of implementing simulation test processing based on the monitoring service and driver service of the simulation test server in one embodiment;
[0035] Figure 8 This is a flowchart illustrating the simulation test processing method in another embodiment;
[0036] Figure 9 This is a schematic diagram of different types of virtual simulation devices in a simulation site in one embodiment;
[0037] Figure 10 This is a flowchart illustrating the process of obtaining simulation test results in one embodiment;
[0038] Figure 11 This is a schematic diagram illustrating the process of simulation testing based on multiple different types of simulation devices in one embodiment.
[0039] Figure 12 This is a schematic diagram of the overall processing flow of the simulation test processing method in one embodiment;
[0040] Figure 13 This is a structural block diagram of the simulation test processing device in one embodiment;
[0041] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0043] The simulation testing processing method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal device 102 and virtual simulation device 104 communicate with simulation test server 106 via a network. The data storage system can store the data that the simulation test server 106 needs to process. The data storage system can be integrated onto the simulation test server 106 or placed on the cloud or other network servers. Terminal device 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, portable wearable devices, and aircraft. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection devices. Portable wearable devices can be smartwatches, smart bracelets, and head-mounted devices. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The virtual simulation device 104 can specifically be a virtual simulation device obtained by a simulation site (i.e., a website capable of simultaneously simulating multiple terminal devices with different resolutions) based on different types of actual terminal devices (such as small-screen devices, large-screen devices, and landscape devices). These virtual simulation devices can simulate the display effects of web pages on various terminal devices. The simulation test server 106 can be an independent physical broadcast control server, a broadcast control server cluster composed of multiple physical broadcast control servers, or a cloud broadcast control server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Among them, the terminal device 102, the virtual simulation device 104, and the simulation test server 106 can be directly or indirectly connected through wired or wireless communication methods, and this embodiment of the application does not impose any restrictions on this.
[0044] Both the terminal device 102 and the simulation test server 106 can be used independently to execute the simulation test processing method provided in this embodiment, or they can work together to execute the simulation test processing method provided in this embodiment. For example, taking the collaborative execution of the simulation test processing method provided in this embodiment by the terminal device 102 and the simulation test server 106 as an example, if the simulation test server 106 determines that a new webpage view window exists on the connected terminal device 102, it obtains the page link corresponding to the first display page loaded by the new webpage view window, and sends a first control instruction carrying the page link to multiple virtual simulation devices 104 of different types to control the virtual simulation devices 104 to load and display the second display page corresponding to the page link. The page display area sizes of the different types of virtual simulation devices 104 are different, and the page content of the first display page and the second display page is the same. Furthermore, if the simulation test server 106 receives the page operation record for the first display page from the terminal device 102, it sends a second control instruction carrying the page operation record to multiple virtual simulation devices 104 of different types to control the virtual simulation devices 104 to execute the page operation indicated by the page operation record and obtain the simulation test result.
[0045] In one exemplary embodiment, such as Figure 2 As shown, a simulation test processing method is provided, which is applied to... Figure 1 The simulation test server 106 in the example is used for illustration, including the following steps S202 to S206. Among them:
[0046] Step S202: If a new webpage view window exists on the connected terminal device, obtain the page link corresponding to the first display page loaded by the new webpage view window.
[0047] In the process of simulation testing, a communication connection needs to be established between the simulation test server and the terminal device. This connection can be made directly or indirectly through wired or wireless communication. The simulation test server can then monitor the processing operations triggered on the terminal device, such as webpage view window clicks and page clicks triggered on the terminal device.
[0048] For example, the terminal device can be a smart mobile device such as a smartphone or tablet, and the web page view window can be a view window that appears on the terminal device to load and display the page, such as the WebView window (i.e., the management application window interface) that appears on a smartphone. The WebView window can be used to load H5 pages (which represent web pages running in the embedded browser of the application software installed on the terminal device, and usually rely on the login state, business interfaces, etc. provided by the terminal device environment to achieve normal operation).
[0049] Optionally, in practical applications, for applications such as social media apps, shopping apps, and data (or information) query websites, the WebView window can be used to load the corresponding H5 pages for these applications or websites. Specifically, this could be the information interaction page of a social media app, the order submission page of a shopping app, or the data query page and file download page of a data (or information) query website. For mini-games, such as H5 page games, the use of responsive website layout allows for the deployment of web games on mobile devices. In other words, mini-games can be understood as web games on mobile devices, requiring no download of a game app; they can be played by accessing the game page. Therefore, for mini-games, the WebView window can be used to load the corresponding game page.
[0050] Specifically, if the simulation test server detects a new webpage view window on a connected terminal device, it establishes a communication connection with the new webpage view window on the terminal device to obtain the first display page loaded by the new webpage view window, and parses the first display page to obtain the page link corresponding to the first display page.
[0051] Furthermore, the simulation test server establishes a communication connection with the terminal device and uses monitoring tools (such as ABD, short for Android Debug Bridge) to poll the terminal device for the presence of a new webpage view window. If it is determined that a new webpage view window (such as a WebView window) exists on the connected terminal device, a communication connection is established with the new webpage view window on the terminal device through a browser communication protocol (such as CDP, short for Chrome DevTool Protocol). The server monitors the loading process of the displayed page in the new webpage view window (such as monitoring the loading process of the H5 page in the WebView window). If it is determined that the displayed page in the new webpage view window has finished loading (such as determining that the H5 page in the WebView window has finished loading), the server obtains the first displayed page (such as the H5 page) loaded by the new webpage view window.
[0052] The simulation test server parses the first display page to obtain the corresponding page link. This page link is then distributed to multiple different types of virtual simulation devices, enabling each device to load and display the content of the linked page. This ensures consistency in page content and display across all virtual simulation devices and terminal devices. For example, the first display page could be an information interaction page of a social application, an order submission page of a shopping application, a data query page and file download page of a data (or information) query website, or even a game page for a mini-game, such as an H5 page game.
[0053] Step S204: Send a first control command carrying a page link to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link. The page display area size of the different types of virtual simulation devices is different, and the page content of the first display page and the second display page is the same.
[0054] Specifically, virtual simulation devices can be virtual simulation devices obtained by simulation sites (i.e., websites that can simultaneously simulate multiple terminal devices with different resolutions) based on different types of actual terminal devices (such as small-screen devices, large-screen devices, and landscape devices). These virtual simulation devices can simulate the display effect of web pages on various terminal devices, load and display the page content corresponding to the received page links, and maintain consistency with the page content displayed on the actual terminal devices.
[0055] Understandably, due to differences in actual terminal devices—such as screen size, screen resolution, or the size of the area used to display web pages—the simulated virtual devices will have different page display areas. Since testing multiple different types of virtual devices is required, to ensure the realism and accuracy of the test results, the page content displayed on the virtual devices and the actual terminal devices must be consistent. That is, the content of the first displayed page loaded in the new webpage view window on the terminal device must be the same as the content of the second displayed page loaded and displayed on the different types of virtual simulation devices.
[0056] For example, since the content of the first display page and the second display page is the same, the second display page can also be an information interaction page of a social application, an order submission page of a shopping application, a data query page and file download page of a data (or information) query website, or a game page corresponding to a mini-game such as an H5 page game.
[0057] Specifically, before sending the first control command to multiple different types of virtual simulation devices, the simulation test server also needs to monitor whether there is login status data associated with the first display page on the terminal device. If it is determined that there is login status data associated with the first display page on the terminal device, the server obtains the login status data associated with the first display page fed back by the terminal device. Here, login status data represents the interaction data between the browser and the server. After a user logs in, the server generates a specific status for that user, which can be used to verify whether the user has logged in.
[0058] Furthermore, after the simulation test server obtains the login status data associated with the first display page, it generates a first control command based on the login status data and the page link, and sends the first control command to multiple different types of virtual simulation devices, so as to control multiple different types of virtual simulation devices through the first control command, and load and display the second display page corresponding to the page link respectively.
[0059] Specifically, the simulation test server serializes the login state data and page links, that is, it converts the login state data and page links into a form that can be stored or transmitted, and then generates the first control command based on the serialized login state data and page links.
[0060] For example, after the simulation test server sends the first control command to multiple virtual simulation devices of different types, each virtual simulation device responds to the received first control command, parses the received first control command to obtain the page link carried by the first control command, loads and displays the second display page corresponding to the page link.
[0061] Step S206: If a page operation record for the first display page is received from the terminal device, a second control instruction carrying the page operation record is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results.
[0062] Specifically, if the simulation test server receives a page operation record for the first display page from the terminal device, it generates a second control instruction based on the page operation record and sends the second control instruction to multiple virtual simulation devices of different types. The second control instruction controls the virtual simulation devices to execute the page operation indicated by the page operation record and obtains the simulation test result.
[0063] Specifically, the page operation record includes the page operation indicated by the page operation record and the operation parameters corresponding to the page operation. Specifically, based on the page operation and the operation parameters corresponding to the page operation, a second control instruction is generated and sent to multiple different types of virtual simulation devices.
[0064] For example, page operations specifically include opening a new page, clicking a page (including clicking page buttons, page links, and page boxes on the page), scrolling the page (such as scrolling down and scrolling up), and returning to the previous page. The page parameters corresponding to these operations may specifically include: the new page link for opening a new page, the page button clicked when clicking a page (such as a button to access a specific window on the page), the new link clicked when clicking a page (such as a download link for specific page content), the page box clicked when clicking a page and the content entered in the page box (such as text or characters), the page scrolling method (including scrolling down or up), and the previous page link when returning to the previous page.
[0065] In one exemplary embodiment, such as Figure 3 As shown, a schematic diagram of the service composition of a simulation test server is provided, referring to... Figure 3 As can be seen, the simulation test server specifically includes a monitoring service 302, a driver service 304, and a simulation service 306. Among them, the monitoring service 302 is the entry point for the simulation test server to connect to the real terminal device, the driver service 304 is used to control the virtual simulation device, and the simulation service 306 is the exit point for providing feedback on the page performance at different resolutions.
[0066] Specifically, monitoring service 302 monitors operations on the terminal device, including whether a new webpage view window is added, whether the new webpage view window contains a first display page, and whether page operations are triggered for the first display page. It also serializes the login state data and page links returned by the terminal device to obtain serialized login state data and page links. Driver service 304 generates a first control command based on the serialized login state data and page links, and controls each virtual simulation device to synchronize the page display on the terminal device according to the first control command. Simulation service 306 generates virtual simulation devices based on the independent pixels of each of the multiple different types of virtual simulation devices, resulting in multiple different types of virtual simulation devices.
[0067] In an exemplary embodiment, the monitoring service 302 is further configured to add event monitoring code data based on the newly added webpage view window. The event monitoring code data is used to monitor the first display interface to obtain page operation records for the first display page. Exemplarily, the monitoring service 302 is configured to inject event monitoring code data into the WebView window of the terminal device to monitor various page operations occurring on the H5 page (or mini-game page) loaded in the WebView window, such as clicks, input, scrolling, etc. When page operations are detected on the H5 page (or mini-game page), the H5 page (or mini-game page) communicates with the monitoring service through a data communication protocol (such as the WebSocket protocol, which represents a protocol for full-duplex communication over a single TCP connection), and sends the page operations and corresponding operation parameters back to the monitoring service 302.
[0068] Furthermore, such as Figure 4 As shown, this provides a schematic diagram of data interaction between the monitoring service of a simulation test server and terminal devices, with reference to... Figure 4 It is known that a communication connection is established between the monitoring service of the simulation test server and the terminal device. The monitoring service is used to add event monitoring code data based on the newly added web page view window on the terminal device to monitor various page operations that occur on the H5 page (or mini-game page) loaded in the WebView window. After detecting the occurrence of various page operations on the H5 page (or mini-game page), the page operations and the corresponding operation parameters are serialized to obtain the serialized page operations and operation parameters. The serialized page operations and operation parameters are then communicated with the monitoring service through a data communication protocol (such as the WebSocket protocol) and sent back to the logical process of the monitoring service.
[0069] In one exemplary embodiment, such as Figure 5 As shown, a schematic diagram of the service composition of a driver service for a simulation test server is provided. (Refer to...) Figure 5 It can be seen that the driver service of the simulation test server specifically includes an initialization module, an automation module, and a logging module. The automation module specifically includes a data conversion module, an interface call simulation module, and an information encapsulation module.
[0070] The initialization module handles browser driver updates, simulation site initialization, and browser information simulation, while the logging module stores operation logs and other data. The automation module executes corresponding operations on the simulation device based on H5 page operation information provided by the upper-layer monitoring service. The information encapsulation module encapsulates the definitions of operation information, while the data conversion module converts page operations and parameters into corresponding executable code data. The interface call simulation module simulates business interface calls on the simulation device to obtain callback data corresponding to the business interface.
[0071] Furthermore, such as Figure 6 As shown, this provides an information encapsulation module for a driver service, with reference to... Figure 6 It can be seen that the information encapsulation module of the driver service corresponds specifically to the received page operation records. These page operation records can include various different page operations and the corresponding operation parameters.
[0072] Specifically, refer to Figure 6 It can be seen that the information encapsulation module includes: 1) Overall page operations (e.g., FullPageAccess) representing actions on the entire page, such as opening a new page; 2) Individual page operations (e.g., PageEvent) representing the encapsulation of page operations, such as clicking and scrolling; 3) Interface call operations (e.g., JSAPIEvent) representing the encapsulation of business interfaces called in page operations and their return results. Specifically, if the external call parameters in the encapsulation information corresponding to an individual page operation are not empty, the callback function in the interface call operation will be simulated to call the business interface before executing the individual page operation. This ensures that the page operation is executed only after obtaining the external information required for the individual page operation through external calls.
[0073] In one exemplary embodiment, such as Figure 7 As shown, a process for implementing simulation test processing based on monitoring services and driver services of a simulation test server is provided, referring to... Figure 7It is understood that the monitoring service of the simulation test server is used to monitor operations on the terminal device, including monitoring whether a new webpage view window is added on the terminal, whether the new webpage view window contains a first display page, and whether page operations are triggered for the first display page. The server then feeds back the page links of the first display page and the page operation records corresponding to the page operations to the driver service of the simulation test server. Through the driver service of the simulation test server, the virtual simulation device is controlled to load and display the second display page corresponding to the page link, and the virtual simulation device is controlled to execute the page operations indicated by the page operation records, thereby obtaining the corresponding simulation test results.
[0074] Specifically, refer to Figure 7 It can be seen that the process of implementing simulation test processing based on the monitoring service and driver service of the simulation test server specifically includes:
[0075] 1) The monitoring service of the simulation test server establishes a communication connection with the terminal device through wired or wireless means;
[0076] 2) The monitoring service monitors whether new webpage view windows appear on the monitoring terminal devices (such as whether a new WebView window appears on a smartphone).
[0077] 3) If a new webpage view window exists on the terminal device, the monitoring service will determine whether a new H5 page is loaded in the new webpage view window;
[0078] 4) If a new H5 page is loaded in the newly added webpage view window, and the monitoring service receives login status data associated with the new H5 page from the terminal device, then the login status data and page link will be fed back to the driver service of the simulation test server.
[0079] 5) The driver service of the simulation test server generates a first control command based on the login state data and page links, and sends the first control command to multiple different types of virtual simulation devices, so as to control multiple different types of virtual simulation devices through the first control command, and load and display the second display page corresponding to the page link respectively;
[0080] 6) If a new H5 page is loaded in the newly added webpage view window, the monitoring service will add event monitoring code data based on the newly added webpage view window;
[0081] 7) The monitoring service monitors new and old H5 pages through event monitoring code data, and obtains page operation records for new and old H5 pages;
[0082] 8) The monitoring service obtains the page operation indicated by the page operation record and the operation parameters corresponding to the page operation, and feeds back the page operation and the operation parameters corresponding to the page operation to the driver service;
[0083] 9) The monitoring service determines whether to open a new H5 page based on page operations and the corresponding operation parameters;
[0084] 10) The driver service generates a second control command based on the page operation and the corresponding operation parameters, and sends the second control command to multiple different types of virtual simulation devices to control the virtual simulation devices to perform page operations on the second display page according to the operation parameters and obtain simulation test results.
[0085] In the above simulation test processing method, if a new webpage view window exists on the connected terminal device, the page link corresponding to the first display page loaded by the new webpage view window is obtained, and a first control command carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link. Since the page display area size of different types of virtual simulation devices is different, and the page content of the first display page and the second display page is the same, it is possible to achieve the purpose of executing the page display test case on one terminal device and simultaneously performing the simulation page display on multiple virtual simulation devices with different page display area sizes, reducing the cumbersome operation when performing simulation page display on multiple different virtual simulation devices. Furthermore, if a page operation record for the first displayed page is received from the terminal device, a second control instruction carrying the page operation record is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results. In this way, page operations executed on one terminal device can be synchronized to multiple virtual simulation devices of different types, avoiding the situation where page operations on the same page need to be repeatedly tested and verified on different virtual simulation devices. This achieves the goal of performing a single operation on one terminal device to realize simulation testing on multiple different virtual simulation devices, thus improving the processing efficiency of simulation testing based on different types of terminal devices.
[0086] In one exemplary embodiment, such as Figure 8 As shown, a simulation test processing method is provided, which is applied to... Figure 1 The simulation test server 106 in the example is used for illustration, including the following steps S802 to S806. Wherein:
[0087] Step S802: Obtain virtual simulation device setting parameters. The virtual simulation device setting parameters include the physical pixels of multiple different types of virtual simulation devices and the device pixel ratio set for the first display page.
[0088] Specifically, the simulation test server acquires the virtual simulation device setting parameters, including the physical pixels of multiple different types of virtual simulation devices. In other words, it acquires the physical pixels of the actual terminal device to be simulated. The physical pixel represents the smallest unit that the device can control for display, and it corresponds to the resolution data of the terminal device. Different types of terminal devices (such as small-screen devices, large-screen devices, landscape devices, etc.) have different physical pixels, but terminal devices of the same type have the same physical pixels. This can be understood as an inherent parameter of the terminal device and will not change during device use.
[0089] For example, for a certain type of device, such as a small-screen device or a landscape-screen device, the physical pixels of the device are fixed. Specifically, the resolution data of the webpage view window of a certain model of smartphone or tablet computer can be used as the physical pixels of the corresponding terminal device. Therefore, when simulating an actual terminal device, it is necessary to obtain the resolution data of the webpage view window of that terminal device as the physical pixels of the virtual simulation device obtained in the subsequent simulation. For example, if the resolution data of terminal device A is 1920*1080, it means that there are 1920 physical pixels horizontally and 1080 physical pixels vertically on the display screen of terminal device A.
[0090] Furthermore, the simulation test server also needs to obtain the device pixel ratio set for the first display page, specifically the device pixel ratio set for the first display page loaded on the actual terminal device. The device pixel ratio (DPR) refers to the ratio of physical pixels to device-independent pixels. A device-independent pixel represents a virtual pixel that can be used and controlled by the program. It can be converted into physical pixels based on the device pixel ratio; in other words, the device pixel ratio determines how many physical pixels a virtual pixel (i.e., a device-independent pixel) is converted into.
[0091] For example, if terminal device B has a resolution of 750*1334 and a device pixel ratio of 2:1, then terminal device B has 375*667 device-independent pixels. Similarly, if terminal device C has a resolution (i.e., physical pixels) of 1242*2208 and a device pixel ratio of 3:1, then terminal device C has 414*736 device-independent pixels.
[0092] Step S804: For each virtual simulation device, determine the device-independent pixels corresponding to the virtual simulation device based on the device physical pixels of the virtual simulation device and the device pixel ratio set for the first display page.
[0093] The simulation test server is equipped with a simulation service, which can be understood as a simulation site (such as a web site) that can simulate multiple different types of virtual simulation devices. When the simulation site (such as a web site) simulates the WebView window of an actual terminal device, it needs to consider the relationship between CSS pixels (i.e., logical pixels used in CSS style code) and device physical pixels. When the webpage is not scaled, one device-independent pixel is the same as one CSS pixel. That is, when the webpage is not scaled, the specific relationship between device-independent pixels and device physical pixels determines how many device physical pixels one virtual pixel (i.e., device-independent pixel) is converted into.
[0094] Specifically, for each virtual simulation device, the simulation service in the simulation test server, when simulating the WebView window of the actual terminal device, determines the device-independent pixels (or CSS pixels) of each virtual simulation device based on the device physical pixels of the virtual simulation device (which can also be understood as the device physical pixels of the actual terminal device to be simulated) and the device pixel ratio (DPR) set for the first display page on the terminal device. Based on the determined device-independent pixels of each virtual simulation device, the virtual simulation device is generated, that is, the virtual simulation device corresponding to the actual terminal device is simulated.
[0095] For example, when the webpage is not scaled, 1 device-independent pixel and 1 CSS pixel (which can also be understood as device-independent pixel) are the same. When the device pixel ratio is 1:1, 1 (1×1) device physical pixels are used to display 1 CSS pixel. When the device pixel ratio is 2:1, 4 (2×2) device physical pixels are used to display 1 CSS pixel. When the device pixel ratio is 3:1, 9 (3×3) device physical pixels are used to display 1 CSS pixel.
[0096] Step S806: Based on the independent pixels of each of the multiple different types of virtual simulation devices, virtual simulation devices are generated to obtain multiple different types of virtual simulation devices.
[0097] Specifically, the simulation test server uses the device-independent pixels of multiple different types of virtual simulation devices. For example, for terminal device D, when its device pixel ratio is 1:1, it uses 1 (1×1) device physical pixels to display 1 CSS pixel (i.e., device-independent pixel). Based on the virtual site, according to the rule of using 1 (1×1) device physical pixels to display 1 CSS pixel, and the resolution data (i.e. device physical pixels) corresponding to terminal device D, the server can simulate terminal device D and generate a virtual simulation device corresponding to terminal device D.
[0098] Similarly, for example, for terminal device E, when its device pixel ratio is 2:1, using 4 (2×2) device physical pixels to display 1 CSS pixel (i.e., device-independent pixel), then based on the virtual site, according to the rule of using 4 (2×2) device physical pixels to display 1 CSS pixel (i.e., device-independent pixel) and the resolution data (i.e. device physical pixels) corresponding to terminal device E, the terminal device E can be simulated to generate a virtual simulation device corresponding to terminal device E.
[0099] In an exemplary embodiment, after obtaining the device-independent pixels of multiple different types of virtual simulation devices, the simulation test server stores the device-independent pixels and physical pixels of each virtual simulation device as device tags at the simulation site. This allows the simulation site to pre-store device tags corresponding to multiple different types of virtual simulation devices. When simulation testing is required, the device tags corresponding to a target number of virtual simulation devices can be exported or selected. Based on the device tags of the multiple different types of virtual simulation devices, virtual simulation devices can be generated to obtain multiple different types of virtual simulation devices.
[0100] For example, the simulation service of the simulation test server can be understood as a website that can simulate the resolution data of various types of terminal devices. The simulation device data (i.e., the device-independent pixels of each virtual simulation device) included in the website can be pre-stored in a cloud database. Each virtual simulation device can be understood as an iframe tag in an HTML page (a tag used to define an inline frame or an inline frame). That is, the difference between different virtual simulation devices lies in the size of the iframe tag and the corresponding DPR (device pixel ratio).
[0101] In one exemplary embodiment, such as Figure 9 As shown, this provides a schematic diagram of different types of virtual simulation devices in a simulation site, with reference to... Figure 9It can be seen that there are four different types of virtual simulation devices displayed in the simulation site, including virtual simulation device 1, virtual simulation device 2, virtual simulation device 3, and virtual simulation device 4. The page content corresponding to each virtual simulation device is the same, but the device independent pixels of the different types of virtual simulation devices are different. That is, the size of the different types of virtual simulation devices when displayed as iframe tags in the simulation site is different, and the DPR (device pixel ratio) of the different types of virtual simulation devices is also different.
[0102] In this embodiment, by acquiring virtual simulation device setting parameters, including the physical pixels of multiple different types of virtual simulation devices and the device pixel ratio set for the first display page, and for each virtual simulation device, determining the device-independent pixels corresponding to the virtual simulation device based on the physical pixels of the virtual simulation device and the device pixel ratio set for the first display page, it is possible to generate multiple different types of virtual simulation devices based on the device-independent pixels of multiple different types of virtual simulation devices. Thus, when performing simulation testing on actual terminal devices, page operations performed on one terminal device can be synchronized to multiple different types of virtual simulation devices, avoiding the need to repeatedly test and verify page operations on different virtual simulation devices for the same page. This achieves the goal of performing a single operation on one terminal device to simulate and test multiple different virtual simulation devices, improving the processing efficiency of simulation testing based on different types of terminal devices.
[0103] In one exemplary embodiment, such as Figure 10 As shown, the steps for obtaining simulation test results, namely, if a page operation record for the first display page is received from the terminal device, a second control command carrying the page operation record is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record, and the steps for obtaining simulation test results specifically include the following steps S1002 to S1006. Wherein:
[0104] Step S1002: If a page operation record for the first display page is received from the terminal device, the page operation indicated by the page operation record and the operation parameters corresponding to the page operation are obtained.
[0105] Specifically, if the simulation test server receives page operation records for the first displayed page from the terminal device, it parses the page operation records and obtains the page operation indicated by the records, as well as the corresponding operation parameters. Specifically, the simulation test server's monitoring service monitors operations on the terminal device, including whether a new webpage view window has been added, whether the new webpage view window contains the first displayed page, and whether a page operation has been triggered for the first displayed page. Upon detecting a page operation for the first displayed page, the server receives the page operation records for that page from the terminal device.
[0106] For example, page operations specifically include opening a new page, clicking a page (including clicking page buttons, page links, and page boxes on the page), scrolling the page (such as scrolling down and scrolling up), and returning to the previous page. The page parameters corresponding to these operations may specifically include: the new page link for opening a new page, the page button clicked when clicking a page (such as a button to access a specific window on the page), the new link clicked when clicking a page (such as a download link for specific page content), the page box clicked when clicking a page and the content entered in the page box (such as text or characters), the page scrolling method (including scrolling down or up), and the previous page link when returning to the previous page.
[0107] Step S1004: Generate a second control instruction based on the page operation and the operation parameters corresponding to the page operation.
[0108] Specifically, the driver service of the simulation test server generates a second control command based on page operations and the corresponding operation parameters, such as clicking on the page (including clicking on page buttons, page links, and page boxes), clicking on the page buttons (such as the button to access a window on the page), clicking on new links on the page (such as download links for specific page content), clicking on the page boxes, and the content entered in the page boxes (such as text, characters, etc.).
[0109] Step S1006: The second control command is sent to multiple virtual simulation devices of different types, controlling the virtual simulation devices to perform page operations on the second display page according to the operation parameters, and obtain simulation test results.
[0110] Specifically, the driver service of the simulation test server sends the second control command to multiple different types of virtual simulation devices, so as to control the virtual simulation devices to execute the page operation record indicated by the second control command and obtain the simulation test results.
[0111] The simulation test server's driver service includes an automation module. This module executes corresponding operations in the simulation device based on the H5 page operation information provided by the upper-layer monitoring service. For example, it executes executable code data corresponding to page operations and operation parameters to simulate page operations. The information encapsulation module encapsulates the definitions of operation information (such as overall page operations, individual page operations, and interface call operations), while the data conversion module within the automation module converts page operations and operation parameters into corresponding executable code data.
[0112] In one exemplary embodiment, such as Figure 11 As shown, a process for simulation testing based on multiple different types of simulation devices is provided, referring to... Figure 11 It can be seen that the process of simulation testing based on multiple different types of simulation equipment specifically includes:
[0113] 1) Execute H5 page test cases based on the test terminal device;
[0114] Specifically, H5 page test cases include actions triggered on the terminal device, such as monitoring clicks on the webpage view window triggered on the terminal device, loading the first display page in the webpage view window, and clicks on the first display page.
[0115] 2) The simulation test server monitors the test terminal device. If a new webpage view window is added on the test terminal device, the server obtains the page link corresponding to the first displayed page loaded by the new webpage view window.
[0116] The process before simulation testing includes initialization: A) Establishing a communication connection between the test terminal device (such as a smartphone or tablet) and the simulation test server via wired USB or wireless means; B) Performing initialization operations such as driver updates and starting the simulation site through the simulation test server.
[0117] 3) When the simulation test server receives the login status data associated with the first display page from the terminal device, it generates a first control command based on the login status data and the page link, and sends the first control command to multiple virtual simulation devices of different types in the simulation site to control the virtual simulation devices to load and display the second display page corresponding to the page link.
[0118] In this simulation site, the page display areas of various types of virtual simulation devices differ in size. However, the content of the first displayed page loaded in the newly added webpage view window on the test terminal device is the same as the content of the second displayed page loaded and displayed on the different types of virtual simulation devices. These different types of virtual simulation devices can specifically include small-screen devices, large-screen devices, and landscape-oriented devices.
[0119] 4) When the simulation test server receives the page operation record for the first display page from the terminal device, it obtains the page operation indicated by the page operation record and the operation parameters corresponding to the page operation. Based on the page operation and the operation parameters corresponding to the page operation, it generates a second control command and sends the second control command to multiple virtual simulation devices of different types to control the virtual simulation devices to perform page operations on the second display page according to the operation parameters and obtain simulation test results.
[0120] The simulation test results of different types of virtual simulation devices on the second display page can be specifically understood as the page display effects of different types of virtual simulation devices. That is, by executing H5 page test cases on a test terminal device, the page display effects of multiple different types of virtual simulation devices can be obtained. Thus, a single operation can be performed on a single terminal to achieve the purpose of simulating and testing multiple different virtual simulation devices, thereby improving the processing efficiency of simulation testing based on different types of terminal devices.
[0121] In one exemplary embodiment, the method of obtaining simulation test results further includes:
[0122] If the terminal device receives the interface call operation record for the business interface deployed on the first display page, obtain the call method and return value corresponding to the interface call operation record;
[0123] A third control instruction is generated based on the calling method and the call return value. The third control instruction is then sent to multiple different types of virtual simulation devices to control these devices. Interface call tests are performed according to the calling method and the call return value to obtain simulation test results.
[0124] Specifically, if the simulation test server receives the interface call operation record of the business interface deployed on the first display page from the terminal device, it parses the interface call operation record to obtain the calling method and return value corresponding to the interface call operation record.
[0125] Specifically, the monitoring service of the simulation test server monitors the operations on the terminal device, including monitoring the call operations of the business interfaces deployed on the first display page on the terminal device. For example, the first display page has multiple business interfaces deployed, and different business interfaces can access different business data, such as accessing internal databases, external databases, or third-party platforms through different business interfaces. When a call operation is detected to the business interface deployed on the first display page, it is necessary to obtain the business interface called by the call operation, the calling method of the interface, and the return value of the call.
[0126] Furthermore, the simulation test server generates a third control instruction based on the calling method and the call return value, and sends the third control instruction to multiple different types of virtual simulation devices. Through the third control instruction, multiple different types of virtual simulation devices are controlled to perform interface call tests according to the calling method and the call return value, and simulation test results are obtained.
[0127] For example, if the monitoring service of the simulation test server detects a call operation to the business interface 1 deployed on the first display page, it obtains the business interface 1 called by the call operation, the calling method of the business interface 1, and the call return value, and generates a third control instruction through the driver service of the simulation test server based on the called business interface 1, the calling method of the business interface 1, and the call return value.
[0128] The simulation test server's driver service includes an automation module. This module executes corresponding operations in the simulation device based on H5 page operation information provided by the upper-layer monitoring service. For example, it calls the simulation module through its interface to execute executable code data corresponding to the business interface's call methods and return values, thus simulating interface calls. The information encapsulation module encapsulates the definitions of operation information (such as overall page operations, individual page operations, and interface call operations). The data conversion module converts the business interface's call methods and return values into corresponding executable code data. The interface call simulation module simulates business interface calls in the simulation device to obtain callback data corresponding to the business interface.
[0129] In an exemplary embodiment, the monitoring service of the simulation test server monitors the first display interface based on the event monitoring code data added by the newly added web page view window to obtain page operation records for the first display page, and also monitors the interface call operations of the business interfaces deployed on the first display page to obtain interface call operation records.
[0130] The H5 page runs embedded in the WebView window. An H5 page is a webpage that runs in the embedded browser of the application software installed on the terminal device. It usually relies on the login state and business interfaces provided by the terminal device environment to run normally. The business interface can be understood as a set of interfaces that can call client capabilities in the webpage. Since the virtual simulation device does not run directly in the client, but runs and simulates tests through the browser, it is also necessary to simulate the interface call operation of the business interface in the browser.
[0131] For example, the event monitoring code data monitors and reads the calling methods and callback return values of the business interface by rewriting methods such as console.log (which represents the information output to the Web console, which can be a single string or an alternative string, or one or more objects). The H5 page transmits the reading calling methods and callback return values of the business interface to the driver service of the simulation test server, so that the driver service can simulate them in the virtual simulation device. Specifically, the driver service issues third control instructions to multiple different types of virtual simulation devices, so as to control multiple different types of virtual simulation devices through the third control instructions, and perform interface call tests according to the calling methods and call return values to obtain simulation test results.
[0132] In this embodiment, if a page operation record for the first display page is received from the terminal device, the page operation indicated by the page operation record and the corresponding operation parameters are obtained. Based on the page operation and the corresponding operation parameters, a second control instruction is generated and sent to multiple virtual simulation devices of different types to control the virtual simulation devices to execute page operations on the second display page according to the operation parameters and obtain simulation test results. This allows interface call operations executed on one terminal device to be synchronized to multiple virtual simulation devices of different types, avoiding the need to repeatedly test and verify the interface call operation for the same page on different virtual simulation devices. This achieves the goal of performing a single operation on one terminal device to simulate and test multiple different virtual simulation devices, improving the processing efficiency of simulation tests based on different types of terminal devices.
[0133] In one exemplary embodiment, such as Figure 12 As shown, an overall processing flow for a simulation testing method is provided. This method involves different services of the simulation testing server (including simulation services, monitoring services, and driver services) and different types of virtual simulation devices. The simulation testing method specifically includes the following steps:
[0134] Simulation services for simulation test servers include:
[0135] Step S1201: Obtain virtual simulation device setting parameters. The virtual simulation device setting parameters include the physical pixels of multiple different types of virtual simulation devices and the device pixel ratio set for the first display page.
[0136] Step S1202: For each virtual simulation device, determine the device-independent pixels corresponding to the virtual simulation device based on the device physical pixels of the virtual simulation device and the device pixel ratio set for the first display page.
[0137] Step S1203: Based on the independent pixels of each of the multiple different types of virtual simulation devices, virtual simulation devices are generated to obtain multiple different types of virtual simulation devices.
[0138] Monitoring services for simulation test servers include:
[0139] Step S1204: If it is determined that a new webpage view window exists on the connected terminal device, establish a communication connection with the new webpage view window to obtain the first display page loaded by the new webpage view window.
[0140] Step S1205: Parse the first display page and obtain the page link corresponding to the first display page.
[0141] The driver services for the simulation test server include:
[0142] Step S1206: If login status data associated with the first display page is received from the terminal device, a first control command is generated based on the login status data and the page link.
[0143] Step S1207: The first control command is sent to multiple different types of virtual simulation devices to control the multiple different types of virtual simulation devices to load and display the page links corresponding to the second display page.
[0144] Monitoring services for simulation test servers also include:
[0145] Step S1208: If a page operation record for the first display page is received from the terminal device, the page operation indicated by the page operation record and the operation parameters corresponding to the page operation are obtained.
[0146] The driver services for the simulation test server also include:
[0147] Step S1209: Generate a second control instruction based on the page operation and the operation parameters corresponding to the page operation.
[0148] Step S1210: The second control command is sent to multiple virtual simulation devices of different types, controlling the virtual simulation devices to perform page operations on the second display page according to the operation parameters, and obtain simulation test results.
[0149] Monitoring services for simulation test servers also include:
[0150] Step S1211: If the terminal device receives the interface call operation record for the business interface deployed on the first display page, obtain the call method and call return value corresponding to the interface call operation record.
[0151] The driver services for the simulation test server also include:
[0152] Step S1212: Generate a third control instruction based on the calling method and the call return value, and send the third control instruction to multiple different types of virtual simulation devices to control multiple different types of virtual simulation devices. Perform interface call tests according to the calling method and the call return value to obtain simulation test results.
[0153] In the above simulation test processing method, by sending a first control command carrying a page link to multiple different types of virtual simulation devices, the virtual simulation devices can be controlled to load and display the second display page corresponding to the page link. Since the page display area size of different types of virtual simulation devices is different, and the page content of the first display page and the second display page is the same, it is possible to execute the page display test case on one terminal device and then simultaneously perform the simulation page display on multiple virtual simulation devices with different page display area sizes, thereby reducing the cumbersome operation when performing simulation page display on multiple different virtual simulation devices. Furthermore, by issuing a second control instruction carrying page operation records to multiple different types of virtual simulation devices, the virtual simulation devices are controlled to execute the page operations indicated by the page operation records to obtain simulation test results. Similarly, a third control instruction is issued to multiple different types of virtual simulation devices to control them to perform interface call tests according to the calling methods and return values, thus obtaining simulation test results. This allows page operations or interface call operations executed on one terminal device to be synchronized to multiple different types of virtual simulation devices, avoiding the need to repeatedly test and verify page operations on different virtual simulation devices for the same page. This achieves the goal of performing a single operation on one terminal to simulate multiple different virtual simulation devices, improving the efficiency of simulation test processing based on different types of terminal devices.
[0154] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0155] Based on the same inventive concept, this application also provides a simulation test processing apparatus for implementing the simulation test processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the simulation test processing apparatus provided below can be found in the limitations of the simulation test processing method described above, and will not be repeated here.
[0156] In one exemplary embodiment, such as Figure 13 As shown, a simulation test processing device is provided, including: a page link acquisition module 1302, a page display control module 1304, and a simulation test result acquisition module 1306, wherein:
[0157] The page link acquisition module 1302 is used to acquire the page link corresponding to the first displayed page loaded by the newly added web page view window if a newly added web page view window exists on the connected terminal device.
[0158] The page display control module 1304 is used to send a first control command carrying a page link to multiple virtual simulation devices of different types, so as to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area size of different types of virtual simulation devices is different; the page content of the first display page and the second display page is the same;
[0159] The simulation test result acquisition module 1306 is used to, if it receives a page operation record for the first display page from the terminal device, send a second control instruction carrying the page operation record to multiple virtual simulation devices of different types, so as to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain the simulation test result.
[0160] In the aforementioned simulation test processing device, if a new webpage view window exists on the connected terminal device, the device obtains the page link corresponding to the first display page loaded by the new webpage view window and sends a first control command carrying the page link to multiple virtual simulation devices of different types. This controls the virtual simulation devices to load and display the second display page corresponding to the page link. Since the page display area sizes of different types of virtual simulation devices are different, and the page content of the first and second display pages is the same, it is possible to execute the page display test case on one terminal device and then simultaneously perform the simulation page display on multiple virtual simulation devices with different page display area sizes, reducing the cumbersome operations when performing simulation page display on multiple different virtual simulation devices. Furthermore, if a page operation record for the first displayed page is received from the terminal device, a second control instruction carrying the page operation record is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results. In this way, page operations executed on one terminal device can be synchronized to multiple virtual simulation devices of different types, avoiding the situation where page operations on the same page need to be repeatedly tested and verified on different virtual simulation devices. This achieves the goal of performing a single operation on one terminal device to realize simulation testing on multiple different virtual simulation devices, thus improving the processing efficiency of simulation testing based on different types of terminal devices.
[0161] In one exemplary embodiment, a simulation test processing apparatus is provided, further comprising:
[0162] The virtual simulation device setting parameter acquisition module is used to acquire virtual simulation device setting parameters; the virtual simulation device setting parameters include the physical pixels of multiple different types of virtual simulation devices, and the device pixel ratio set for the first display page;
[0163] The device-independent pixel determination module is used to determine the device-independent pixels corresponding to each virtual simulation device based on the device's physical pixels and the device pixel ratio set for the first display page.
[0164] The virtual simulation device generation module is used to generate virtual simulation devices based on the independent pixels of each of the multiple different types of virtual simulation devices, thus obtaining multiple different types of virtual simulation devices.
[0165] In an exemplary embodiment, the page link acquisition module is further configured to: if a new webpage view window exists on the connected terminal device, establish a communication connection with the new webpage view window to obtain the first display page loaded by the new webpage view window; parse the first display page to obtain the page link corresponding to the first display page.
[0166] In an exemplary embodiment, the page display control module is further configured to: if it receives login status data associated with the first display page from the terminal device, generate a first control instruction based on the login status data and the page link; and send the first control instruction to multiple different types of virtual simulation devices to control the multiple different types of virtual simulation devices to load and display the second display page corresponding to the page link respectively.
[0167] In an exemplary embodiment, the simulation test result acquisition module is further configured to: if a page operation record for the first display page is received from the terminal device, acquire the page operation indicated by the page operation record and the operation parameters corresponding to the page operation; generate a second control instruction based on the page operation and the operation parameters corresponding to the page operation; and send the second control instruction to multiple virtual simulation devices of different types to control the virtual simulation devices to perform page operations on the second display page according to the operation parameters, thereby obtaining the simulation test result.
[0168] In an exemplary embodiment, the simulation test result acquisition module is further configured to: if it receives an interface call operation record of the business interface deployed on the first display page from the terminal device, obtain the call method and call return value corresponding to the interface call operation record; generate a third control instruction based on the call method and call return value, send the third control instruction to multiple different types of virtual simulation devices, control multiple different types of virtual simulation devices, perform interface call tests according to the call method and call return value, and obtain simulation test results.
[0169] Each module in the aforementioned simulation test processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0170] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal. Taking the computer device as a server as an example, its internal structure diagram can be as follows: Figure 14As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as newly added webpage view windows, a first displayed page, page links corresponding to the first displayed page, first control instructions carrying page links, different types of virtual simulation devices, a second displayed page, page display areas, page operation records, second control instructions carrying page operation records, page operations, and simulation test results. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a simulation test processing method.
[0171] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0172] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0173] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0174] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0178] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A simulation test processing method, characterized in that, The method includes: If a new webpage view window exists on the connected terminal device, obtain the page link corresponding to the first display page loaded by the new webpage view window; A first control command carrying the page link is sent to multiple virtual simulation devices of different types to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same; If the terminal device receives a page operation record for the first display page, a second control instruction carrying the page operation record is sent to the multiple virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results.
2. The method according to claim 1, characterized in that, The method further includes: Obtain virtual simulation device setting parameters; the virtual simulation device setting parameters include the physical pixels of each of the multiple different types of virtual simulation devices, and the device pixel ratio set for the first display page; For each virtual simulation device, the device-independent pixels corresponding to the virtual simulation device are determined based on the device physical pixels of the virtual simulation device and the device pixel ratio set for the first display page; Based on the device-independent pixels of each of the multiple different types of virtual simulation devices, virtual simulation devices are generated to obtain the multiple different types of virtual simulation devices.
3. The method according to claim 1, characterized in that, If a new webpage view window exists on the connected terminal device, obtaining the page link corresponding to the first display page loaded by the new webpage view window includes: If a new webpage view window exists on the connected terminal device, establish a communication connection with the new webpage view window to obtain the first display page loaded by the new webpage view window; Parse the first displayed page to obtain the page link corresponding to the first displayed page.
4. The method according to any one of claims 1 to 3, characterized in that, The step of sending a first control command carrying the page link to multiple different types of virtual simulation devices to control the virtual simulation devices to load and display the second display page corresponding to the page link includes: If the terminal device receives login status data associated with the first display page, a first control command is generated based on the login status data and the page link. The first control command is sent to the plurality of different types of virtual simulation devices, controlling the plurality of different types of virtual simulation devices to load and display the second display page corresponding to the page link respectively.
5. The method according to any one of claims 1 to 3, characterized in that, If the terminal device receives a page operation record for the first displayed page, a second control command carrying the page operation record is sent to the plurality of virtual simulation devices of different types to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain simulation test results, including: If the terminal device receives a page operation record for the first displayed page, the page operation indicated by the page operation record and the operation parameters corresponding to the page operation are obtained. A second control instruction is generated based on the page operation and the operation parameters corresponding to the page operation; The second control command is sent to the multiple virtual simulation devices of different types, and the virtual simulation devices are controlled to perform the page operation on the second display page according to the operation parameters to obtain the simulation test results.
6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the terminal device receives the interface call operation record for the business interface deployed on the first display page, obtain the call method and call return value corresponding to the interface call operation record; A third control instruction is generated based on the calling method and the call return value. The third control instruction is then sent to the multiple different types of virtual simulation devices to control the multiple different types of virtual simulation devices. Interface call tests are performed according to the calling method and the call return value to obtain simulation test results.
7. A simulation test processing device, characterized in that, The device includes: The page link acquisition module is used to acquire the page link corresponding to the first display page loaded by the newly added webpage view window if a newly added webpage view window exists on the connected terminal device. The page display control module is used to send a first control command carrying the page link to multiple virtual simulation devices of different types, so as to control the virtual simulation devices to load and display the second display page corresponding to the page link; the page display area sizes of the different types of virtual simulation devices are different; the page content of the first display page and the second display page is the same; The simulation test result acquisition module is used to, if it receives a page operation record for the first display page from the terminal device, send a second control instruction carrying the page operation record to the plurality of different types of virtual simulation devices, so as to control the virtual simulation devices to execute the page operation indicated by the page operation record and obtain the simulation test result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.