CN107305528B - Application testing method and device - Google Patents

Application testing method and device Download PDF

Info

Publication number
CN107305528B
CN107305528B CN201610262572.6A CN201610262572A CN107305528B CN 107305528 B CN107305528 B CN 107305528B CN 201610262572 A CN201610262572 A CN 201610262572A CN 107305528 B CN107305528 B CN 107305528B
Authority
CN
China
Prior art keywords
tested
application
environment
data
accessed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610262572.6A
Other languages
Chinese (zh)
Other versions
CN107305528A (en
Inventor
李东耕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610262572.6A priority Critical patent/CN107305528B/en
Publication of CN107305528A publication Critical patent/CN107305528A/en
Application granted granted Critical
Publication of CN107305528B publication Critical patent/CN107305528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application discloses an application testing method and device. One embodiment of the method comprises: responding to a test starting command to construct a first webpage file, wherein the test starting command comprises an environment identifier to be accessed and a data identifier to be tested, and the first webpage file comprises an application address of the application to be tested; storing an environment address to be accessed and/or data to be tested into a memory indicated by a path of the data to be used by the application to be tested, and closing the application to be tested, wherein the environment address to be accessed is an address of an environment to be accessed indicated by an environment identifier to be accessed, and the data to be tested is test data indicated by the data identifier to be tested; and calling other applications to read the first webpage file so that the other applications start the application to be tested according to the application address, and the application to be tested runs the data to be tested in the environment to be accessed to complete the test of the application to be tested. This embodiment enables efficient testing applications.

Description

Application testing method and device
Technical Field
The application relates to the technical field of computers, in particular to the technical field of internet, and particularly relates to an application testing method and device.
Background
The application needs to be tested in a plurality of different environments before formal release, for example, a test environment established in a terminal simulation service-side environment or a pre-release environment established in a service-side simulation operating environment after formal release. Generally, in the existing application testing method, a tester configures a testing environment and testing data, then the tester manually closes an application to be tested, and then the tester manually opens the application to be tested, so that the application to be tested runs the data to be tested in the testing environment to complete an application test.
However, the existing application test method requires a large amount of manual work, so that the test efficiency is low.
Disclosure of Invention
The present application is directed to an improved application testing method and apparatus to solve the above technical problems.
In a first aspect, the present application provides an application testing method, the method comprising: responding to a test starting command to construct a first webpage file, wherein the test starting command comprises an environment identifier to be accessed and a data identifier to be tested, and the first webpage file comprises an application address of the application to be tested; storing an environment address to be accessed and/or data to be tested into a memory indicated by a path of the data to be tested and used by the application to be tested, and closing the application to be tested, wherein the environment address to be accessed is an address of an environment to be accessed indicated by an environment identifier to be accessed, and the data to be tested is test data indicated by the data identifier to be tested; and calling other applications to read the first webpage file so that the other applications start the application to be tested according to the application address, so that the application to be tested runs the data to be tested in the environment to be accessed to complete the test of the application to be tested.
In some embodiments, the other applications include a browser application; and calling other applications to read the first webpage file, wherein the calling other applications comprise: publishing a first webpage in the first webpage file; constructing a second webpage file, wherein a second webpage in the second webpage file comprises an address of the first webpage; publishing a second webpage in the second webpage file; and calling the browser application to open the second webpage, wherein the second webpage is used for positioning the webpage opened by the browser application to the first webpage in a redirection address mode.
In some embodiments, the environment to be accessed comprises at least one of: test environment, pre-launch environment, and online environment.
In some embodiments, the storing the to-be-accessed environment address and/or the to-be-tested data in the memory indicated by the path of the to-be-tested application access data includes: comparing the address of the environment to be accessed in the first webpage file with the address of the environment last accessed by the application to be tested; and in response to that the address of the environment to be accessed is different from the address of the environment last accessed by the application to be tested, storing the address of the environment to be accessed into a memory indicated by a path of the data taken by the application to be tested.
In some embodiments, the storing the to-be-accessed environment address and/or the to-be-tested data in the memory indicated by the path of the to-be-tested application access data includes: comparing the identifier of the data to be tested with the identifier of the last test data of the application to be tested; and in response to the fact that the to-be-tested data identification is different from the identification of the last test data of the to-be-tested application, storing the to-be-tested data into a memory indicated by a path of the to-be-tested application data.
In a second aspect, the present application provides an application testing apparatus, the apparatus comprising: the building module is configured to build a first webpage file in response to a test starting command, wherein the test starting command comprises an environment identifier to be accessed and a data identifier to be tested, and the first webpage file comprises an application address of the application to be tested; the storage module is configured to store an address of an environment to be accessed and/or data to be tested into a memory indicated by a path of the data to be accessed by the application to be tested, and close the application to be tested, wherein the address of the environment to be accessed is an address of the environment to be accessed indicated by an identifier of the environment to be accessed, and the data to be tested is test data indicated by the identifier of the data to be tested; and the calling module is configured to call other applications to read the first webpage file so that the other applications start the application to be tested according to the application address, and the application to be tested runs the data to be tested in the environment to be accessed to complete the test of the application to be tested.
In some embodiments, the other applications include a browser application; and, the calling module is further configured to: publishing a first webpage in the first webpage file; constructing a second webpage file, wherein a second webpage in the second webpage file comprises an address of the first webpage; publishing a second webpage in the second webpage file; and calling the browser application to open the second webpage, wherein the second webpage is used for positioning the webpage opened by the browser application to the first webpage in a redirection address mode.
In some embodiments, the environment to be accessed comprises at least one of: test environment, pre-launch environment, and online environment.
In some embodiments, the logging module is further configured to: comparing the address of the environment to be accessed in the first webpage file with the address of the environment last accessed by the application to be tested; and in response to that the address of the environment to be accessed is different from the address of the environment last accessed by the application to be tested, storing the address of the environment to be accessed into a memory indicated by a path of the data taken by the application to be tested.
In some embodiments, the logging module is further configured to: comparing the identifier of the data to be tested with the identifier of the last test data of the application to be tested; and in response to the fact that the to-be-tested data identification is different from the identification of the last test data of the to-be-tested application, storing the to-be-tested data into a memory indicated by a path of the to-be-tested application data.
According to the application testing method and device, the first webpage file is constructed in response to the testing starting command, the to-be-accessed environment address and/or to-be-tested data are stored in the memory indicated by the path of the to-be-tested application data, the to-be-tested application is closed, other applications are called to start the to-be-tested application, the to-be-tested application reads the to-be-accessed environment address and the to-be-tested data in the starting process, the to-be-tested application runs the to-be-tested data in the to-be-accessed environment to complete testing of the to-be-tested application, and efficient.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an application testing method according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of an application testing method according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of an application testing apparatus according to the present application;
fig. 5 is a schematic structural diagram of a computer system suitable for implementing the terminal device or the server according to the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the application testing method or application testing apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and servers 105, 106, 107. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the servers 105, 106, 107. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the servers 105, 106, 107 via the network 104 to receive or transmit data or the like. Various terminal applications, such as a web browser application, a shopping-like application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may provide various electronic devices supporting applications, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio layer iii, mpeg compression standard Audio layer 3), MP4 players (Moving Picture Experts Group Audio layer IV, mpeg compression standard Audio layer 4), laptop portable computers, desktop computers, and the like.
The servers 105, 106, 107 may be servers that provide various services, such as servers that provide support for applications on the terminal devices 101, 102, 103. The server can analyze and process the received data and feed back the processing result to the terminal equipment.
It should be noted that the application testing method provided in the embodiments of the present application is generally applied to terminal applications and executed by the terminal devices 101, 102, and 103, and accordingly, the application testing apparatus is generally disposed in the terminal devices.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of an application testing method according to the present application is shown. The application test method comprises the following steps:
step 201, responding to a test opening command to construct a first webpage file.
In this embodiment, the electronic device (for example, the terminal device shown in fig. 1) on which the application test method operates may first obtain a test start command through the terminal device with which the user performs the application test, and then construct the first web page file based on the test start command.
In this embodiment, the test start command includes an identifier of an environment to be accessed and an identifier of data to be tested. In some optional implementations of the embodiment, the environment to be accessed includes at least one of: test environment, pre-launch environment, and online environment. The test environment is as follows: the environment is set on the terminal equipment and is established by the on-line environment of the analog part for testing the application; the pre-foaming environment is as follows: simulating an environment established by an online environment and used for testing application of a database synchronization online database; the above online environment means: the environment in which the application is running after it is actually released. Here, the data to be tested refers to data that runs in an environment to be accessed and is used for testing the application to be tested. By way of example, using version 2.0 of nail to pass testing in a testing environment, the next step may require testing in a pre-development environment.
It should be noted that the classification of the environment included in the environment to be accessed is set according to the actual test requirements of the developer in the application development test process. As an example, some applications only set a pre-launch environment and an online environment in the development and test process; some applications may have more than one test environment set during development and testing, for example, multiple test environments are set according to different test items of which the test environments are biased, and if the test environments are represented by a first test environment and a second test environment, the to-be-tested environments of the application may include: a first test environment, a second test environment, a pre-launch environment, and an online environment.
In this embodiment, the first webpage file includes an application address of the application to be tested. Here, the first web page file may be constructed using a hypertext markup Language (HTML). Here, the application address of the application to be tested is an address uniquely identifying the test application, for example, a Uniform Resource locator system (URLscheme) of an application based on an Android operating system (Android) or an apple operating system (iOS), and a unique application address is bound to the application to be tested.
In some optional implementation manners of this embodiment, before the first webpage file is constructed in response to the test start command, a test configuration service may be set up, and the test configuration service stores the to-be-accessed environment address and the to-be-tested data in advance. Usually, the user selects the to-be-accessed environment identifier corresponding to the to-be-accessed environment address and the test data identifier corresponding to the to-be-tested data in the test, so that the selection of the to-be-accessed environment and the to-be-tested data can be quickly completed.
Step 202, storing the to-be-accessed environment address and/or the to-be-tested data into a memory indicated by a path of the to-be-tested application access data, and closing the to-be-tested application.
In this embodiment, the electronic device may first obtain the environment to be accessed and/or the data to be tested based on the test start command in step 201, then store the environment to be accessed and/or the data to be tested in the memory indicated by the path of the data taken by the application to be tested, and close the application to be tested. Here, the to-be-accessed environment address is an address of an to-be-accessed environment indicated by the to-be-accessed environment identifier; as an example, the address of the environment to be accessed may be www.testgouwu.com.
In this embodiment, only the environment to be accessed may be stored in the memory indicated by the path of the data taken by the application to be tested, in which case the test only changes the environment to be accessed, and the data to be tested remains the same as the previous test; only the data to be tested can be stored in the memory indicated by the path of the data taken by the application to be tested, in this case, the test only changes the data to be accessed, and the environment to be tested is kept the same as that of the last test; the environment to be accessed and the data to be tested can be stored in the memory indicated by the path of the data taken by the application to be tested, and in this case, the environment to be accessed and the data to be tested in the test are different from those in the previous time.
In some optional implementations of this embodiment, the address of the environment to be accessed in the first webpage file may be compared with the address of the environment last accessed by the application to be tested; and in response to that the address of the environment to be accessed is different from the address of the environment last accessed by the application to be tested, storing the address of the environment to be accessed into a memory indicated by a path of the data taken by the application to be tested.
In some optional implementations of this embodiment, the identifier of the data to be tested may be compared with the identifier of the test data of the last time to be tested; and in response to the fact that the to-be-tested data identification is different from the identification of the last test data of the to-be-tested application, storing the to-be-tested data into a memory indicated by a path of the to-be-tested application data.
Step 203, calling other applications to read the first webpage file.
In this embodiment, the electronic device may call other applications except the application to be tested to read the first webpage file obtained in step 201, so that the other applications start the application to be tested according to the application address in the first webpage file, and the application to be tested runs the data to be tested in the environment to be accessed to complete the test on the application to be tested. Here, the environment to be accessed is the environment to be accessed indicated by the environment identifier to be accessed in the test start command obtained in step 201, and the data to be tested is the data to be tested indicated by the data identifier to be tested in the test start command obtained in step 201.
In this embodiment, the other application may be a browser application or an application having a function of parsing the first web page file. Here, the other application may be installed in the electronic device, or may be installed in another electronic device other than the electronic device.
In some optional implementation manners of this embodiment, in a case that the to-be-accessed environment address is different from an address of an environment last accessed by the to-be-tested application, the to-be-accessed environment address is an environment address in the memory indicated by the path for storing the to-be-tested application access data in step 202; and under the condition that the address of the environment to be accessed is the same as the address of the environment last accessed by the application to be tested, the environment to be accessed is obtained by reading the address of the environment last accessed. That is, whether the to-be-accessed environment address is stored in the memory again in step 202 or not, the environment accessed by the to-be-tested application in step 203 is the to-be-accessed environment indicated by the to-be-accessed environment identifier in the test start command in step 201.
In some optional implementation manners of this embodiment, in a case that the data to be tested is different from the last test data of the application to be tested, the data to be tested is data stored in the memory indicated by the path of the data taken by the application to be tested based on step 202; and under the condition that the data to be tested is the same as the last test data of the application to be tested, the data to be tested is obtained by reading the last test data. That is, whether the data to be tested is stored in the memory again in step 202 or not, the test data read by the application to be tested in step 203 is the data to be tested indicated by the data to be tested identifier in the test start command in step 201.
As an example, an application scenario of the application test method according to the present embodiment is given below: the user firstly issues a test start command, and the test start command includes an identifier of an environment to be accessed and an identifier of Data to be tested, and the identifier of the environment to be accessed is, as an example, a pre-issued environment identifier of a certain e-commerce site (for example, "a website pre-issued environment"), and the identifier of the Data to be tested is an identifier of Data (also called a use case) which is tested whether payment can be made at the e-commerce site (for example, "Data _ zhifu"). Thereafter, the terminal device may acquire a to-be-tested environment address (e.g., "www.testgouwu.com") indicated by the to-be-tested environment identifier and Data to be tested (e.g., test Data corresponding to "Data _ zhifu" stored in the terminal device in advance) indicated by the to-be-tested Data identifier. Meanwhile, in response to the test start command, the terminal device may construct a first web file including an application address (e.g., "URL _ myapp") of the application to be tested. Then, the terminal device may store the acquired address to be tested (e.g., "www.testgouwu.com") and/or Data to be tested (e.g., the test Data corresponding to "Data _ zhifu" described above) in the memory indicated by the path of the Data to be fetched by the application to be tested, and close the application to be tested. Finally, the terminal device calls other applications (for example, a browser application installed on the terminal, or an application having a function of parsing the first web page file) to read the first web page file, so that the other applications parse a web page in the first web page file, start the application to be tested according to an application address in the web page, then the application to be tested reads an environment address to be accessed (for example, "www.testgouwu.com") from a memory, and runs the Data to be tested (for example, the test Data corresponding to "Data _ zhifu") under the environment to be accessed (for example, a first website pre-sending environment), thereby completing the test on the application to be tested.
According to the method provided by the embodiment of the application, the other applications are called to start the application to be tested, and the access environment address and the data to be tested are read in the starting process of the application to be tested, so that the process of manually storing the address of the environment to be accessed and the data to be tested and manually closing the application is avoided, and the application to be tested with high efficiency is realized.
With further reference to FIG. 3, a flow 300 of yet another embodiment of an application testing method is shown. The process 300 of the application test method includes the following steps:
step 301, a first webpage file is constructed in response to a test opening command.
In this embodiment, the electronic device (for example, the terminal device shown in fig. 1) on which the application test method operates may first obtain a test start command through the terminal device with which the user performs the application test, and then construct the first web page file based on the test start command.
Step 302, storing the to-be-accessed environment address and the to-be-tested data into a memory indicated by a path of the to-be-tested application access data, and closing the to-be-tested application.
In this embodiment, the electronic device on which the application testing method operates may first obtain the environment to be accessed and the data to be tested based on the test start command in step 301, then store the environment to be accessed and the data to be tested in the memory indicated by the path of the data taken by the application to be tested, and close the application to be tested.
Step 303, publishing the first webpage in the first webpage file.
In this embodiment, the electronic device may issue the first web page in the first web page file constructed in step 301 based on a hypertext transfer Protocol (HTTP). Here, the first webpage includes an application address of the application to be tested. It is understood that how to publish web pages based on the hypertext transfer protocol is well known to those skilled in the art and will not be described herein.
Step 303, constructing a second webpage file.
In this embodiment, the electronic device may first control the server at the server to construct a second webpage file including the address of the first webpage, where the second webpage in the second webpage file includes the address of the first webpage, according to the address of the first webpage published in step 303. It should be noted that the second webpage file may be located in the electronic device, or may be located in another electronic device.
Step 305, the second webpage in the second webpage file is published.
In this embodiment, the electronic device may control the server of the server to publish the second webpage in the second webpage file constructed in step 303.
Step 306, invoking the browser application to open the second webpage.
In this embodiment, the electronic device invokes the second web page issued in the browser application opening step 305, where the second web page including the address of the first web page locates the web page opened by the browser to the first web page in a manner of redirecting an address, so that the browser can analyze the first web page and open the application to be tested according to the application address in the first web page. And running the data to be tested in the environment to be accessed by the application to be tested so as to complete the test of the application to be tested. It is to be understood that the browser application may be installed on the electronic device, or may be installed on other electronic devices besides the electronic device.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the process 300 of the application testing method in this embodiment highlights the steps of constructing the second webpage file on the server of the server and redirecting to the first webpage through the second webpage. Therefore, the scheme described in the embodiment can introduce a mode of opening the webpage more conveniently through other applications, so that more convenient application testing is realized.
With further reference to fig. 4, as an implementation of the method shown in the above figures, the present application provides an embodiment of an application testing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied to various electronic devices.
As shown in fig. 4, the application testing apparatus 400 according to the present embodiment includes: a building module 401, a logging module 402, and a calling module 403. The building module 401 is configured to build a first webpage file in response to a test start command, where the test start command includes an identifier of an environment to be accessed and an identifier of data to be tested, and the first webpage file includes an application address of the application to be tested; the storing module 402 is configured to store an address of an environment to be accessed and/or data to be tested into a memory indicated by a path of the data to be accessed by the application to be tested, and close the application to be tested, where the address of the environment to be accessed is an address of the environment to be accessed indicated by an identifier of the environment to be accessed, and the data to be tested is test data indicated by the identifier of the data to be tested; the calling module 403 is configured to call other applications to read the first webpage file, so that the other applications start the application to be tested according to the application address, and the application to be tested runs the data to be tested in the environment to be accessed to complete the test on the application to be tested.
In this embodiment, the building module 401 of the application testing apparatus 400 may first obtain a test start command through a terminal device with which a user performs an application test, and then build the first webpage file based on the test start command.
In this embodiment, the storing module 402 of the application testing apparatus 400 may first obtain the environment to be accessed and/or the data to be tested based on the test start command in the building module 401, then store the environment to be accessed and/or the data to be tested into the memory indicated by the path of the data taken by the application to be tested, and close the application to be tested.
In this embodiment, the calling module 403 of the application testing apparatus 400 may call other applications except the application to be tested to read the first webpage file obtained based on the building module 401, so that the other applications start the application to be tested according to the application address in the first webpage file, so that the application to be tested runs the data to be tested in the environment to be accessed to complete the test on the application to be tested.
In some optional implementations of this embodiment, the other application includes a browser application; and, the invoking module 403 is further configured to: publishing a first webpage in the first webpage file; constructing a second webpage file, wherein a second webpage in the second webpage file comprises an address of the first webpage; publishing a second webpage in the second webpage file; and calling the browser application to open the second webpage, wherein the second webpage is used for positioning the webpage opened by the browser application to the first webpage in a redirection address mode.
In some optional implementations of this embodiment, the logging module 402 is further configured to: comparing the address of the environment to be accessed in the first webpage file with the address of the environment last accessed by the application to be tested; and in response to that the address of the environment to be accessed is different from the address of the environment last accessed by the application to be tested, storing the address of the environment to be accessed into a memory indicated by a path of the data taken by the application to be tested.
In some optional implementations of this embodiment, the logging module 402 is further configured to: comparing the identifier of the data to be tested with the identifier of the last test data of the application to be tested; and in response to the fact that the to-be-tested data identification is different from the identification of the last test data of the to-be-tested application, storing the to-be-tested data into a memory indicated by a path of the to-be-tested application data.
Those skilled in the art will appreciate that the application test apparatus 400 described above also includes some other well-known structures, such as processors, memories, etc., which are not shown in fig. 4 in order to not unnecessarily obscure embodiments of the present disclosure.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing a terminal device of an embodiment of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 505 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present application may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a construction module, a storage module and a calling module. Where the names of these modules do not in some cases constitute a limitation on the module itself, for example, a build module may also be described as a "module that builds a first web page file in response to a test open command".
As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium included in the apparatus in the above-described embodiments; or it may be a non-volatile computer storage medium that exists separately and is not incorporated into the terminal. The non-transitory computer storage medium stores one or more programs that, when executed by a device, cause the device to: responding to a test starting command to construct a first webpage file, wherein the test starting command comprises an environment identifier to be accessed and a data identifier to be tested, and the first webpage file comprises an application address of the application to be tested; storing an environment address to be accessed and/or data to be tested into a memory indicated by a path of the data to be tested and used by the application to be tested, and closing the application to be tested, wherein the environment address to be accessed is an address of an environment to be accessed indicated by an environment identifier to be accessed, and the data to be tested is test data indicated by the data identifier to be tested; and calling other applications to read the first webpage file so that the other applications start the application to be tested according to the application address, so that the application to be tested runs the data to be tested in the environment to be accessed to complete the test of the application to be tested.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. An application testing method, the method comprising:
responding to a test starting command to construct a first webpage file, wherein the test starting command comprises an environment identifier to be accessed and a data identifier to be tested, and the first webpage file comprises an application address of an application to be tested;
storing an environment address to be accessed and/or data to be tested into a memory indicated by a path of the data to be tested and used by the application to be tested, and closing the application to be tested, wherein the environment address to be accessed is an address of an environment to be accessed indicated by an environment identifier to be accessed, and the data to be tested is test data indicated by the data identifier to be tested;
calling other applications to read the first webpage file so that the other applications start the application to be tested according to the application address, and the application to be tested runs the data to be tested in the environment to be accessed to complete the test of the application to be tested, wherein the other applications comprise applications with a function of analyzing the first webpage file.
2. The method of claim 1, wherein the other applications comprise a browser application; and the number of the first and second groups,
the calling other applications to read the first webpage file comprises the following steps:
publishing a first webpage in the first webpage file;
constructing a second webpage file, wherein a second webpage in the second webpage file comprises an address of the first webpage;
publishing a second webpage in the second webpage file;
and calling the browser application to open the second webpage, wherein the second webpage is used for positioning the webpage opened by the browser application to the first webpage in a redirection address mode.
3. The method according to any of claims 1 or 2, wherein the environment to be accessed comprises at least one of: test environment, pre-launch environment, and online environment.
4. The method of claim 3, wherein the storing the to-be-accessed environment address and/or the to-be-tested data into the memory indicated by the path of the to-be-tested application access data comprises:
comparing the address of the environment to be accessed in the first webpage file with the address of the environment last accessed by the application to be tested;
and in response to that the address of the environment to be accessed is different from the address of the environment last accessed by the application to be tested, storing the address of the environment to be accessed into a memory indicated by a path of the data taken by the application to be tested.
5. The method of claim 4, wherein the storing the to-be-accessed environment address and/or the to-be-tested data into the memory indicated by the path of the to-be-tested application access data comprises:
comparing the identifier of the data to be tested with the identifier of the last test data of the application to be tested;
and in response to the fact that the to-be-tested data identification is different from the identification of the last test data of the to-be-tested application, storing the to-be-tested data into a memory indicated by a path of the to-be-tested application data.
6. An application testing apparatus, the apparatus comprising:
the building module is configured to build a first webpage file in response to a test starting command, wherein the test starting command comprises an environment identifier to be accessed and a data identifier to be tested, and the first webpage file comprises an application address of an application to be tested;
the storage module is configured to store an address of an environment to be accessed and/or data to be tested into a memory indicated by a path of the data to be accessed by the application to be tested, and close the application to be tested, wherein the address of the environment to be accessed is an address of the environment to be accessed indicated by an identifier of the environment to be accessed, and the data to be tested is test data indicated by the identifier of the data to be tested;
and the calling module is configured to call other applications to read the first webpage file so that the other applications start the application to be tested according to the application address, so that the application to be tested runs the data to be tested in the environment to be accessed to complete the test on the application to be tested, wherein the other applications comprise applications with a function of analyzing the first webpage file.
7. The apparatus of claim 6, wherein the other applications comprise a browser application; and the number of the first and second groups,
the calling module is further configured to:
publishing a first webpage in the first webpage file;
constructing a second webpage file, wherein a second webpage in the second webpage file comprises an address of the first webpage;
publishing a second webpage in the second webpage file;
and calling the browser application to open the second webpage, wherein the second webpage is used for positioning the webpage opened by the browser application to the first webpage in a redirection address mode.
8. The apparatus according to any one of claims 6 or 7, wherein the environment to be accessed comprises at least one of: test environment, pre-launch environment, and online environment.
9. The apparatus of claim 8, wherein the logging module is further configured to:
comparing the address of the environment to be accessed in the first webpage file with the address of the environment last accessed by the application to be tested;
and in response to that the address of the environment to be accessed is different from the address of the environment last accessed by the application to be tested, storing the address of the environment to be accessed into a memory indicated by a path of the data taken by the application to be tested.
10. The apparatus of claim 9, wherein the logging module is further configured to:
comparing the identifier of the data to be tested with the identifier of the last test data of the application to be tested;
and in response to the fact that the to-be-tested data identification is different from the identification of the last test data of the to-be-tested application, storing the to-be-tested data into a memory indicated by a path of the to-be-tested application data.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-5.
12. A computer-readable storage medium having stored thereon a computer program, wherein,
the program when executed by a processor implementing the method of any one of claims 1 to 5.
CN201610262572.6A 2016-04-25 2016-04-25 Application testing method and device Active CN107305528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610262572.6A CN107305528B (en) 2016-04-25 2016-04-25 Application testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610262572.6A CN107305528B (en) 2016-04-25 2016-04-25 Application testing method and device

