CN111026648A - Application program page testing method and device, electronic equipment and storage medium - Google Patents

Application program page testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111026648A
CN111026648A CN201911151565.9A CN201911151565A CN111026648A CN 111026648 A CN111026648 A CN 111026648A CN 201911151565 A CN201911151565 A CN 201911151565A CN 111026648 A CN111026648 A CN 111026648A
Authority
CN
China
Prior art keywords
page
tested
coordinate
pages
image
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.)
Withdrawn
Application number
CN201911151565.9A
Other languages
Chinese (zh)
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.)
Hanhai Information Technology Shanghai Co Ltd
Original Assignee
Hanhai Information Technology Shanghai 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 Hanhai Information Technology Shanghai Co Ltd filed Critical Hanhai Information Technology Shanghai Co Ltd
Priority to CN201911151565.9A priority Critical patent/CN111026648A/en
Publication of CN111026648A publication Critical patent/CN111026648A/en
Withdrawn legal-status Critical Current

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
    • 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/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a method and a device for testing an application program page, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring page addresses corresponding to pages to be tested of a plurality of application programs as batch page addresses; the method comprises the steps that pages to be tested corresponding to each page address are opened one by one in a browser, so that the pages to be tested are tested; in the process of opening a page to be tested corresponding to a page address, performing image recognition on a jumped first page, determining a first coordinate corresponding to a first operable control, and operating the first operable control according to the first coordinate; in the process of loading a page to be tested corresponding to a page address, storing abnormal information corresponding to the page to be tested into a page abnormal log; and outputting the page abnormal log after the pages to be tested corresponding to the batch page addresses are tested. The embodiment of the application improves the page testing efficiency and reduces the cost.

Description

Application program page testing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to a method and a device for testing an application program page, electronic equipment and a storage medium.
Background
In the prior art, when testing an Application (App) page in an iOS system, an App with an open source test automation framework is needed to complete the testing, and first a home page of the Application needs to be opened by the App, an entry corresponding to the page to be tested is selected from the home page, and the page to be tested is entered through the entry to perform the testing.
In the testing process, the app needs to perform interface analysis and search, find an element to be operated, and perform operation to realize page testing. Moreover, if the page is abnormal in the testing process, the app needs to restart the process of the application program for testing, and the time for analyzing the interface and searching the elements is long, which results in low testing efficiency and is not beneficial to testing the pages in batches.
Disclosure of Invention
The embodiment of the application program page testing method and device, the electronic equipment and the storage medium are beneficial to improving the testing efficiency of the pages in batches and reducing the cost.
In order to solve the above problem, in a first aspect, an embodiment of the present application provides an application page testing method, including:
acquiring page addresses corresponding to pages to be tested of a plurality of application programs as batch page addresses;
the method comprises the steps that pages to be tested corresponding to each page address are opened one by one in a browser, so that the pages to be tested are tested;
in the process of opening a page to be tested corresponding to a page address, performing image recognition on a jumped first page, determining a first coordinate corresponding to a first operable control, and operating the first operable control according to the first coordinate;
in the process of loading a page to be tested corresponding to a page address, storing abnormal information corresponding to the page to be tested into a page abnormal log;
and outputting the page abnormal log after the pages to be tested corresponding to the batch page addresses are tested.
In a second aspect, an embodiment of the present application provides an application page testing apparatus, including:
the page address acquisition module is used for acquiring page addresses corresponding to pages to be tested of the plurality of application programs and taking the page addresses as batch page addresses;
the page opening module is used for opening pages to be tested corresponding to each page address one by one in the browser so as to test the pages to be tested;
the first coordinate determination module is used for carrying out image recognition on a jumped first page in the process of opening a page to be tested corresponding to a page address, determining a first coordinate corresponding to a first operable control and operating the first operable control according to the first coordinate;
the abnormal information storage module is used for storing the abnormal information corresponding to the page to be tested into a page abnormal log in the process of loading the page to be tested corresponding to the page address;
and the abnormal log output module is used for outputting the page abnormal log after the pages to be tested corresponding to the batch page addresses are tested.
In a third aspect, an embodiment of the present application further discloses an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and when the processor executes the computer program, the application page testing method according to the embodiment of the present application is implemented.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and the application page testing method disclosed in the embodiment of the present application includes the steps of.
The application program page testing method, the device, the electronic equipment and the storage medium disclosed by the embodiment of the application program are characterized in that page addresses corresponding to pages to be tested of a plurality of application programs are obtained and are used as batch page addresses, the pages to be tested corresponding to each page address are opened in a browser one by one, image recognition is carried out on a jumped first page in the process of opening the pages to be tested corresponding to the page addresses, a first coordinate corresponding to a first operable control is determined, the first operable control is operated according to the first coordinate, abnormal information corresponding to the pages to be tested is stored in a page abnormal log in the process of loading the pages to be tested corresponding to the page addresses, the page abnormal log is output after the pages to be tested corresponding to the batch page addresses are all tested, and the first coordinate corresponding to the first operable control is determined through the image recognition, the page does not need to be analyzed and element searched, so that the test time is saved, the test efficiency of the pages in batches is improved, a developer certificate is not needed to be analyzed, the real machine debugging is not needed, and the cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of a method for testing an application page according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of a first page in an embodiment of the present application;
FIG. 3 is a diagram illustrating exception information of a page to be tested on a first page in an embodiment of the present application;
FIG. 4 is a flowchart of a method for testing an application page according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of an application page testing apparatus according to a third embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
The method for testing an application page disclosed in this embodiment is applicable to a device of an iOS operating system, and as shown in fig. 1, the method includes: step 110 to step 150.
Step 110, acquiring page addresses corresponding to pages to be tested of a plurality of application programs as batch page addresses.
Wherein, the page address is URL Scheme. Scheme is a page jump protocol, and as websites are accessed through a URL, applications can jump through the URL Scheme.
Before Scheme traversal is needed, namely the operation of loading and testing a large number of pages is needed, page addresses corresponding to pages to be tested of a plurality of application programs needing to be tested can be saved in a configuration file. During testing, a test script is started through a script running tool or a framework, a configuration file is read through the test script, and page addresses corresponding to pages to be tested of a plurality of application programs are obtained. In the configuration file, the page addresses may be stored in a list.
And step 120, opening the pages to be tested corresponding to each page address one by one in the browser so as to test the pages to be tested.
Wherein the browser may be a Safari browser.
The pages to be tested corresponding to each page address can be opened one by one in sequence according to the sequence of each page address in the batch of page addresses. Or randomly selecting a page address to be opened from the batch of page addresses, opening the selected page address, and selecting other page addresses for opening next time.
In an embodiment of the present application, the step of opening the pages to be tested corresponding to each page address one by one in the browser includes:
and sequentially opening the page to be tested corresponding to each page address in the browser according to the sequence of the page addresses in the batch of page addresses.
The page to be tested corresponding to each page address can be opened in sequence for testing by opening the page to be tested corresponding to each page address in the browser according to the sequence of each page address in the batch of page addresses, so that the page selecting speed is increased, and the testing efficiency of the batch of pages is further improved.
Step 130, in the process of opening a page to be tested corresponding to the page address, performing image recognition on the jumped first page, determining a first coordinate corresponding to a first operable control, and operating the first operable control according to the first coordinate.
When a page to be tested corresponding to a page address is opened through a browser, in order to call up the page to be tested, a window is popped up on the browser page to inquire whether a current page address is to be opened, as shown in fig. 2, the browser page and the window are first pages, the first page includes two operable controls, one operable control is a first operable control, and the other operable control is a control having a function opposite to that of the first operable control, such as the first operable control is "open", and the other operable control is "cancel". The method comprises the steps of carrying out image recognition on a first page, recognizing a first operable control in the first page, determining a first coordinate of the first operable control in the first page, and carrying out clicking operation on the position of the first coordinate after determining the first coordinate corresponding to the first operable control, so that the operation on the first operable control is realized. In the embodiment of the application, when the page to be tested corresponding to the page address is opened through the browser, if the application program corresponding to the page to be tested is in an open state, the application program can be directly called and the page to be tested is loaded; if the application program corresponding to the page to be tested is in a closed state, the application program can be started and the page to be tested is loaded.
The first coordinate may be a coordinate point or a coordinate range. When the first coordinate is a coordinate point, the first coordinate may be a coordinate of a set position in the first operable control, such as a coordinate of an upper left corner of the first operable control, or a coordinate of a center point of the first operable control, and may also be a coordinate of another position in the first operable control. When the first coordinate is a coordinate range, the first coordinate may be a coordinate range of a set position in the first operable control, for example, a range between a coordinate of an upper left corner of the first operable control and a coordinate of the upper left corner plus a preset number of pixels, where the preset number may be 5, for example.
In an embodiment of the application, the step of performing image recognition on the jumped first page and determining the first coordinate corresponding to the first operable control in the process of opening the page to be tested corresponding to the page address includes:
in the process of opening a page to be tested corresponding to a page address, acquiring a first page image corresponding to a jumped first page;
and matching the first page image with a first control image corresponding to the first operable control, and determining the coordinate of the first control image in the first page image as the first coordinate.
In the process of opening a page to be tested corresponding to a page address in a browser, if a window pops up to inquire whether the current page address needs to be opened, the whole screen is captured, and an image obtained by capturing the screen is used as a first page image. The method comprises the steps of saving a first control image corresponding to a first operable control in advance, matching the first control image with the first control image through an image matching algorithm after the first page image is intercepted, calculating the similarity of the first control image and the first control image to be used as a first similarity, determining to find the coordinate of the first control image in the first page image when the first similarity reaches a preset similarity, recording the coordinate at the moment, and using the coordinate as the first coordinate of the first operable control in the first page.
When the first page image is matched with the first control image, the first control image slides on the first page image, namely the first control image can be moved on the first page image according to the sequence from left to right and from top to bottom, and after the first control image is moved to one position, the similarity of the first control image and an image screenshot covered by the first control image on the first page image is calculated. When the first control image is moved on the first page image, the pixels with the preset number of pixels can be moved each time according to the preset number of pixels.
The image matching algorithm may be TM _ CCOEFF _ normal, for example, but may also be other algorithms as long as image matching can be completed, and is not limited herein.
Step 140, in the process of loading the page to be tested corresponding to the page address, storing the abnormal information corresponding to the page to be tested into a page abnormal log.
And after the first operable control is operated according to the first coordinate, entering a page to be tested, and waiting for the completion of loading the page to be tested. In the process of loading the page to be tested, if the page to be tested has abnormalities such as crash, the system stores the abnormal information into the page abnormal log. When the page to be tested is loaded, if the page to be tested is loaded completely and no exception occurs, the page exception log is not generated.
And after the current page to be tested is tested, opening a page to be tested corresponding to the next page address through the browser.
And 150, outputting the page exception log after the pages to be tested corresponding to the batch page addresses are tested.
And after the testing of all the pages to be tested corresponding to the batch page addresses is completed, acquiring a page abnormity log from the system through the testing script, and outputting the page abnormity log.
The application program page testing method disclosed by the embodiment of the application program comprises the steps of obtaining page addresses corresponding to pages to be tested of a plurality of application programs, using the page addresses as batch page addresses, opening the pages to be tested corresponding to each page address one by one in a browser, carrying out image recognition on a jumped first page in the process of opening the pages to be tested corresponding to the page addresses, determining a first coordinate corresponding to a first operable control, operating the first operable control according to the first coordinate, storing abnormal information corresponding to the pages to be tested into a page abnormal log in the process of loading the pages to be tested corresponding to the page addresses, outputting the page abnormal log after the pages to be tested corresponding to the batch page addresses are all tested, and not needing to analyze and search elements of the pages due to the fact that the first coordinate corresponding to the first operable control is determined through the image recognition, therefore, the testing time is saved, the testing efficiency of the pages in batches is improved, and the pages do not need to be analyzed, so that a developer certificate is not needed, the real machine debugging is not needed, and the cost is reduced.
On the basis of the above technical solution, after the step of storing the abnormal information corresponding to the page to be tested in the page abnormal log, the method may further include:
returning to the browser, and opening a page to be tested corresponding to the next page address in the browser.
In the process of loading the page to be tested corresponding to the page address, if the page to be tested has abnormalities such as crash or memory leak, the abnormal information is stored in the abnormal log, the current page to be tested exits, the current page to be tested returns to the browser, the browser page displays the abnormal information, and the page to be tested corresponding to the next page address can be opened in the browser again. In the process, the test of the next page to be tested can be continued without restarting the process, so that the page test efficiency is further improved. When the page to be tested corresponding to the next page address is called, a window inquiring whether the current page address needs to be opened is popped up on the browser page, so that the form of the first page is shown in fig. 3, the browser page displays the abnormal information of the previous page to be tested, and the window is popped up.
On the basis of the above technical solution, the method may further include:
after the page to be tested corresponding to the page address is loaded, performing image recognition on the jumped second page, determining a second coordinate corresponding to a second operable control, and operating the second operable control according to the second coordinate to return to the browser;
and opening a page to be tested corresponding to the next page address in the browser.
And after the page to be tested corresponding to the page address is not abnormal and the loading is finished, popping up a window to inquire whether the page returns to the browser or not, taking the page on which the window is superposed by the browser as a second page, and capturing the screen of the whole screen to obtain a second page image. The second page includes two operable controls, one operable control being a second operable control, the other operable control being a control having a functionality opposite to that of the second operable control, e.g., the second operable control is "back" and the other operable control is "cancel".
And matching the second page image with a second control image corresponding to the second operable control, and determining the coordinate of the second control image in the second page image as the second coordinate. And after a second coordinate of the second operable control in the second page is determined, clicking the second operable control according to the second coordinate, and returning to the browser. And opening the page to be tested corresponding to the next page address in the browser, so that the batch pages can be continuously tested, and the test efficiency of the batch pages is improved. The second coordinate may be a coordinate point or a coordinate range. When the second coordinate is a coordinate point, the second coordinate may be a coordinate of a set position in the first operable control, such as a coordinate of an upper left corner of the second operable control, or a coordinate of a center point of the second operable control, or may be a coordinate of another position in the second operable control. When the second coordinate is a coordinate range, the second coordinate may be a coordinate range of a set position in the second operable control, for example, a range between a coordinate of an upper left corner of the second operable control and a coordinate of a pixel point of the upper left corner plus a preset number, where the preset number may be 5, for example.
When the second coordinate is determined by image matching, a second control image corresponding to the second operable control is stored in advance, the second page image and the second control image are matched through an image matching algorithm, the similarity of the second page image and the second control image is calculated to serve as a second similarity, when the second similarity reaches the preset similarity, the coordinate of the second control image in the second page image is determined to be found, the coordinate at the moment is recorded and serves as a second coordinate of the second operable control in the second page.
When the second page image is matched with the second control image, the second control image slides on the second page image, that is, the second control image can be moved on the second page image according to the sequence from left to right and from top to bottom, and after the second control image is moved to a position, the similarity between the second control image and an image screenshot covered by the second control image on the second page image is calculated. When the second control image is moved on the second page image, the pixels with the preset number of pixels can be moved each time according to the preset number of pixels.
On the basis of the above technical solution, before the step of obtaining the page addresses corresponding to the pages to be tested of the plurality of application programs, the method may further include: and clearing the page exception log. After the test script is started, initializing, and emptying a page exception log, namely emptying a crash log of the iOS device, so that the page exception log obtained after the test is completed is a page exception record of the test.
Example two
The method for testing an application page disclosed in this embodiment is applicable to a device of an iOS operating system, and as shown in fig. 4, the method includes: step 110 to step 140.
Step 410, starting a test script and emptying a page exception log.
Step 420, acquiring page addresses corresponding to pages to be tested of the plurality of application programs as batch page addresses.
And 430, sequentially selecting a page address as the current page address according to the sequence of the batch page addresses.
Step 440, opening a current page to be tested corresponding to a current page address in the browser, performing image recognition on the jumped first page in the process of opening the current page to be tested corresponding to the current page address, determining a first coordinate corresponding to a first operable control, and operating the first operable control according to the first coordinate.
Step 450, loading the current page to be tested, and determining whether a page abnormality occurs, if so, executing step 460, and if not, executing step 470.
Step 460, saving the abnormal information corresponding to the current page to be tested into the page abnormal log, and returning to the browser. Step 480 is then performed.
Step 470, after the loading of the current page to be tested corresponding to the current page address is completed, performing image recognition on the skipped second page, determining a second coordinate corresponding to a second operable control, and operating the second operable control according to the second coordinate to return to the browser. Step 480 is then performed.
Step 480, judging whether the pages to be tested corresponding to the batch page addresses are tested completely, if not, executing step 430 to step 480, and if so, executing step 490.
Step 490, obtaining the page exception log in the device, and outputting the page exception log.
According to the application program page testing method, the coordinates corresponding to the operable control are determined through image recognition, page analysis and element searching are not needed, the problem that long time is caused by unstable factors existing in the process of page analysis and searching is avoided, page testing efficiency is improved, page testing can be conducted without a developer certificate, cost is reduced, a process does not need to be restarted when one page is abnormal, the next page can be directly tested, and accordingly the testing efficiency of pages in batches is improved.
EXAMPLE III
As shown in fig. 5, the application page testing apparatus 500 of the present embodiment includes:
a page address obtaining module 510, configured to obtain page addresses corresponding to pages to be tested of multiple application programs, as batch page addresses;
the page opening module 520 is configured to open pages to be tested corresponding to each page address one by one in the browser, so as to test the pages to be tested;
a first coordinate determining module 530, configured to perform image recognition on a skipped first page in a process of opening a page to be tested corresponding to a page address, determine a first coordinate corresponding to a first operable control, and operate the first operable control according to the first coordinate;
the abnormal information storage module 540 is configured to store the abnormal information corresponding to the page to be tested into a page abnormal log in the process of loading the page to be tested corresponding to the page address;
and an abnormal log output module 550, configured to output the page abnormal log after all the pages to be tested corresponding to the batch of page addresses are tested.
Optionally, the first coordinate determination module includes:
the first page image acquisition unit is used for acquiring a first page image corresponding to a jumped first page in the process of opening a page to be tested corresponding to a page address;
and the first coordinate determination unit is used for matching the first page image with a first control image corresponding to the first operable control, and determining the coordinate of the first control image in the first page image as the first coordinate.
Optionally, the apparatus further comprises:
and the first returning module is used for returning to the browser after the step of storing the abnormal information corresponding to the page to be tested in the page abnormal log, and opening the page to be tested corresponding to the next page address in the browser.
Optionally, the apparatus further comprises:
the second returning module is used for carrying out image recognition on a jumped second page after the page to be tested corresponding to the page address is loaded, determining a second coordinate corresponding to a second operable control, and operating the second operable control according to the second coordinate so as to return to the browser;
the page opening module is further configured to:
and opening a page to be tested corresponding to the next page address in the browser.
Optionally, the method further includes:
and the log clearing module is used for clearing the page abnormal log before the step of acquiring the page addresses corresponding to the pages to be tested of the plurality of application programs.
Optionally, the page opening module is specifically configured to:
and sequentially opening the page to be tested corresponding to each page address in the browser according to the sequence of the page addresses in the batch of page addresses.
The application page testing device provided in the embodiment of the present application is used to implement the steps of the application page testing method described in the embodiment of the present application, and the specific implementation of each module of the device refers to the corresponding steps, which are not described herein again.
The application program page testing device disclosed in the embodiment of the application obtains page addresses corresponding to pages to be tested of a plurality of application programs as batch page addresses through a page address obtaining module, a page opening module opens the pages to be tested corresponding to each page address one by one in a browser, a first coordinate determining module performs image recognition on a jumped first page in the process of opening the pages to be tested corresponding to the page addresses, determines a first coordinate corresponding to a first operable control and operates the first operable control according to the first coordinate, an abnormal information storing module stores abnormal information corresponding to the pages to be tested into a page abnormal log in the process of loading the pages to be tested corresponding to the page addresses, and an abnormal log outputting module outputs the page abnormal log after the pages to be tested corresponding to the batch page addresses are all tested, the first coordinate corresponding to the first operable control is determined through image recognition, and the page does not need to be analyzed and element searched, so that the testing time is saved, the testing efficiency of the pages in batches is improved, the page does not need to be analyzed, a developer certificate is not needed, the real-machine debugging is not needed, and the cost is reduced.
Correspondingly, the embodiment of the application also discloses an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the application page testing method according to the embodiment of the application is realized. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer and the like.
The embodiment of the application also discloses a computer readable storage medium, on which a computer program is stored, and the program is executed by a processor to realize the steps of the application page testing method according to the embodiment of the application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The application page testing method, the application page testing device, the electronic device and the storage medium provided by the embodiment of the application are introduced in detail, a specific example is applied in the description to explain the principle and the implementation mode of the application, and the description of the embodiment is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Claims (10)

