CN111290944B - Script generation method, script generation device and storage medium - Google Patents
Script generation method, script generation device and storage medium Download PDFInfo
- Publication number
- CN111290944B CN111290944B CN202010049429.5A CN202010049429A CN111290944B CN 111290944 B CN111290944 B CN 111290944B CN 202010049429 A CN202010049429 A CN 202010049429A CN 111290944 B CN111290944 B CN 111290944B
- Authority
- CN
- China
- Prior art keywords
- script
- debugging
- terminal
- network
- network data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000013515 script Methods 0.000 title claims abstract description 149
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000004891 communication Methods 0.000 claims abstract description 42
- 230000000007 visual effect Effects 0.000 claims abstract description 20
- 230000004044 response Effects 0.000 claims abstract description 7
- 238000012360 testing method Methods 0.000 claims description 26
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 9
- 238000004519 manufacturing process Methods 0.000 abstract description 3
- 238000007726 management method Methods 0.000 description 12
- 239000003795 chemical substances by application Substances 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 230000009471 action Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 241000282553 Macaca Species 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 235000020289 caffè mocha Nutrition 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present disclosure relates to a script generation method, a script generation apparatus, and a computer-readable storage medium, the script generation method including: acquiring operation on a virtual display page, wherein the virtual display page is created based on a remote real machine debugging application framework and is used for displaying a network application of which the terminal responds to the operation, and the network application is used for triggering the terminal to perform network communication in response to the operation; acquiring network data for operating the trigger terminal to perform network communication by using a network proxy tool; debugging the acquired script data on the virtual display page; compiling and generating a script based on a debugging result of debugging the script data. According to the embodiment of the disclosure, on the basis of the package grabbing tool, a visual programming technology is integrated, automatic script generation is realized, the work flow is simplified, the production efficiency is improved, and the cost is saved.
Description
Technical Field
The present disclosure relates to the technical field of software testing, and in particular, to a script generation method, a script generation device, and a storage medium.
Background
With the rapid development of mobile internet technology, the demands of people for mobile terminals are increasing, and applications installed on mobile terminals are used to obtain information and services required for work and life. In order to ensure normal use of an application program, performance of the application program is monitored, and monitoring and testing of performance of the application program, particularly testing related to communication between a mobile terminal and a network, becomes more and more important.
In the related art, the application program test needs to be correspondingly set on a mobile phone and a computer, a complete test environment is built, and the requirements on the tested personnel are high. On the basis of familiarity with business requirements, a person who needs to perform testing grasps the configuration of the whole testing environment and the operation flow of the whole testing tool, needs to familiarize with the writing of related codes, and is difficult to realize automation of the testing flow.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a script generation method, a script generation apparatus, a system, and a computer-readable storage medium.
According to an aspect of the embodiments of the present disclosure, there is provided a script generation method including: acquiring operation on a virtual display page, wherein the virtual display page is created based on a remote real machine debugging application framework and is used for displaying a network application of which the terminal responds to the operation, and the network application is used for triggering the terminal to perform network communication in response to the operation; acquiring network data for operating the trigger terminal to perform network communication by using a network proxy tool; debugging the acquired network data on the virtual display page; compiling and generating a script based on a debugging result of debugging the network data.
In one embodiment, the remote real machine debugging application framework is an STF management platform.
In one embodiment, debugging acquired network data on a virtual display page includes: displaying network data in real time on a virtual display page; and debugging the network data on the virtual display page through a visual programming tool.
In one embodiment, the visual programming tool is a Blockly framework.
In one embodiment, the network broker is a middleman (Mitmproxy).
In one embodiment, compiling and generating a script based on a debugging result of debugging network data includes: compiling the debugging result and the network data of the debugging and generating a script.
In an embodiment, the script generation method further includes: transmitting the script to the terminal; executing the script at the terminal to obtain a test result of the script.
According to still another aspect of the embodiments of the present disclosure, there is provided a script generating apparatus, including: the system comprises an acquisition module, a network proxy tool, a network application and a network communication module, wherein the acquisition module is used for acquiring the operation on a virtual display page, acquiring network data of the operation trigger terminal for network communication by using the network proxy tool, wherein the virtual display page is created based on a remote real machine debugging application framework and is used for displaying a network application of which the terminal responds to the operation, and the network application is used for responding to the operation trigger terminal for network communication; the debugging module is used for debugging the acquired network data on the virtual display page; and the generation module is used for compiling and generating a script based on a debugging result of debugging the network data.
In one embodiment, the remote real machine debugging application framework is an STF management platform.
In one embodiment, the debug module uses the following manner to debug the acquired network data on the virtual display page: displaying network data in real time on a virtual display page; and debugging the network data on the virtual display page through a visual programming tool.
In one embodiment, the visual programming tool is a Blockly framework.
In one embodiment, the network broker is a middleman (Mitmproxy).
In one embodiment, the generation module compiles and generates the script based on the debug result of the network data in the following manner: compiling the debugging result and the network data of the debugging and generating a script.
In an embodiment, the script generating apparatus further includes: the sending module is used for sending the script to the terminal; and the execution module is used for executing the script at the terminal to obtain a test result of the script.
According to still another aspect of the embodiments of the present disclosure, there is provided an apparatus for script generation, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: executing the script generation method of any one of the above.
According to yet another aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, which when executed by a processor of a mobile terminal, enables the mobile terminal to perform the method of script generation of one of the above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: according to the embodiment of the disclosure, a virtual display page is created based on a remote real machine debugging application framework, a network application of a terminal is displayed, an operation performed on the terminal network application on the virtual display page is acquired, the terminal is triggered to perform network communication, a network agent tool is utilized to acquire network data of the terminal, the acquired network data is debugged on the virtual display page, and a script is automatically compiled and generated based on a debugging result. Based on the package grabbing tool, the visual programming technology is integrated, automatic script generation is realized, the working flow is simplified, the production efficiency is improved, and the cost is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart illustrating a script generation method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a script generation method according to another exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating a script generation method according to still another exemplary embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a script generation system shown in accordance with yet another exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram of a script generating apparatus according to an exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram of a script generating apparatus according to still another exemplary embodiment of the present disclosure.
Fig. 7 is a block diagram of an apparatus according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a script generation method according to an exemplary embodiment, which may be applied to an intelligent terminal device, which may be a smart phone, a tablet computer, etc. of an android system, and in which an application program is installed, and executed by a processor in the intelligent terminal device.
As shown in fig. 1, the script generation method includes the following steps.
In step S101, an operation on a virtual display page is acquired, the virtual display page is created based on a remote real machine debugging application framework, and is used for displaying a network application of a terminal responding to the operation, and the network application is used for triggering the terminal to perform network communication in response to the operation.
And creating a virtual display page based on the remote real machine debugging application framework, wherein the virtual display page is used for displaying a screen page of the display terminal. The screen page of the terminal displays, for example, an interface of a network application program. The virtual display page may be presented in the form of a Web page.
Based on the remote real machine debugging application framework, the operation is performed on the virtual display interface, namely the operation is equivalent to the same operation performed on the terminal. The operation may be an operation performed on a network application installed on the terminal. The network application may be an application when the terminal connects to the network, and triggers the terminal to perform network communication corresponding to an operation at an application interface, so as to obtain a network resource service. And operating the network application at the terminal, and triggering the terminal to perform network communication with the server.
When the terminal performs network communication, the terminal sends a request to the server and receives data returned by the server. The data generated when the terminal performs network communication is network data.
And responding the network application of the operation by the terminal in the virtual display page. The user may perform an action in the virtual screen, and the script recording device receives the action performed by the user in the virtual screen accordingly.
In step S102, network data for operating the trigger terminal to perform network communication is acquired by using the network proxy tool.
The network proxy tool, for example, fiddler, charles, determines the response of the terminal by the network data of the terminal for network communication. The purpose of generating the analog data (Mock) can also be realized by intercepting and tampering the network data.
The network data of the network communication is obtained by the operation trigger terminal, so that program development and inspection and analysis of the network data by testers can be facilitated, or semi-automatic testing can be realized by a self-defined script mode.
In step S103, the acquired network data is debugged on the virtual display page.
In step S104, a script is compiled and generated based on the debugging result of the network data debugging.
The user can program the Web page based on the acquired network data, and a script is generated through a code generator after debugging is completed.
According to the embodiment of the disclosure, a virtual display page is created based on a remote real machine debugging application framework, a network application of a terminal is displayed, an operation performed on the terminal network application on the virtual display page is acquired, the terminal is triggered to perform network communication, a network agent tool is utilized to acquire network data of the terminal, the acquired network data is debugged on the virtual display page, and a script is automatically compiled and generated based on a debugging result. Based on the package grabbing tool, the visual programming technology is integrated, automatic script generation is realized, the working flow is simplified, the production efficiency is improved, and the cost is saved.
In one embodiment, the remote real machine debugging application framework is an STF management platform.
STF (Smartphone Test Farm) platform is an application framework for managing and operating an open-source remote terminal based on a webpage, and is used for realizing real-time operation of the webpage on a screen of the terminal in the process of generating an automatic script through visual programming and editing. And displaying terminal screen information in real time, receiving the operation of a user on the network application, and triggering the terminal to carry out network communication request. And remotely operating the terminal through the browser, and debugging the application to realize testing on the terminal.
The present embodiment discloses another script generation method. Referring to fig. 2, fig. 2 shows a flowchart of a script generation method shown in another exemplary embodiment of the present disclosure. As shown in fig. 2, step S103 shown in fig. 1 includes the following steps.
In step S1031, the network data is displayed in real time on the virtual display page.
Based on the operation of the Web page on the network application, triggering the terminal to perform network communication, and displaying the acquired network data on the Web page in real time.
In step S1032, the network data is debugged on the virtual display page by the visual programming tool.
Programming and debugging are performed on the Web page based on the acquired network data, visual programming has the characteristic that the visual programming is obtained, and complex operation is hidden through layer-by-layer encapsulation.
The actions executed by the user in the Web page are recorded in the visual programming page through the visual programming tool, the network data are displayed in the Web page, whether the network data are consistent with the expected network data is judged according to the network data, debugging is carried out according to the requirements, and the correctness of the finally generated script is improved.
The user can realize a complete function of Mock verification data without concern for implementation details of the bottom layer.
In one embodiment, the visual programming tool is a Blockly framework.
The Web page can be programmed based on the acquired network data in the form of a graph block, and the bottom layer of the graph block is packaged with operations such as verification and Mock on various network data, and only the corresponding service data needs to be filled.
In a Web page provided by the block framework, actions performed by a user operating a Web application are recorded in the Web page in the form of graphic blocks. The block contains at least one graphics block, each of the at least one graphics block corresponding to an action to enable the acquired action to be identified and presented graphically to the user. Through real-time display of the Web page, the user can intuitively see the executed action through the blocking tool, and the effect obtained by the seeing is generated. This direct form of feedback helps agree on the user behavior and behavior recorded by the script recording system.
By adopting the block framework, a developer does not need to care about the implementation details of the bottom layer, and can realize the complete Mock function only by carrying out simple configuration on the operation block of the Web page.
In one embodiment, the network broker is a middleman (Mitmproxy).
The intermediate proxy (man-in-the-middle proxy), similar to fiddler, charles and other tools, can configure the Mitmproxy environment at the computer end, intercept the network request of the terminal and the return data sent by the server based on the network request of the terminal by setting the proxy, and can also customize the script for testing.
In one embodiment, the debug results and network data of the debug are compiled and scripts are generated.
The embodiment discloses another script generation method. Fig. 3 is a flowchart illustrating a script generation method according to still another exemplary embodiment of the present disclosure. As shown in fig. 3, the script generation method includes the following steps.
In step S301, an operation on a virtual display page is acquired, the virtual display page is created based on a remote real machine debugging application framework, and is used for displaying a network application of a terminal responding to the operation, and the network application is used for triggering the terminal to perform network communication in response to the operation.
In step S302, network data for operating the trigger terminal to perform network communication is acquired by using the network proxy tool.
In step S303, the acquired script data is debugged on the virtual display page.
In step S304, a script is compiled and generated based on the debugging result of the debugging of the script data.
And automatically generating a script through a code generator based on a debugging result of debugging the script data, and storing the generated script.
In step S305, a script is transmitted to the terminal.
And sending the generated script to a terminal, wherein the terminal can be one or a plurality of the terminals, so that the automatic operation of the large-scale script in the terminal can be performed, and the test result of the script can be obtained.
In step S306, the script is executed at the terminal to obtain a test result of the script.
In the process of executing the script by the terminal, the automatic operation of the generated script can be realized by using the Uiautostat provided by the open source framework Mocha, macaca or the Android system, and a test result is obtained, so that the test efficiency of the script is improved.
The STF management platform 10 collects image information of the terminal 11 and presents it on the Web page 12 in real time. The user triggers the network application of the terminal 11 to perform network communication with the server 14 by an operation on the Web page 12.
When the user determines to perform network data acquisition of the terminal 11, the network application of the terminal 11 is triggered to perform network communication with the server 14 through the Web page 12 operation.
The STF management platform 10 opens the mitmprox agent 13 and transmits agent configuration information of the mitmprox agent 13 to the terminal 11.
The terminal 11 performs network connection configuration according to the proxy configuration information, and the mitxproxy proxy 13 acquires network data and presents the acquired network data on the Web page 12 in real time through the STF management platform 10.
The user may debug, i.e., block program, the Web page 12 in the form of a graphic block based on the acquired network data.
The bottom layer of the graph block in the block programming encapsulates operations such as verification and Mock on various network data, and a user only needs to fill corresponding service data.
After the completion of the debugging, a script is automatically generated by the code generator 15, and the generated script is saved. The generated script may be automatically run on the terminal 11.
The script is sent to the terminal 11.
The terminal 11 executes the acquired script, and can automatically start the network proxy and set the script, and execute the script to obtain the test result of the script.
Fig. 4 is a schematic diagram of a script generation system shown in accordance with yet another exemplary embodiment of the present disclosure.
The STF management platform 10 collects image information of the terminal 11 and presents it on the Web page 12 in real time. The user triggers the network application of the terminal 11 to perform network communication with the server 14 by an operation on the Web page 12.
When the user determines to perform network data acquisition of the terminal 11, the network application of the terminal 11 is triggered to perform network communication with the server 14 through the Web page 12 operation.
The STF management platform 10 opens the mitmprox agent 13 and transmits agent configuration information of the mitmprox agent 13 to the terminal 11.
The terminal 11 performs network connection configuration according to the proxy configuration information, and the mitxproxy proxy 13 acquires network data and presents the acquired network data on the Web page 12 in real time through the STF management platform 10.
The user may debug, i.e., block program, the Web page 12 in the form of a graphic block based on the acquired network data.
The bottom layer of the graph block in the block programming encapsulates operations such as verification and Mock on various network data, and a user only needs to fill corresponding service data.
After the completion of the debugging, a script is automatically generated by the code generator 15, and the generated script is saved. The generated script may be automatically run on the terminal 11.
The script is sent to the terminal 11.
The terminal 11 executes the acquired script, and can automatically start the network proxy and set the script, and execute the script to obtain the test result of the script.
FIG. 5 is a block diagram of an apparatus for script generation, according to an example embodiment. As shown in fig. 5, the script generation apparatus 200 includes: an acquisition module 210, a debug module 220, and a generation module 230.
The obtaining module 210 is configured to obtain an operation on a virtual display page, and obtain, by using a network proxy tool, network data for performing network communication by an operation trigger terminal, where the virtual display page is created based on a remote real machine debugging application framework, and is configured to display a network application for responding to the operation by the operation trigger terminal, where the network application is configured to perform network communication by responding to the operation trigger terminal.
And the debugging module 220 is used for debugging the acquired script data on the virtual display page.
The generating module 230 is configured to compile and generate a script based on a debugging result of debugging the script data.
In one embodiment, the remote real machine debugging application framework is an STF management platform.
In one embodiment, the debug module 220 debugs the acquired network data on the virtual display page as follows: displaying network data in real time on a virtual display page; and debugging the network data on the virtual display page through a visual programming tool.
In one embodiment, the visual programming tool is a Blockly framework.
In one embodiment, the network agent is Mitmproxy.
In one embodiment, the generation module 230 compiles and generates the script based on the debugging results of the debugging of the script data in the following manner: compiling the debugging result and the network data of the debugging and generating a script.
Fig. 6 is a block diagram of a script generating apparatus according to an exemplary embodiment. As shown in fig. 6, the script generating apparatus 100 further includes: a sending module 240 and an executing module 250.
And the sending module 240 is configured to send the script to the terminal.
And the execution module 250 is used for executing the script at the terminal to obtain the test result of the script.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
FIG. 7 is a block diagram illustrating an apparatus 300 for script generation, according to an example embodiment. For example, apparatus 300 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 7, the apparatus 300 may include one or more of the following components: a processing component 302, a memory 304, a power component 306, a multimedia component 308, an audio component 310, an input/output (I/O) interface 312, a sensor component 314, and a communication component 316.
The processing component 302 generally controls overall operation of the apparatus 300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 302 can include one or more modules that facilitate interactions between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate interaction between the multimedia component 308 and the processing component 302.
Memory 304 is configured to store various types of data to support operations at apparatus 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phonebook data, messages, pictures, videos, and the like. The memory 304 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 306 provides power to the various components of the device 300. The power components 306 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 300.
The multimedia component 308 includes a screen between the device 300 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or sliding action, but also monitor the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 308 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 300 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 310 is configured to output and/or input audio signals. For example, the audio component 310 includes a Microphone (MIC) configured to receive external audio signals when the device 300 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 304 or transmitted via the communication component 316. In some embodiments, audio component 310 further comprises a speaker for outputting audio signals.
The I/O interface 312 provides an interface between the processing component 302 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 314 includes one or more sensors for providing status assessment of various aspects of the apparatus 300. For example, the sensor assembly 314 may detect the on/off state of the device 300, the relative positioning of the components, such as the display and keypad of the device 300, the sensor assembly 314 may also detect the change in position of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration/deceleration of the device 300, and the change in temperature of the device 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 316 is configured to facilitate communication between the apparatus 300 and other devices, either wired or wireless. The device 300 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 316 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 316 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 300 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 304, including instructions executable by processor 320 of apparatus 300 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (14)
1. A script generation method, the method comprising:
acquiring an operation on a virtual display page, wherein the virtual display page is created based on a remote real machine debugging application framework and is used for displaying a network application of a terminal responding to the operation, and the network application is used for triggering the terminal to perform network communication in response to the operation;
acquiring network data of the terminal triggered by the operation to perform network communication by using a network proxy tool;
debugging the acquired network data on the virtual display page;
compiling and generating a script based on a debugging result of debugging the network data;
transmitting the script to the terminal;
executing the script at the terminal to obtain a test result of the script;
wherein, compiling and generating a script based on the debugging result of the network data, including:
automatically generating the script through a code generator, and storing the generated script;
executing the script at the terminal to obtain a test result of the script, including:
and sending the generated script to one or more terminals to perform automatic running of the script at the terminal so as to obtain a test result of the script.
2. The script generation method of claim 1, wherein the remote real machine debugging application framework is an STF management platform.
3. The script generation method according to claim 1, wherein debugging the acquired network data on the virtual display page comprises:
displaying the network data in real time on the virtual display page;
and debugging the network data on the virtual display page through a visual programming tool.
4. A script generation method according to claim 3, wherein the visual programming tool is a Blockly framework.
5. The script generating method of any one of claims 1-4, wherein the network agent is an intermediate agent (mitxproxy).
6. The script generation method according to claim 5, wherein compiling and generating a script based on a debugging result of debugging the network data comprises:
compiling the debugging result of the debugging and the network data and generating a script.
7. A script generating apparatus, the apparatus comprising:
the system comprises an acquisition module, a network proxy tool and a network application, wherein the acquisition module is used for acquiring operation on a virtual display page and utilizing the network proxy tool to acquire network data of the operation triggering terminal for network communication, the virtual display page is created based on a remote real machine debugging application framework and used for displaying a network application of the terminal in response to the operation, and the network application is used for responding to the operation triggering terminal for network communication;
the debugging module is used for debugging the acquired network data on the virtual display page;
the generation module is used for compiling and generating a script based on a debugging result of debugging the network data;
the sending module is used for sending the script to the terminal;
the execution module is used for executing the script at the terminal to obtain a test result of the script;
the generation module compiles and generates a script based on a debugging result of the network data by adopting the following mode:
automatically generating the script through a code generator, and storing the generated script;
the execution module executes the script at the terminal in the following manner to obtain a test result of the script:
and sending the generated script to one or more terminals to perform automatic running of the script at the terminal so as to obtain a test result of the script.
8. The script generating apparatus of claim 7 wherein the remote real machine debugging application framework is an STF management platform.
9. The script generating apparatus of claim 7, wherein the debugging module debugs the acquired network data on the virtual display page by:
displaying the network data in real time on the virtual display page;
and debugging the network data on the virtual display page through a visual programming tool.
10. The script generating apparatus of claim 9 wherein the visual programming tool is a Blockly framework.
11. The script generating apparatus of any one of claims 8-10, wherein the network agent is an intermediate agent (mitmvroxy).
12. The script generating apparatus of claim 11 wherein the generating module compiles and generates the script based on a debugging result of debugging the network data in the following manner:
compiling the debugging result of the debugging and the network data and generating a script.
13. A script generating apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the script generation method of any one of claims 1 to 6 is performed.
14. A non-transitory computer readable storage medium, which when executed by a processor of a mobile terminal, causes the mobile terminal to perform the script generating method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010049429.5A CN111290944B (en) | 2020-01-16 | 2020-01-16 | Script generation method, script generation device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010049429.5A CN111290944B (en) | 2020-01-16 | 2020-01-16 | Script generation method, script generation device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111290944A CN111290944A (en) | 2020-06-16 |
CN111290944B true CN111290944B (en) | 2023-11-28 |
Family
ID=71025470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010049429.5A Active CN111290944B (en) | 2020-01-16 | 2020-01-16 | Script generation method, script generation device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111290944B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113419945B (en) * | 2021-05-30 | 2022-07-01 | 武汉卡比特信息有限公司 | Interconnection-based automatic testing method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9652364B1 (en) * | 2015-03-12 | 2017-05-16 | Amazon Technologies, Inc. | Cloud service for mobile testing and debugging |
CN108763086A (en) * | 2018-05-31 | 2018-11-06 | 康键信息技术(深圳)有限公司 | Script method for recording, terminal and computer readable storage medium based on remote real machine |
-
2020
- 2020-01-16 CN CN202010049429.5A patent/CN111290944B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9652364B1 (en) * | 2015-03-12 | 2017-05-16 | Amazon Technologies, Inc. | Cloud service for mobile testing and debugging |
CN108763086A (en) * | 2018-05-31 | 2018-11-06 | 康键信息技术(深圳)有限公司 | Script method for recording, terminal and computer readable storage medium based on remote real machine |
Also Published As
Publication number | Publication date |
---|---|
CN111290944A (en) | 2020-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110134600B (en) | Test script recording method, device and storage medium | |
CN111273899B (en) | Code processing method, device, electronic equipment and storage medium | |
CN111857928A (en) | Page task access method, device and system, electronic equipment and storage medium | |
CN110287106B (en) | Method and device for debugging shader code, electronic equipment and storage medium | |
CN110704030A (en) | Interface configuration information generation method and device, electronic equipment and storage medium | |
CN112256563A (en) | Android application stability testing method and device, electronic equipment and storage medium | |
CN111290944B (en) | Script generation method, script generation device and storage medium | |
CN110795354A (en) | Information processing method, device and storage medium | |
CN111338961B (en) | Application debugging method and device, electronic equipment and storage medium | |
CN114217803A (en) | Page function problem processing method and device and electronic equipment | |
CN111596980B (en) | Information processing method and device | |
CN113377664A (en) | Model testing method and device, electronic device and storage medium | |
CN110908904B (en) | Method and device for debugging fast application and electronic equipment | |
CN112416751A (en) | Processing method and device for interface automation test and storage medium | |
CN114860358B (en) | Object processing method and device, electronic equipment and storage medium | |
CN114896165A (en) | Testing method and device of conversation robot system, electronic equipment and storage medium | |
CN109947640B (en) | Regression test-based core function coverage statistical method and device | |
CN115543831A (en) | Test script generation method, device, equipment and storage medium | |
CN114780334A (en) | Power consumption monitoring method, power consumption monitoring device and storage medium | |
CN116931777A (en) | Drag-based prediction model generation method, data set prediction method and device | |
CN114546436A (en) | Micro front-end service updating method and device, electronic equipment and storage medium | |
CN111597106A (en) | Point burying management method and device | |
CN116450534B (en) | Method, device, equipment and medium for generating mobile terminal application program | |
CN113407879A (en) | Data reporting method, device and readable medium | |
CN111124553B (en) | Program execution method, device, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |