CN108255701B - Scene testing method and mobile terminal - Google Patents
Scene testing method and mobile terminal Download PDFInfo
- Publication number
- CN108255701B CN108255701B CN201710503083.XA CN201710503083A CN108255701B CN 108255701 B CN108255701 B CN 108255701B CN 201710503083 A CN201710503083 A CN 201710503083A CN 108255701 B CN108255701 B CN 108255701B
- Authority
- CN
- China
- Prior art keywords
- scene
- test
- client
- scenario
- request information
- 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
Images
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/3688—Test management for test execution, e.g. scheduling of test suites
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a mobile terminal, which comprises a memory, a processor and a scene test system which is stored on the memory and can run on the processor, wherein the scene test system realizes the following steps when being executed by the processor: receiving scene test request information sent by a client; analyzing the scene test request information, and determining the scene requested by the client; configuring agent information of a local file according to the scene; and executing the configured local file to enable the page to jump to the scene, and returning the test result of the scene to the client. The invention also provides a scene testing method. The mobile terminal and the scene testing method provided by the invention can skip unnecessary testing scenes in the scene testing process, can accurately and quickly acquire the testing scenes required by testers, and saves the testing time.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a scene testing method and a mobile terminal.
Background
With the rapid development of mobile APP (application), multi-scenario testing has become an indispensable link for applications. However, in the current scenario test flow, when a tester needs to perform a certain scenario test, the test needs to be performed according to all the flows until the test environment reaches a certain scenario that the tester wants to test. Therefore, the existing test flow is time-consuming, and the problems that the test period is long and the test result cannot be quickly and accurately obtained exist.
Disclosure of Invention
In view of this, the present invention provides a scenario testing method and a mobile terminal, which can enable a page to quickly reach a certain testing scenario desired to be tested by a tester, can quickly and accurately obtain a testing result, and has a short testing period.
First, in order to achieve the above object, the present invention provides a mobile terminal, where the mobile terminal includes a memory, a processor, and a scenario test system stored in the memory and capable of running on the processor, and when the scenario test system is executed by the processor, the following steps are implemented:
receiving scene test request information sent by a client;
analyzing the scene test request information sent by the client, and determining the scene requested by the client;
configuring agent information of a local file according to the scene; and
and executing the configured local file to enable a page to jump to the scene, and returning a test result of the scene to the client.
Optionally, after the step of receiving the scenario test request information sent by the client, the processor is further configured to execute the scenario test system to implement the following steps:
and sending interception request information, wherein the interception request information is used for preventing the scene test request information sent by the client from being sent to a remote server.
Optionally, the step of configuring the agent information of the local file according to the scenario specifically includes:
sending the parameter request information of the scene to the remote server;
receiving a client code replied by the remote server;
analyzing the parameters of the scene according to the client code; and
and configuring the agent information of the local file according to the parameters and generating the test script of the scene.
Optionally, the step of executing the configured local file to jump to the scene and return the test result of the scene to the client includes:
loading a test tool to run the test script;
analyzing a test result generated by the test script;
and generating a page of the scene according to the test result and feeding the page back to the client.
Optionally, after the step of executing the configured local file to jump a page to the scenario and returning a test result of the scenario to the client, the method further includes:
and analyzing the test result, generating a test report and storing the test report in the mobile terminal.
In addition, in order to achieve the above object, the present invention further provides a scenario testing method, which is applied to a mobile terminal, and the method includes:
receiving scene test request information sent by a client;
analyzing the scene test request information sent by the client, and determining the scene requested by the client;
configuring agent information of a local file according to the scene; and
and executing the configured local file to enable the page to jump to the scene, and returning the test result of the scene to the client.
Optionally, after the step of receiving the request information sent by the client, the method further includes:
and sending interception request information, wherein the interception request information is used for preventing the scene test request information sent by the client from being sent to a remote server.
Optionally, the step of configuring the agent information of the local file according to the scenario specifically includes:
sending parameter request information of the scene to the remote server;
receiving a client code replied by the remote server;
analyzing parameters of the scene according to the client code; and
and configuring the agent information of the local file according to the parameters and generating the test script of the scene.
Optionally, the step of executing the configured local file to jump a page to the scenario and return a test result of the scenario to the client includes:
loading a test tool to run the test script;
analyzing a test result generated by the test script;
and generating a page of the scene according to the test result and feeding the page back to the client.
Optionally, after the step of executing the configured local file to make a page jump to the scenario and return the test result of the scenario to the client, the method further includes:
and analyzing the test result, generating a test report and storing the test report in the mobile terminal.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing a scenario test system, which is executable by at least one processor to cause the at least one processor to execute the steps of the scenario test method as described above.
Compared with the prior art, the mobile terminal, the scene testing method and the computer readable storage medium provided by the invention firstly receive the scene testing request information sent by the client; then, analyzing the scene test request information sent by the client, and determining the scene requested by the client; then, configuring the agent information of the local file according to the scene; and finally, executing the configured local file to enable a page to jump to the scene, and returning a test result of the scene to the client. Therefore, the defect that in the prior art, when a tester needs to test a certain scene, the test needs to be carried out according to all the flows until the test environment reaches the certain scene which the tester wants to test can be avoided, and the page can be directly jumped to the test scene which the tester needs by configuring the agent information of the local file. The test result can be rapidly and accurately obtained, and the test period is shortened.
Drawings
FIG. 1 is a schematic diagram of an alternative application environment for various embodiments of the present invention;
FIG. 2 is a diagram of an alternative hardware architecture of the mobile terminal of FIG. 1;
FIG. 3 is a functional block diagram of the scenario test system according to the first, second and third embodiments of the present invention;
FIG. 4 is a functional block diagram of a scenario test system according to a fourth embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating an implementation of a scenario test system according to a fifth embodiment of the present invention;
FIG. 6 is a flowchart illustrating a first exemplary embodiment of a scenario test method according to the present invention;
FIG. 7 is a flowchart illustrating a second exemplary embodiment of a scenario test method according to the present invention;
FIG. 8 is a flowchart illustrating a third exemplary embodiment of a scenario test method according to the present invention;
FIG. 9 is a flowchart illustrating a fourth exemplary embodiment of a scenario testing method according to the present invention;
fig. 10 is a schematic flow chart illustrating an implementation of the scenario testing method according to the fifth embodiment of the present invention.
Reference numerals:
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an alternative application environment according to various embodiments of the present invention.
In the embodiment, the present invention can be applied to application environments including, but not limited to, a mobile terminal 1, a remote server 2, and a network 3. Among them, the mobile terminal 1 may be a mobile device such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, a car-mounted device, etc., and a fixed terminal such as a digital TV, a desktop computer, a notebook, a server, etc. The remote server 2 may be a rack server, a blade server, a tower server, or a rack server, and the remote server 2 may be an independent server or a server cluster formed by a plurality of servers. The network 3 may be a wireless or wired network such as an Intranet (Internet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or a communication network.
The remote server 2 is in communication connection with one or more mobile terminals 1 (only one is shown in the figure) through the network 3, and each mobile terminal 1 is installed and operated with an application client (hereinafter referred to as "mobile terminal client") corresponding to the remote server 2. The mobile terminal client is used for responding to the operation of a mobile terminal user and establishing long connection between the mobile terminal client and the far-end server 2, so that the mobile terminal client can perform data transmission and interaction with the far-end server 2 through the long connection. The remote server 2 is also used for managing web page components and responding to requests of a web browser.
In this embodiment, when the scenario test system 200 is installed and operated in the mobile terminal 1, and when the scenario test system 200 is operated, the mobile terminal 1 receives request information sent by a client; analyzing the request information sent by the client and determining the scene requested by the client; configuring agent information of a local file according to the scene; and finally, executing the configured local file to enable the page to jump to the scene, and returning the test result of the scene to the client.
Fig. 2 is a schematic diagram of an alternative hardware architecture of the mobile terminal 1 shown in fig. 1. In this embodiment, the mobile terminal 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which may be communicatively connected to each other through a system bus. It is noted that fig. 2 only shows the mobile terminal 1 with components 11-13, but it is to be understood that not all shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the mobile terminal 1, such as a hard disk or a memory of the mobile terminal 1. In other embodiments, the memory 11 may also be an external storage device of the mobile terminal 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like equipped on the mobile terminal 1. Of course, the memory 11 may also comprise both an internal memory unit and an external memory device of the mobile terminal 1. In this embodiment, the memory 11 is generally used for storing an operating system installed in the mobile terminal 1 and various types of application software, such as a program code of the scenario testing system 200. Furthermore, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally configured to control the overall operation of the mobile terminal 1, such as performing control and processing related to data interaction or communication with the remote server 2. In this embodiment, the processor 12 is configured to run the program code stored in the memory 11 or process data, for example, run the scenario test system 200.
The network interface 13 may comprise a wireless network interface or a wired network interface, and the network interface 13 is generally used for establishing a communication connection between the mobile terminal 1 and a remote server 2 or other electronic devices. In this embodiment, the network interface 13 is mainly configured to connect the mobile terminal 1 to one or more remote servers 2 through the network 3, and establish a data transmission channel and a communication connection between the mobile terminal 1 and the one or more remote servers 2.
The application environment and hardware structure and function of the related devices of the various embodiments of the present invention have been described in detail so far. Hereinafter, various embodiments of the present invention will be proposed based on the above-described application environment and related devices.
First, the present invention provides a scenario test system 200.
Fig. 3 is a functional block diagram of a scenario test system 200 according to a first embodiment of the present invention. In this embodiment, the scenario test system 200 may be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to complete the present invention. For example, in fig. 3, the scenario test system 200 may be divided into a receiving module 201, a scenario determination module 202, a configuration module 203, and an execution module 204. The functional module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the scenario test system 200 in the mobile terminal 1. The functions of the functional modules 201 and 204 will be described in detail below.
The receiving module 201 is configured to receive scenario test request information sent by a client.
Generally, the client refers to an application program of the mobile terminal 1, and the user sends the request information of the scenario test to the mobile terminal 1 through the client.
The scene determining module 202 is configured to analyze the scene test request information sent by the client, and determine the scene requested by the client.
The configuration module 203 configures the agent information of the local file according to the scene.
Further, after the scene determining module 202 determines the scene requested by the client, the configuring module 203 configures the agent information of the local file according to the scene. The specific steps of the configuration module 203 configuring the agent information of the local file according to the scenario will be described in detail below.
The execution module 204 is configured to execute the configured local file to enable a page to jump to the scenario, and return a test result of the scenario to the client.
As can be seen from the above, when the client sends the request information of the scenario test, the receiving module 201 of the mobile terminal 1 receives the request information sent by the client. The scene determining module 202 parses the request information, and determines a scene requested by the client. The configuration module 203 configures the agent information of the local file according to the scene, and after the configuration of the agent information of the scene is completed, the execution module 204 executes the configured local file to enable the page to jump to the scene, and returns the test result of the scene to the client.
Through the functional module 201 and 204, the scenario test system 200 provided by the present invention firstly receives scenario test request information sent by a client, secondly analyzes the scenario test request information, determines a scenario requested by the client, secondly configures proxy information of a local file according to the scenario, and finally executes the configured local file to make a page jump to the scenario and return a test result of the scenario to the client, so that the mobile terminal 1 can directly return the test result of the scenario by configuring the proxy information of the local file of the scenario after determining the scenario that a user needs to test, thereby saving time required for scenario test and shortening test period.
Further, based on the above-mentioned first embodiment of the scenario test system 200 of the present invention, a second embodiment of the present invention is proposed (as shown in fig. 3). In this embodiment, the configuration module 203 is further configured to:
sending parameter request information of the scene to the remote server; receiving a client code replied by the remote server; analyzing parameters of the scene according to the client code; and configuring the agent information of the local file according to the parameters and generating the test script of the scene.
In an embodiment, a test scene of "rushing to red envelope" is taken as an example for explanation, and the whole test scene of "rushing to red envelope" includes a "red envelope" scene, a "rushing to red envelope" scene, a "red envelope rushing to light" scene, a "red envelope" scene, a "network open size is poor" scene, a "red envelope exceeding upper limit" scene, a "no-start-up, a" you have not logged in "scene, a" no-start-up ", and a" red envelope "scene that you have rushed to. When the mobile terminal 1 receives a scene that the request information sent by the client is "snatch red envelope", a scene page of "snatch red envelope" needs to be popped up in a normal flow. For example, the user inputs the amount of "10" dollars and the number of red packages "5", and sends the "red package" link to the friend, and the friend displays the test scene of "snatching the red package" when clicking the link. Obviously, the test flow cycle of the whole 'red packet robbing' scene is very long.
In this embodiment, when receiving a scene request message of "rushing to red envelope", the mobile terminal 1 sends a parameter request message of the "rushing to red envelope" scene to the remote server 2, the remote server 2 maps a parameter configuration message of "rushing to red envelope" to a local file of the mobile terminal 1 in a manner of replying a client code, and the mobile terminal 1 analyzes a parameter of the scene according to the client code; and configuring the agent information of the local file according to the parameters and generating a test script of the scene of 'robbing red envelope'. For example, a red packet field "flag ═ 1" for which money is stuffed into a red packet (in addition, the field "flag ═ 0" for a scene "please input the amount of the red packet", money is stuffed beyond the upper limit, and the field "flag ═ 2" for a scene "red packet beyond the upper limit").
In a preferred embodiment, in order to make the testing environment more secure, the client code sent to the mobile terminal 1 by the remote server 2 is encrypted, and the mobile terminal 1 decrypts the client code and parses the parameters of the scene.
Through the functional module 203, the scenario test system 200 of the present invention may send the parameter request information of the scenario to the remote server; receiving a client code replied by the remote server; analyzing parameters of the scene according to the client code; and configuring the agent information of the local file according to the parameters to directly generate the test script of the scene, thereby saving the time required by the scene test, shortening the test period and realizing the full coverage of the scene test in a short time.
Further, based on the above-mentioned first embodiment of the scenario test system 200 of the present invention, a third embodiment of the present invention is proposed (as shown in fig. 3). In this embodiment, the execution module 204 is further configured to
Loading a test tool to run the test script; analyzing a test result generated by the test script; and generating a page of the scene according to the test result and feeding the page back to the client
Through the embodiment, the mobile terminal 1 obtains the scene configuration parameters, configures the proxy information of the local file of the mobile terminal 1, and loads the test tool after generating the test script of the scene to complete the test of the scene.
Further, based on the above-described first to third embodiments of the scenario test system 200 of the present invention, a fourth embodiment of the present invention is proposed (as shown in fig. 4). In this embodiment, the scenario testing system 200 further includes an intercepting module 205, where:
the intercepting module 205 is configured to send intercepting request information to the client after the receiving module 201 receives the scenario test request information sent by the client, where the intercepting request information is used to prevent the request information sent by the client from being sent to the remote server 2.
In this embodiment, after determining a scene in which a client requests a test, the mobile terminal 1 acquires parameter information of the scene from the remote server 2; and configuring the agent information of the local file of the mobile terminal 1 according to the parameters and generating the test script of the scene. So as to test the scene quickly and accurately. Therefore, in order to avoid the test of other scenarios performed before the scenario test in the prior art, the intercepting module 205 of the mobile terminal 1 sends the intercepting request information to the client after the receiving module 201 receives the scenario test request information sent by the client, where the intercepting request information is used to prevent the request information from being sent to the remote server 2.
Through the functional module 205, the scenario test system 200 provided by the invention can avoid the test of other scenarios performed before the test of a certain scenario when the test of the certain scenario is performed, shorten the test period, and perform the test of the certain scenario quickly and accurately.
Further, a fifth embodiment of the present invention (as shown in fig. 5) is proposed based on the above-mentioned first to third embodiments of the scenario test system 200 of the present invention. In this embodiment, the scenario testing system 200 further includes a report generating module 206, where:
the report generating module 206 is configured to, after the executing module 204 executes the configured local file to make a page jump to the scenario and returns a test result of the scenario to the client, parse the test result, generate a test report (for example, a log record) and store the test report in the mobile terminal 1, where the test report includes test time and agent information of the scenario.
Through the functional module 206, the scenario test system 200 provided by the present invention can also analyze the test result of a certain scenario after the test of the certain scenario is completed, generate a test report, and store the test report in the mobile terminal 1. For analysis by a tester.
In addition, the invention also provides a scene testing method.
Fig. 6 is a schematic flow chart showing the first embodiment of the scenario testing method of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 6 may be changed and some steps may be omitted according to different requirements.
Step S601, receiving the scene test request information sent by the client.
Generally, the client refers to an application program of the mobile terminal 1, and the user sends request information of the scenario test to the mobile terminal 1 through the client.
Step S602, parsing the scene test request information sent by the client, and determining the scene requested by the client.
Step S603, configuring the agent information of the local file according to the scene.
Further, after determining the scene requested by the client, the mobile terminal 1 configures the agent information of the local file according to the scene. The specific steps of configuring the agent information of the local file according to the scenario will be described in detail in a second embodiment (see fig. 7) of the scenario test method of the present invention.
Step S604, executing the configured local file to make the page jump to the scene, and returning the test result of the scene to the client.
When the client sends the request information of the scene test, the mobile terminal 1 analyzes the request information after receiving the request information sent by the client, and determines the scene requested by the client. And configuring the agent information of the local file according to the scene, and after the configuration of the agent information of the scene is completed, executing the configured local file by the mobile terminal 1 to enable the page to jump to the scene, and returning the test result of the scene to the client.
Through the steps S601 to S604, the scenario test method provided by the present invention first receives scenario test request information sent by a client, then parses the request information sent by the client, determines a scenario requested by the client, then configures proxy information of a local file according to the scenario, and finally executes the configured local file to make a page jump to the scenario, and returns a test result of the scenario to the client, so that the mobile terminal 1 can directly return the test result of the scenario by configuring the proxy information of the local file of the scenario after determining the scenario that a user needs to test, thereby saving time required for a scenario test and shortening a test period.
Fig. 7 is a schematic implementation flow diagram of the scenario testing method according to the second embodiment of the present invention. In this embodiment, the step of configuring the agent information of the local file according to the scenario includes:
step S701, sending the parameter request information of the scene to the remote server 2;
step S702, receiving the client code replied by the remote server 2;
step S703, analyzing the parameters of the scene according to the client code;
step S704, configuring the agent information of the local file according to the parameter, and generating a test script of the scene.
In an embodiment, a test scene of "snatching a red envelope" is taken as an example for explanation, the whole test scene of "snatching a red envelope" includes a "red envelope" scene, a "snatching a red envelope" scene, a "red envelope is snatched" scene, a "snatching to a red envelope" scene, a "network open little is bad" scene, a "red envelope exceeds an upper limit" scene, a "no-start-up scene, a" red envelope already snatched "and other test scenes. When the mobile terminal 1 receives a scene that the request information sent by the client is "snatch red envelope", a scene page of "snatch red envelope" needs to be popped up in a normal flow. For example, the user inputs the amount of "10" yuan and the number of red packages "5", sends a "red package" link to a friend, and displays a test scene of "snatching red packages" when the friend clicks the link. Obviously, the test flow period of the whole 'red packet grabbing' scene is long.
In this embodiment, when receiving a scene request message of "rushing to red envelope", the mobile terminal 1 sends a parameter request message of the "rushing to red envelope" scene to the remote server 2, the remote server 2 maps a parameter configuration message of "rushing to red envelope" to a local file of the mobile terminal 1 in a manner of replying a client code, and the mobile terminal 1 analyzes a parameter of the scene according to the client code; and configuring agent information of a local file according to the parameters and generating a test script of the scene of 'red packet robbery'. For example, a red packet field "flag ═ 1" for which money is stuffed into a red packet (in addition, the field "flag ═ 0" for a scene "please input the amount of the red packet", money is stuffed beyond the upper limit, and the field "flag ═ 2" for a scene "red packet beyond the upper limit").
In a preferred embodiment, in order to make the testing environment more secure, the client code sent to the mobile terminal 1 by the remote server 2 is encrypted, and the mobile terminal 1 decrypts the client code and parses the parameters of the scene.
Through the steps S701 to S704, the scenario testing method provided by the present invention sends the parameter request information of the scenario to the remote server 2; receiving the client code replied by the remote server 2; analyzing parameters of the scene according to the client code; and configuring the agent information of the local file according to the parameters to directly generate the test script of the scene, so that the time required by the scene test is saved, the test period is shortened, and the full coverage of the scene test in a short time is realized.
Fig. 8 is a schematic flow chart illustrating an implementation of the third embodiment of the scenario testing method according to the present invention. In this embodiment, the step of executing the configured local file to make a page jump to the scenario and return a test result of the scenario to the client specifically includes:
step S801, loading a test tool to run the test script;
step S802, analyzing the test result generated by the test script;
and step S803, generating a page of the scene according to the test result and feeding back the page to the client.
Through the steps S801 to S803, the scenario testing method provided by the present invention completes the testing of the scenario by loading the testing tool after the mobile terminal 1 obtains the configuration parameters of the scenario, configures the proxy information of the local file, and generates the testing script of the scenario.
Further, a fourth embodiment of the scenario testing method of the present invention is proposed based on the above first to third embodiments of the scenario testing method of the present invention.
Fig. 9 is a schematic diagram illustrating an implementation flow of the scenario testing method according to the fourth embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 9 may be changed and some steps may be omitted according to different requirements.
Step S901, receiving scene test request information sent by a client;
step S902, sending an interception request message to the client, where the interception request message is used to prevent the request message sent by the client from being sent to the remote server 2.
Step S903, analyzing the scene test request information and determining the scene requested by the client;
and step S904, configuring the agent information of the local file according to the scene.
Step S905, the configured local file is executed to enable a page to jump to the scene, and the test result of the scene is returned to the client.
Through the steps of 901 to S905, the scenario test method provided by the present invention can avoid the test of other scenarios performed before the test of a certain scenario when the test of the certain scenario is performed, shorten the test period, and can perform the test of the certain scenario quickly and accurately.
Further, a fifth embodiment of the scenario test method of the present invention is proposed based on the above first to third embodiments of the scenario test method of the present invention.
Fig. 10 is a schematic diagram illustrating an implementation flow of the scenario testing method according to the fifth embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 10 may be changed and some steps may be omitted according to different requirements.
Step S1001, receiving scene test request information sent by a client;
step S1002, analyzing the scene test request information sent by the client, and determining the scene requested by the client;
and step S1003, configuring the agent information of the local file according to the scene.
Step S1004, executing the configured local file to make the page jump to the scene, and returning the test result of the scene to the client.
Step S1005, analyzing the test result, generating a test report, and storing the test report in the mobile terminal 1.
In the above embodiments, the test report (e.g., log record) includes the test time and the agent information of the scenario.
Through the steps S1001 to S1005, the scenario test method provided by the present invention can also analyze the test result of a certain scenario after the test of the certain scenario is completed, generate a test report, and store the test report in the mobile terminal 1. For analysis by a tester.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (8)
1. A scene testing method is applied to a mobile terminal, and is characterized by comprising the following steps:
receiving scene test request information sent by a client;
analyzing the scene test request information sent by the client, and determining the scene requested by the client;
configuring the agent information of the local file according to the scene, which comprises the following steps: sending parameter request information of the scene to a remote server, receiving a client code replied by the remote server, analyzing parameters of the scene according to the client code, configuring agent information of the local file according to the parameters and generating a test script of the scene; and
and executing the configured local file to enable the page to jump to the scene, and returning the test result of the scene to the client.
2. The scenario test method of claim 1, wherein after the step of receiving the scenario test request information sent by the client, the method further comprises:
and sending interception request information, wherein the interception request information is used for preventing the scene test request information sent by the client from being sent to a remote server.
3. The scenario testing method of claim 1, wherein the step of executing the configured local file to make a page jump to the scenario and return the test result of the scenario to the client specifically comprises:
loading a test tool to run the test script;
analyzing a test result generated by the test script;
and generating a page of the scene according to the test result and feeding the page back to the client.
4. The scenario testing method of claim 1, wherein after the steps of executing the configured local file to jump pages to the scenario, and returning a test result of the scenario to the client, the method further comprises:
and analyzing the test result, generating a test report and storing the test report in the mobile terminal.
5. A mobile terminal comprising a memory, a processor, and a scenario test system stored on the memory and operable on the processor, the scenario test system implementing the following steps when executed by the processor:
receiving scene test request information sent by a client;
analyzing the scene test request information sent by the client, and determining the scene requested by the client;
configuring the agent information of the local file according to the scene, which comprises the following steps: sending parameter request information of the scene to a remote server, receiving a client code replied by the remote server, analyzing parameters of the scene according to the client code, configuring agent information of the local file according to the parameters and generating a test script of the scene; and
and executing the configured local file to enable a page to jump to the scene, and returning a test result of the scene to the client.
6. The mobile terminal of claim 5, wherein after the step of receiving the scenario test request information sent by the client, the processor is further configured to execute the scenario test program to implement the following steps:
and sending interception request information, wherein the interception request information is used for preventing the scene test request information sent by the client from being sent to a remote server.
7. The mobile terminal according to claim 5, wherein the step of executing the configured local file to make a page jump to the scenario and return a test result of the scenario to the client includes:
loading a test tool to run the test script;
analyzing a test result generated by the test script;
and generating a page of the scene according to the test result and feeding the page back to the client.
8. A computer-readable storage medium storing a scenario testing system, executable by at least one processor to cause the at least one processor to perform the steps of the scenario testing method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710503083.XA CN108255701B (en) | 2017-06-27 | 2017-06-27 | Scene testing method and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710503083.XA CN108255701B (en) | 2017-06-27 | 2017-06-27 | Scene testing method and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108255701A CN108255701A (en) | 2018-07-06 |
CN108255701B true CN108255701B (en) | 2022-07-22 |
Family
ID=62722237
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710503083.XA Active CN108255701B (en) | 2017-06-27 | 2017-06-27 | Scene testing method and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108255701B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112241359B (en) * | 2019-07-18 | 2024-04-23 | 腾讯科技(深圳)有限公司 | Equipment testing method and equipment |
CN112685282A (en) * | 2019-10-17 | 2021-04-20 | 拉扎斯网络科技(上海)有限公司 | Test method, test device, electronic equipment and computer readable storage medium |
CN110908763A (en) * | 2019-11-27 | 2020-03-24 | 上海米哈游网络科技股份有限公司 | Acceptance method, device, equipment and storage medium |
CN111693090A (en) * | 2020-06-10 | 2020-09-22 | 上海有个机器人有限公司 | Robot pavement environment aging test method, medium, terminal and device |
CN112148623B (en) * | 2020-10-19 | 2024-06-14 | 青岛鹏海软件有限公司 | LIMS-based intelligent complete scene test method |
CN113572669B (en) * | 2021-06-29 | 2023-06-20 | 青岛海尔科技有限公司 | Scene processing method and device, intelligent gateway and processor |
CN113468068B (en) * | 2021-07-21 | 2023-08-25 | 腾讯科技(深圳)有限公司 | Virtual resource testing method and device, storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9323643B1 (en) * | 2015-07-13 | 2016-04-26 | GameRefinery Oy | Method and system for analyzing mobile apps |
CN106487998A (en) * | 2015-09-01 | 2017-03-08 | 阿里巴巴集团控股有限公司 | A kind of method at call-out function interface, device and terminal unit |
CN106528432A (en) * | 2016-12-12 | 2017-03-22 | 北京三快在线科技有限公司 | Construction method and apparatus for test scene data, and buried point test method |
CN106802859A (en) * | 2015-11-25 | 2017-06-06 | 北京京东尚科信息技术有限公司 | A kind of method and device of client software test |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8996921B2 (en) * | 2012-11-08 | 2015-03-31 | International Business Machines Corporation | Indicating coverage of Web application testing |
-
2017
- 2017-06-27 CN CN201710503083.XA patent/CN108255701B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9323643B1 (en) * | 2015-07-13 | 2016-04-26 | GameRefinery Oy | Method and system for analyzing mobile apps |
CN106487998A (en) * | 2015-09-01 | 2017-03-08 | 阿里巴巴集团控股有限公司 | A kind of method at call-out function interface, device and terminal unit |
CN106802859A (en) * | 2015-11-25 | 2017-06-06 | 北京京东尚科信息技术有限公司 | A kind of method and device of client software test |
CN106528432A (en) * | 2016-12-12 | 2017-03-22 | 北京三快在线科技有限公司 | Construction method and apparatus for test scene data, and buried point test method |
Non-Patent Citations (2)
Title |
---|
业务流程测试;Abby、;《博客园》;20170324;2-4 * |
移动应用测试的发展现状分析;侯海波,黄云霞,马霁阳;《电信网技术》;20170331(第2017,03)期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN108255701A (en) | 2018-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108255701B (en) | Scene testing method and mobile terminal | |
CN107133180B (en) | Dynamic page testing method, testing device and storage medium | |
CN112148674B (en) | Log data processing method, device, computer equipment and storage medium | |
CN110647471B (en) | Interface test case generation method, electronic device and storage medium | |
CN112565443A (en) | Internet of things data analysis method, device, equipment and storage medium | |
CN111597110B (en) | Page test method and device, electronic equipment and storage medium | |
CN113127361B (en) | Application development method and device, electronic equipment and storage medium | |
CN109218393B (en) | Push implementation method, device, equipment and computer storage medium | |
CN112395187A (en) | Test method, test system, computer device and storage medium | |
CN112422450B (en) | Computer equipment, and flow control method and device for service request | |
CN111352851A (en) | Program testing method and device, computer equipment and storage medium | |
CN113656107A (en) | Mobile application loading method and device and electronic equipment | |
CN111431767A (en) | Multi-browser resource synchronization method and device, computer equipment and storage medium | |
CN112965916B (en) | Page testing method, page testing device, electronic equipment and readable storage medium | |
CN112818270B (en) | Data cross-domain transfer method and device and computer equipment | |
CN113190437B (en) | Time sequence analysis method and device for wireless module, computer equipment and storage medium | |
CN113535578B (en) | CTS test method, CTS test device and CTS test equipment | |
CN107247661B (en) | Method and system for supporting automatic verification of installation package of application | |
CN112379967B (en) | Simulator detection method, device, equipment and medium | |
CN112084114B (en) | Method and apparatus for testing interfaces | |
CN113377376A (en) | Data packet generation method, data packet generation device, electronic device, and storage medium | |
CN113535580A (en) | CTS (clear to send) testing method, device and testing equipment | |
CN108243180B (en) | Bank policy data docking method and policy data server | |
CN112579428A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN110851254A (en) | Equipment production method, device, server and storage medium based on microservice |
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 |