1. An application program page testing method is characterized by comprising the following steps:
acquiring page addresses corresponding to pages to be tested of a plurality of application programs as batch page addresses;
the method comprises the steps that pages to be tested corresponding to each page address are opened one by one in a browser, so that the pages to be tested are tested;
in the process of opening a page to be tested corresponding to a page address, performing image recognition on a jumped first page, determining a first coordinate corresponding to a first operable control, and operating the first operable control according to the first coordinate;
in the process of loading a page to be tested corresponding to a page address, storing abnormal information corresponding to the page to be tested into a page abnormal log;
and outputting the page abnormal log after the pages to be tested corresponding to the batch page addresses are tested.
2. The method of claim 1, wherein the step of performing image recognition on the first page jumped to during the process of opening the page to be tested corresponding to the page address, and determining the first coordinate corresponding to the first operable control comprises:
in the process of opening a page to be tested corresponding to a page address, acquiring a first page image corresponding to a jumped first page;
and matching the first page image with a first control image corresponding to the first operable control, and determining the coordinate of the first control image in the first page image as the first coordinate.
3. The method according to claim 1, wherein after the step of saving the exception information corresponding to the page to be tested in the page exception log, the method further comprises:
returning to the browser, and opening a page to be tested corresponding to the next page address in the browser.
4. The method of claim 1, further comprising:
after the page to be tested corresponding to the page address is loaded, performing image recognition on the jumped second page, determining a second coordinate corresponding to a second operable control, and operating the second operable control according to the second coordinate to return to the browser;
and opening a page to be tested corresponding to the next page address in the browser.
5. The method according to claim 1, wherein before the step of obtaining page addresses corresponding to pages to be tested of the plurality of applications, the method further comprises:
and clearing the page exception log.
6. The method of claim 1, wherein the step of opening the page to be tested corresponding to each page address one by one in the browser comprises:
and sequentially opening the page to be tested corresponding to each page address in the browser according to the sequence of the page addresses in the batch of page addresses.
7. An application page testing apparatus, comprising:
the page address acquisition module is used for acquiring page addresses corresponding to pages to be tested of the plurality of application programs and taking the page addresses as batch page addresses;
the page opening module is used for opening pages to be tested corresponding to each page address one by one in the browser so as to test the pages to be tested;
the first coordinate determination module is used for carrying out image recognition on a jumped first page in the process of opening a page to be tested corresponding to a page address, determining a first coordinate corresponding to a first operable control and operating the first operable control according to the first coordinate;
the abnormal information storage module is used for storing the abnormal information corresponding to the page to be tested into a page abnormal log in the process of loading the page to be tested corresponding to the page address;
and the abnormal log output module is used for outputting the page abnormal log after the pages to be tested corresponding to the batch page addresses are tested.
8. The apparatus of claim 7, wherein the first coordinate determination module comprises:
the first page image acquisition unit is used for acquiring a first page image corresponding to a jumped first page in the process of opening a page to be tested corresponding to a page address;
and the first coordinate determination unit is used for matching the first page image with a first control image corresponding to the first operable control, and determining the coordinate of the first control image in the first page image as the first coordinate.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the application page testing method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the application page testing method of any one of claims 1 to 6.
CN201911151565.9A 2019-11-21 2019-11-21 Application program page testing method and device, electronic equipment and storage medium Withdrawn CN111026648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911151565.9A CN111026648A (en) 2019-11-21 2019-11-21 Application program page testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911151565.9A CN111026648A (en) 2019-11-21 2019-11-21 Application program page testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111026648A true CN111026648A (en) 2020-04-17