Publications (2)

Publication Number Publication Date
CN107305528A CN107305528A (en) 2017-10-31
CN107305528B true CN107305528B (en) 2020-09-01

Family

ID=60150465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610262572.6A Active CN107305528B (en) 2016-04-25 2016-04-25 Application testing method and device

Country Status (1)

Country Link
CN (1) CN107305528B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111370053A (en) * 2018-12-25 2020-07-03 北京兆易创新科技股份有限公司 eMMC test method and device
CN110489341B (en) * 2019-07-30 2023-08-11 北京字节跳动网络技术有限公司 Test method and device, storage medium and electronic equipment
CN111324530B (en) * 2020-02-03 2023-12-05 京东科技控股股份有限公司 Prefire testing method, prefire testing device, prefire testing equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080054170A (en) * 2006-12-12 2008-06-17 임영태 Method of web page testing and apparatus performing the same
CN103714002A (en) * 2013-12-26 2014-04-09 北京奇虎科技有限公司 Project testing method and device based on configuration system
CN104615534A (en) * 2015-01-28 2015-05-13 广州酷狗计算机科技有限公司 Interface test method and device
JP2015114844A (en) * 2013-12-11 2015-06-22 日本電信電話株式会社 Method, apparatus, and program for switching application execution environment
CN105446865A (en) * 2014-07-09 2016-03-30 阿里巴巴集团控股有限公司 Test method and device under multi-environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080054170A (en) * 2006-12-12 2008-06-17 임영태 Method of web page testing and apparatus performing the same
JP2015114844A (en) * 2013-12-11 2015-06-22 日本電信電話株式会社 Method, apparatus, and program for switching application execution environment
CN103714002A (en) * 2013-12-26 2014-04-09 北京奇虎科技有限公司 Project testing method and device based on configuration system
CN105446865A (en) * 2014-07-09 2016-03-30 阿里巴巴集团控股有限公司 Test method and device under multi-environment
CN104615534A (en) * 2015-01-28 2015-05-13 广州酷狗计算机科技有限公司 Interface test method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Web Application系统的测试技术研究与应用;田超;《中国优秀硕士学位论文全文数据库 信息科技辑》;20080315(第03期);第I139-104页 *

Also Published As

Publication number Publication date
CN107305528A (en) 2017-10-31

Similar Documents

Publication Publication Date Title
US10635735B2 (en) Method and apparatus for displaying information
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN108574604B (en) Test method and device
CN106911693B (en) Method and device for detecting hijacking of webpage content and terminal equipment
CN109684188B (en) Test method and device
CN105718313A (en) Application operation method and device
CN110708346A (en) Information processing system and method
CN104657499A (en) Webpage loading method and device of client-side APP (Application)
CN107276842B (en) Interface test method and device and electronic equipment
CN110020329B (en) Method, device and system for generating webpage
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN112463729B (en) Data file warehousing method and device, electronic equipment and medium
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN107305528B (en) Application testing method and device
CN109656799B (en) Test method and device
CN109218041B (en) Request processing method and device for server system
CN108334516A (en) Information-pushing method and device
CN107656910A (en) Method and apparatus for generating list
CN107368407B (en) Information processing method and device
CN107885872B (en) Method and device for generating information
CN113362173A (en) Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN111338928A (en) Chrome-based browser testing method and device
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN107203714B (en) Configuration method and device of data verification file

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