Family

ID=70201923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911151565.9A Withdrawn CN111026648A (en) 2019-11-21 2019-11-21 Application program page testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111026648A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552623A (en) * 2020-04-30 2020-08-18 汉海信息技术(上海)有限公司 Method and device for determining page memory consumption
CN112363919A (en) * 2020-11-02 2021-02-12 北京云测信息技术有限公司 Automatic test method, device, equipment and storage medium for user interface AI

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035863A (en) * 2013-03-08 2014-09-10 腾讯科技(深圳)有限公司 Browser testing method and device
CN104252410A (en) * 2013-06-27 2014-12-31 阿里巴巴集团控股有限公司 Method and equipment for testing control in page
US20150339213A1 (en) * 2014-05-21 2015-11-26 Cgi Technologies And Solutions Inc. Automated testing of an application system
CN109299415A (en) * 2018-09-30 2019-02-01 百度在线网络技术(北京)有限公司 H5 page method of calibration and device
CN109729137A (en) * 2018-05-15 2019-05-07 平安普惠企业管理有限公司 Page data display methods, display terminal and storage medium
CN109933530A (en) * 2019-03-14 2019-06-25 百度在线网络技术(北京)有限公司 Components testing method and device, equipment and storage medium
WO2019196274A1 (en) * 2018-04-10 2019-10-17 平安科技(深圳)有限公司 Web page testing method and apparatus, electronic device, and medium
CN110377500A (en) * 2019-06-14 2019-10-25 平安科技(深圳)有限公司 Test method, device, terminal device and the medium of Website page

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035863A (en) * 2013-03-08 2014-09-10 腾讯科技(深圳)有限公司 Browser testing method and device
CN104252410A (en) * 2013-06-27 2014-12-31 阿里巴巴集团控股有限公司 Method and equipment for testing control in page
US20150339213A1 (en) * 2014-05-21 2015-11-26 Cgi Technologies And Solutions Inc. Automated testing of an application system
WO2019196274A1 (en) * 2018-04-10 2019-10-17 平安科技(深圳)有限公司 Web page testing method and apparatus, electronic device, and medium
CN109729137A (en) * 2018-05-15 2019-05-07 平安普惠企业管理有限公司 Page data display methods, display terminal and storage medium
CN109299415A (en) * 2018-09-30 2019-02-01 百度在线网络技术(北京)有限公司 H5 page method of calibration and device
CN109933530A (en) * 2019-03-14 2019-06-25 百度在线网络技术(北京)有限公司 Components testing method and device, equipment and storage medium
CN110377500A (en) * 2019-06-14 2019-10-25 平安科技(深圳)有限公司 Test method, device, terminal device and the medium of Website page

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贾丽;许静;金鑫;田禾;: "Web系统测试用例自动执行系统" *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552623A (en) * 2020-04-30 2020-08-18 汉海信息技术(上海)有限公司 Method and device for determining page memory consumption
CN111552623B (en) * 2020-04-30 2023-10-27 汉海信息技术(上海)有限公司 Method and device for determining page memory consumption
CN112363919A (en) * 2020-11-02 2021-02-12 北京云测信息技术有限公司 Automatic test method, device, equipment and storage medium for user interface AI
CN112363919B (en) * 2020-11-02 2024-02-13 北京云测信息技术有限公司 User interface AI automatic test method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107025174B (en) Method, device and readable storage medium for user interface anomaly test of equipment
CN110851299A (en) Automatic flow exception eliminating method, device, equipment and storage medium
CN111026645A (en) User interface automatic testing method and device, storage medium and electronic equipment
CN108460301A (en) The performance testing device and method of barcode scanning module
US7805008B2 (en) Structural content filtration of hypotheses in a cognitive control framework
CN111026648A (en) Application program page testing method and device, electronic equipment and storage medium
CN112115055A (en) Multi-machine automatic testing method and device and computer equipment
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN111143188A (en) Method and equipment for automatically testing application
CN109840212B (en) Function test method, device and equipment of application program and readable storage medium
CN107786869B (en) Method, device and storage medium for generating menu path of television equipment
CN106910207B (en) Method and device for identifying local area of image and terminal equipment
CN111240967B (en) Code generation method and device
CN111597111A (en) Application program starting speed monitoring method and device
CN114996156A (en) Method and device for testing small program, electronic equipment and readable storage medium
CN113835591A (en) Popup window processing method and device
CN112380134A (en) WebUI automatic testing method based on image recognition
CN112559375A (en) Method for parallel automatic testing by using multiple different browsers
CN111064952A (en) Automatic testing method, device and system
CN111552634A (en) Method and device for testing front-end system and storage medium
CN112446850A (en) Adaptation test method and device and electronic equipment
WO2024023948A1 (en) Analysis device, analysis method, and analysis program
CN109710794B (en) Information processing method and electronic equipment
CN116264626A (en) Video display method based on browser, electronic device and readable storage medium
CN110456955B (en) Exposed clothing detection method, device, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200417

WW01 Invention patent application withdrawn after publication