CN114138664A - Page testing method and device, storage medium and computer equipment - Google Patents

Page testing method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN114138664A
CN114138664A CN202111499736.4A CN202111499736A CN114138664A CN 114138664 A CN114138664 A CN 114138664A CN 202111499736 A CN202111499736 A CN 202111499736A CN 114138664 A CN114138664 A CN 114138664A
Authority
CN
China
Prior art keywords
page
target
configuration
module
configuration data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111499736.4A
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.)
Lazas Network Technology Shanghai Co Ltd
Original Assignee
Lazas Network 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 Lazas Network Technology Shanghai Co Ltd filed Critical Lazas Network Technology Shanghai Co Ltd
Priority to CN202111499736.4A priority Critical patent/CN114138664A/en
Publication of CN114138664A publication Critical patent/CN114138664A/en
Pending 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/3696Methods or tools to render software testable

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 application discloses a page testing method and device, a storage medium and computer equipment, wherein the method comprises the following steps: acquiring page configuration data sent by a server, and verifying the page configuration data according to preset configuration data; sending the page configuration data to the client so that the client can display a target page according to the page configuration data; and acquiring target page display data of the client, and verifying the target page display data according to preset page display data corresponding to the page configuration data. This application is through carrying out the separation test to customer end and server, helps quick, accurate location test problem, promotes efficiency of software testing, reduces tester's work load, reduces test cost.

Description

Page testing method and device, storage medium and computer equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a page testing method and apparatus, a storage medium, and a computer device.
Background
With the continuous development of internet technology, display pages provided by various types of software, websites and the like are more and more abundant and various, and the workload of page testing work is greater and greater for testers. The display process of the page is as follows: after the client sends a page display request to the server, the server firstly acquires the configuration data of the page from the configuration platform and then issues the configuration data of the page to the client, and the client renders the page according to the acquired configuration data and displays the page.
In the current testing technology, an automated testing tool is installed at a client, the client is driven to send a page display request to a server, and after page display is performed according to acquired configuration data, consistency check is performed on a display page and a preset standard page, so that the display page is tested. When the displayed page is checked to be inconsistent with the standard page, the test method causes the problem of page display error to be difficult to accurately position, is not beneficial to the examination of testers on the problem, and has lower test efficiency.
Disclosure of Invention
In view of this, the present application provides a page testing method and apparatus, a storage medium, and a computer device, which are helpful for quickly and accurately positioning a problem in a page testing process and improving testing efficiency.
According to an aspect of the present application, there is provided a page testing method, including:
acquiring page configuration data sent by a server, and verifying the page configuration data according to preset configuration data;
sending the page configuration data to the client so that the client can display a target page according to the page configuration data;
and acquiring target page display data of the client, and verifying the target page display data according to preset page display data corresponding to the page configuration data.
Optionally, the preset configuration data includes a total number of modules corresponding to the target page and a configuration template corresponding to each module; the page configuration data comprises target configuration parameters corresponding to a target configuration module; the verifying the page configuration data according to the preset configuration data specifically includes:
acquiring a current effective configuration corresponding to the target page from a configuration platform corresponding to the target page, wherein the current effective configuration comprises a current effective module corresponding to the target page;
performing compliance verification on the target configuration parameters according to the configuration template corresponding to the current effective module;
and determining a target judgment module according to the full amount module and the current effective module, and performing judgment and check on the target configuration parameters according to the target judgment module.
Optionally, the configuration template includes a full-size style configuration parameter corresponding to the current validation module, and when the target configuration parameter is matched with any one of the full-size style configuration parameters corresponding to the current validation module, the target configuration parameter passes compliance verification; or the configuration template comprises a configuration parameter format corresponding to the current validation module, and when the target configuration parameter is matched with the configuration parameter format corresponding to the current validation module, the target configuration parameter passes compliance verification;
and when the target configuration parameters do not comprise the configuration parameters of the target emptying module, the target configuration parameters pass emptying verification.
Optionally, the sending the page configuration data to the client specifically includes:
respectively changing target configuration parameters of a target configuration module in the page configuration data according to at least one preset test pattern corresponding to a target page to obtain at least one group of changed page configuration data, so that each group of changed target configuration parameters are respectively matched with the preset configuration parameters corresponding to each preset test pattern, wherein the preset test pattern comprises the pattern of the at least one target configuration module corresponding to the target page;
and respectively sending at least one group of the changed page configuration data to the client so that the client displays the target page according to the received changed page configuration data.
Optionally, the obtaining target page display data of the client and verifying the target page display data according to preset page display data corresponding to the page configuration data specifically includes:
acquiring at least one target page display image of the client and a preset page display image corresponding to the at least one preset test pattern, wherein the target page display data comprises the target page display image, and the preset page display data comprises the preset page display image;
and respectively carrying out similarity verification on each target page display image according to the preset page display image.
Optionally, before the respectively changing the target configuration parameters of the target configuration module in the page configuration data according to at least one preset test pattern corresponding to the target page, the method further includes:
determining a plurality of pages to be tested, a full-quantity module corresponding to each page to be tested and a to-be-tested pattern corresponding to each full-quantity module;
and determining the at least one preset test pattern according to the current validation module corresponding to the target page and the to-be-tested pattern corresponding to each full module.
Optionally, before the obtaining of the page configuration data sent by the server, the method further includes:
acquiring the number of preset test patterns corresponding to a plurality of pages to be tested, wherein the pages to be tested comprise the target page;
and constructing an automatic test program according to the pages to be tested and the number of the preset test patterns, wherein the automatic test program runs in the client, the automatic test program is used for triggering the action of generating a display instruction for any page to be tested so as to enable the client to send the display instruction for any page to be tested to the server, the display instruction is used for triggering the server to send page configuration data corresponding to any page to be tested, the automatic test program is further used for recording the display times of any page to be tested and determining whether to trigger the action of generating the display instruction for the next page to be tested according to the display times and the number of the preset test patterns.
According to another aspect of the present application, there is provided a page testing apparatus including:
the first checking module is used for acquiring the page configuration data sent by the server and checking the page configuration data according to preset configuration data;
the data sending module is used for sending the page configuration data to the client so that the client can display a target page according to the page configuration data;
and the second checking module is used for acquiring the target page display data of the client and checking the target page display data according to the preset page display data corresponding to the page configuration data.
Optionally, the preset configuration data includes a total number of modules corresponding to the target page and a configuration template corresponding to each module; the page configuration data comprises target configuration parameters corresponding to a target configuration module; the first verification module is specifically configured to:
acquiring a current effective configuration corresponding to the target page from a configuration platform corresponding to the target page, wherein the current effective configuration comprises a current effective module corresponding to the target page;
performing compliance verification on the target configuration parameters according to the configuration template corresponding to the current effective module;
and determining a target judgment module according to the full amount module and the current effective module, and performing judgment and check on the target configuration parameters according to the target judgment module.
Optionally, the configuration template includes a full-size style configuration parameter corresponding to the current validation module, and when the target configuration parameter is matched with any one of the full-size style configuration parameters corresponding to the current validation module, the target configuration parameter passes compliance verification; or the configuration template comprises a configuration parameter format corresponding to the current validation module, and when the target configuration parameter is matched with the configuration parameter format corresponding to the current validation module, the target configuration parameter passes compliance verification;
and when the target configuration parameters do not comprise the configuration parameters of the target emptying module, the target configuration parameters pass emptying verification.
Optionally, the data sending module is specifically configured to:
respectively changing target configuration parameters of a target configuration module in the page configuration data according to at least one preset test pattern corresponding to a target page to obtain at least one group of changed page configuration data, so that each group of changed target configuration parameters are respectively matched with the preset configuration parameters corresponding to each preset test pattern, wherein the preset test pattern comprises the pattern of the at least one target configuration module corresponding to the target page;
and respectively sending at least one group of the changed page configuration data to the client so that the client displays the target page according to the received changed page configuration data.
Optionally, the second check module is specifically configured to:
acquiring at least one target page display image of the client and a preset page display image corresponding to the at least one preset test pattern, wherein the target page display data comprises the target page display image, and the preset page display data comprises the preset page display image;
and respectively carrying out similarity verification on each target page display image according to the preset page display image.
Optionally, the apparatus further comprises:
the pre-configuration module is used for determining a plurality of pages to be tested, a full-quantity module corresponding to each page to be tested and a to-be-tested pattern corresponding to each full-quantity module before the target configuration parameters of the target configuration module in the page configuration data are respectively changed according to at least one preset test pattern corresponding to the target page; and determining the at least one preset test pattern according to the current validation module corresponding to the target page and the to-be-tested pattern corresponding to each full module.
Optionally, the apparatus further comprises:
the tool construction module is used for acquiring the number of preset test patterns corresponding to a plurality of pages to be tested before acquiring the page configuration data sent by the server, wherein the pages to be tested comprise the target page; and constructing an automatic test program according to the pages to be tested and the number of the preset test patterns, wherein the automatic test program runs in the client, the automatic test program is used for triggering the action of generating a display instruction for any page to be tested so as to enable the client to send the display instruction for any page to be tested to the server, the display instruction is used for triggering the server to send page configuration data corresponding to any page to be tested, the automatic test program is further used for recording the display times of any page to be tested and determining whether to trigger the action of generating the display instruction for the next page to be tested according to the display times and the number of the preset test patterns.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the page test method described above.
According to yet another aspect of the present application, there is provided a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the page test method when executing the program.
By means of the technical scheme, the page testing method and device, the storage medium and the computer equipment provided by the application have the advantages that the testing system obtains the page configuration data of the target page sent by the server, verifies the page configuration data and tests the server, further sends the page configuration data to the client, so that the target page display data generated by the client according to the page configuration data is obtained, the target page display data is verified, and the test of the client is achieved. Compared with the testing mode in the prior art, the embodiment of the application has the advantages that the testing mode is separated from the client and the server, the quick and accurate positioning test problem is facilitated, the testing efficiency is improved, the workload of testers is reduced, and the testing cost is reduced.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 shows a schematic flowchart of a page testing method provided in an embodiment of the present application;
FIG. 2 is a schematic flowchart illustrating another page testing method provided in the embodiment of the present application;
FIG. 3 is a flowchart illustrating a further page testing method provided in the embodiment of the present application;
fig. 4 shows a schematic structural diagram of a page testing apparatus according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, a page testing method is provided, as shown in fig. 1, the method includes:
step 101, acquiring page configuration data sent by a server, and verifying the page configuration data according to preset configuration data;
102, sending the page configuration data to the client so that the client displays a target page according to the page configuration data;
step 103, obtaining target page display data of the client, and verifying the target page display data according to preset page display data corresponding to the page configuration data.
The embodiment of the application can be applied to a test system, and the test system can be arranged in entity equipment independent of a client and a server, and can also be arranged in entity equipment corresponding to the client or the server, which is not limited herein. The embodiment of the present application is described by taking an example that an entity device where a test system is located is independent of a client and a server. In the testing process, the client sends a display instruction of a target page to the server to request for obtaining page configuration data of the target page, when the server sends the page configuration data to the client, the testing system can intercept the page configuration data so as to verify the intercepted page configuration data and forward the intercepted page configuration data to the client when the verification is passed, or the server can simultaneously send the page configuration data to the client and the testing system, and the testing system verifies the received page configuration data. In a specific application scenario, the test system may verify the page configuration data according to pre-recorded preset configuration data, and specifically may verify the data format, configuration parameters, and other contents of the page configuration data, so as to implement the test on the server.
Furthermore, the test system can send the intercepted page configuration data to the client, and after the client obtains the page configuration data, the client can locally render and display the target page. And then the test system obtains target page display data of the client and verifies the target page display data, wherein the target page display data can be a target page display image, such as a display screen screenshot of a target page, and the target page display data can also be display element information corresponding to each position in the target page. After the test system obtains the target page display data, the test system may verify the actual target page display data of the client according to preset page display data corresponding to the pre-recorded page configuration data, where the type of the target page display data is consistent with that of the preset page display data, for example, if the preset page display data is an image, the target page display data is also an image. The test system tests the client through checking the display data of the target page. The front end and the back end (the client and the server) are separately tested, and when a problem is found, whether the problem is the problem of the server or the problem of the front end can be clearly judged without manual judgment.
By applying the technical scheme of the embodiment, the test system obtains the page configuration data of the target page sent by the server, verifies the page configuration data and tests the server, and further sends the page configuration data to the client, so that target page display data generated by the client according to the page configuration data is obtained and verified, and the test of the client is realized. Compared with the testing mode in the prior art, the embodiment of the application has the advantages that the testing mode is separated from the client and the server, the quick and accurate positioning test problem is facilitated, the testing efficiency is improved, the workload of testers is reduced, and the testing cost is reduced.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of the embodiment, another page testing method is provided, as shown in fig. 2, and the method includes:
step 201, obtaining page configuration data sent by a server, and obtaining a current effective configuration corresponding to a target page from a configuration platform corresponding to the target page, wherein the current effective configuration comprises a current effective module corresponding to the target page;
in an actual application scene, more and more pages do not meet single style and typesetting, but a configuration type page is adopted, namely, the style of a client side is modularized and templatized, and fields needing to change the style through configuration are extracted and placed on a configuration platform. After the client requests data from the server, the server firstly queries the configuration platform, acquires configuration data which is valid at the current time and sends the configuration data to the client, and the client renders a page according to the acquired configuration. The configuration can be changed at any time, and the page style and the layout can be changed along with the change of the configuration.
In step 201, for a configuration type page (or other types of pages that need to obtain page configuration data from a third-party platform), since the configuration condition of a target page can be changed in real time by the configuration platform, the server receives a display instruction and then obtains the page configuration data of the target page from the configuration platform corresponding to the target page. The test system intercepts page configuration data sent by the server, and simultaneously acquires the current effective configuration of the page from a configuration platform corresponding to the target page, wherein the current effective configuration can comprise a current effective module. By inquiring the effective configuration of the current configuration platform, the data verification basis in the current time is obtained, so that the verification rule can also be changed along with the change of the configuration, and the misjudgment brought by fixed judgment is reduced.
Step 202, performing compliance verification on the target configuration parameters according to the configuration template corresponding to the current validation module; determining a target judgment module according to the full amount module and the current effective module, and performing judgment check on the target configuration parameters according to the target judgment module;
optionally, the preset configuration data includes a total number of modules corresponding to the target page and a configuration template corresponding to each module; the page configuration data comprises target configuration parameters corresponding to a target configuration module; the configuration template comprises full-size style configuration parameters corresponding to the current effective module, and when the target configuration parameters are matched with any one of the full-size style configuration parameters corresponding to the current effective module, the target configuration parameters pass compliance verification; or the configuration template comprises a configuration parameter format corresponding to the current validation module, and when the target configuration parameter is matched with the configuration parameter format corresponding to the current validation module, the target configuration parameter passes compliance verification; and when the target configuration parameters do not comprise the configuration parameters of the target emptying module, the target configuration parameters pass emptying verification.
In step 202, the test system implements a test on the server according to the page configuration data obtained from the server and the current active configuration obtained from the configuration platform. Fig. 3 shows a flowchart of a server testing method provided in an embodiment of the present application. The test system may include, according to preset configuration data stored in advance, a full-size module corresponding to the target page and a configuration template corresponding to each module, where the full-size module specifically refers to a sum of all modules that the target page may display under different conditions, each module may correspond to multiple display styles, and the configuration template corresponding to each module may include a configuration parameter format (e.g., a field length, a field type, and the like of a parameter) corresponding to the module, and may also include a full-size style configuration parameter (e.g., a configuration parameter corresponding to each style) corresponding to the module. In a specific verification process, the test system may verify whether the page configuration data includes a parameter corresponding to the current validation module, and whether a target configuration parameter corresponding to the current validation module matches a corresponding configuration template, for example, whether the format matches, or whether the target configuration parameter is within the corresponding full-size style configuration parameter, and if the page configuration data includes a parameter of the current validation module and the parameter matches the configuration template, it is determined that the page configuration data passes compliance verification. In addition, the test system may also determine the target emptying module according to the full module and the current effective module, for example, the full module includes a module A, B, C, the current effective module is a module A, B, and then the target emptying module is a module C, and further, it is checked whether the target configuration parameters in the page configuration data include parameters corresponding to the target emptying module, for example, if the target configuration parameters do not include parameters corresponding to the module C, it is determined that the emptying check is passed.
Step 203, respectively changing target configuration parameters of a target configuration module in the page configuration data according to at least one preset test pattern corresponding to a target page to obtain at least one group of changed page configuration data, so that each group of changed target configuration parameters is respectively matched with preset configuration parameters corresponding to each preset test pattern, wherein the preset test pattern comprises a pattern of at least one target configuration module corresponding to the target page;
in step 203, the page configuration data obtained from the server is a configuration parameter corresponding to the presentation style of the target page, and in order to implement a test on the presentation styles of more pages, the test system may further change the target configuration parameter in the page configuration data according to at least one predetermined test style corresponding to the predetermined target page, so as to obtain changed page configuration data, where one predetermined test style may obtain a set of changed page configuration data. The target configuration parameters in the page configuration data are matched with a preset test pattern, and the preset test pattern comprises the pattern of each target configuration module in the target page. For example, the target configuration module corresponding to the target page includes a module a, and the module a has 2 display styles, which are style 1 and style 2, respectively, so that parameters in the page configuration data can be modified and replaced according to the module a configuration parameters corresponding to the style 1 and the style 2. Through module data management and replacement, parameters in a target configuration module fed back by a server can be selectively replaced in an automatic test, and the capability of displaying various styles at the front end is tested.
In this embodiment of the application, optionally, before step 203, the method may further include: determining a plurality of pages to be tested, a full-quantity module corresponding to each page to be tested and a to-be-tested pattern corresponding to each full-quantity module; and determining the at least one preset test pattern according to the current validation module corresponding to the target page and the to-be-tested pattern corresponding to each full module.
In this embodiment, before performing the test, the test system may manage different pages to be tested in advance, and specifically, determine pages to be tested (including a target page), a full-scale module corresponding to each page to be tested, a test pattern corresponding to each full-scale module, and a configuration parameter corresponding to each pattern. Therefore, after the test system obtains the current validation module corresponding to the target page, the test system can inquire the to-be-tested patterns corresponding to the target page and the current validation module in the pre-stored data, and combine the to-be-tested patterns corresponding to different current validation modules to obtain at least one preset test pattern. For example, if the currently validated module includes the module A, B, the module a corresponds to the pattern 1 and the pattern 2, and the module B corresponds to the pattern 3, the first predetermined test pattern may be the module a pattern 1 and the module B pattern 3, and the second predetermined test pattern may be the module a pattern 2 and the module B pattern 3.
Step 204, respectively sending at least one group of the changed page configuration data to the client, so that the client displays the target page according to the received changed page configuration data;
step 205, acquiring at least one target page display image of the client and a preset page display image corresponding to the at least one preset test pattern, wherein the target page display data includes the target page display image, and the preset page display data includes the preset page display image; and respectively carrying out similarity verification on each target page display image according to the preset page display image.
In step 204 and step 205, after the test system changes the page configuration data, the changed page configuration data is respectively sent to the client, so that the client renders and displays the target page according to the data, and then the test system obtains the target page display image corresponding to each set of changed page configuration data in the client, specifically, the target page display image can be obtained in multiple times, or the target page display image can be uniformly stored by the client and obtained by the test system at one time. After the test system acquires the target page display image, the pre-stored preset page display image corresponding to each preset test pattern is used for client verification, and if the target page display image is consistent with the preset page display image or the similarity is higher than a preset threshold value, for example, higher than 95%, the similarity verification can be considered to be passed. To enable individual testing of clients.
In addition, in order to reduce the test workload of the tester, an embodiment of the present application further provides an automated testing tool, which includes an automated testing program, and optionally, before step 201, the automated testing tool may further include:
s1, acquiring the number of preset test patterns corresponding to a plurality of pages to be tested, wherein the pages to be tested comprise the target page;
and S2, constructing an automatic test program according to the pages to be tested and the preset test pattern number, wherein the automatic test program runs in the client, the automatic test program is used for triggering an action of generating a display instruction for any page to be tested so as to enable the client to send the display instruction for any page to be tested to the server, the display instruction is used for triggering the server to send page configuration data corresponding to any page to be tested, the automatic test program is further used for recording the display times of any page to be tested, and determining whether to trigger the action of generating the display instruction for the next page to be tested according to the display times and the preset test pattern number.
In the above embodiment, the number of the preset test patterns corresponding to each page to be tested is obtained, and an automatic test program is constructed according to each page to be tested and the number of the preset test patterns corresponding to the page to be tested. The automatic test program runs in the client, and when the program runs in the client, the triggering operation of the display instruction of any page to be tested can be simulated, for example, the display instruction of the page can be generated by clicking a certain button in a screen, so that the program can drive a UI to automatically generate the clicking action of the button. The display instruction is used for triggering the server to feed back page configuration data of the corresponding page to be tested. In addition, the test system can change the page configuration data fed back by the server to obtain a plurality of groups of changed page configuration data, so as to improve the capability of an automatic test program and further reduce the workload of testers. Therefore, the automatic test of each page to be tested is realized. The front-end multi-style data replacement is combined with UI automation, all relevant module styles can be regressed once during the execution period of the automatic page test, and the test efficiency is improved.
It should be noted that each page to be tested may correspond to a plurality of validation module combinations (that is, the current validation module corresponding to each page to be tested is one of the plurality of validation module combinations), each validation module combination corresponds to at least one preset test pattern, and the number of the preset test patterns corresponding to each page to be tested specifically includes the number of the preset test patterns corresponding to the validation module combinations included in each page to be tested.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides a page testing apparatus, as shown in fig. 4, the apparatus includes:
the first checking module is used for acquiring the page configuration data sent by the server and checking the page configuration data according to preset configuration data;
the data sending module is used for sending the page configuration data to the client so that the client can display a target page according to the page configuration data;
and the second checking module is used for acquiring the target page display data of the client and checking the target page display data according to the preset page display data corresponding to the page configuration data.
Optionally, the preset configuration data includes a total number of modules corresponding to the target page and a configuration template corresponding to each module; the page configuration data comprises target configuration parameters corresponding to a target configuration module; the first verification module is specifically configured to:
acquiring a current effective configuration corresponding to the target page from a configuration platform corresponding to the target page, wherein the current effective configuration comprises a current effective module corresponding to the target page;
performing compliance verification on the target configuration parameters according to the configuration template corresponding to the current effective module;
and determining a target judgment module according to the full amount module and the current effective module, and performing judgment and check on the target configuration parameters according to the target judgment module.
Optionally, the configuration template includes a full-size style configuration parameter corresponding to the current validation module, and when the target configuration parameter is matched with any one of the full-size style configuration parameters corresponding to the current validation module, the target configuration parameter passes compliance verification; or the configuration template comprises a configuration parameter format corresponding to the current validation module, and when the target configuration parameter is matched with the configuration parameter format corresponding to the current validation module, the target configuration parameter passes compliance verification;
and when the target configuration parameters do not comprise the configuration parameters of the target emptying module, the target configuration parameters pass emptying verification.
Optionally, the data sending module is specifically configured to:
respectively changing target configuration parameters of a target configuration module in the page configuration data according to at least one preset test pattern corresponding to a target page to obtain at least one group of changed page configuration data, so that each group of changed target configuration parameters are respectively matched with the preset configuration parameters corresponding to each preset test pattern, wherein the preset test pattern comprises the pattern of the at least one target configuration module corresponding to the target page;
and respectively sending at least one group of the changed page configuration data to the client so that the client displays the target page according to the received changed page configuration data.
Optionally, the second check module is specifically configured to:
acquiring at least one target page display image of the client and a preset page display image corresponding to the at least one preset test pattern, wherein the target page display data comprises the target page display image, and the preset page display data comprises the preset page display image;
and respectively carrying out similarity verification on each target page display image according to the preset page display image.
Optionally, the apparatus further comprises:
the pre-configuration module is used for determining a plurality of pages to be tested, a full-quantity module corresponding to each page to be tested and a to-be-tested pattern corresponding to each full-quantity module before the target configuration parameters of the target configuration module in the page configuration data are respectively changed according to at least one preset test pattern corresponding to the target page; and determining the at least one preset test pattern according to the current validation module corresponding to the target page and the to-be-tested pattern corresponding to each full module.
Optionally, the apparatus further comprises:
the tool construction module is used for acquiring the number of preset test patterns corresponding to a plurality of pages to be tested before acquiring the page configuration data sent by the server, wherein the pages to be tested comprise the target page; and constructing an automatic test program according to the pages to be tested and the number of the preset test patterns, wherein the automatic test program runs in the client, the automatic test program is used for triggering the action of generating a display instruction for any page to be tested so as to enable the client to send the display instruction for any page to be tested to the server, the display instruction is used for triggering the server to send page configuration data corresponding to any page to be tested, the automatic test program is further used for recording the display times of any page to be tested and determining whether to trigger the action of generating the display instruction for the next page to be tested according to the display times and the number of the preset test patterns.
It should be noted that other corresponding descriptions of the functional units related to the page testing apparatus provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 2, and are not described herein again.
Based on the method shown in fig. 1 to 2, correspondingly, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the page testing method shown in fig. 1 to 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the above methods shown in fig. 1 to fig. 2 and the virtual device embodiment shown in fig. 4, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the page testing method as described above with reference to fig. 1 to 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and also can obtain page configuration data of a target page sent by a server through a hardware implementation test system, and verify the page configuration data to implement a test on the server, and further send the page configuration data to a client, so as to obtain target page display data generated by the client according to the page configuration data, and verify the target page display data to implement a test on the client. Compared with the testing mode in the prior art, the embodiment of the application has the advantages that the testing mode is separated from the client and the server, the quick and accurate positioning test problem is facilitated, the testing efficiency is improved, the workload of testers is reduced, and the testing cost is reduced.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A page testing method is characterized by comprising the following steps:
acquiring page configuration data sent by a server, and verifying the page configuration data according to preset configuration data;
sending the page configuration data to the client so that the client can display a target page according to the page configuration data;
and acquiring target page display data of the client, and verifying the target page display data according to preset page display data corresponding to the page configuration data.
2. The method according to claim 1, wherein the preset configuration data includes a full number of modules corresponding to the target page and a configuration template corresponding to each module; the page configuration data comprises target configuration parameters corresponding to a target configuration module; the verifying the page configuration data according to the preset configuration data specifically includes:
acquiring a current effective configuration corresponding to the target page from a configuration platform corresponding to the target page, wherein the current effective configuration comprises a current effective module corresponding to the target page;
performing compliance verification on the target configuration parameters according to the configuration template corresponding to the current effective module;
and determining a target judgment module according to the full amount module and the current effective module, and performing judgment and check on the target configuration parameters according to the target judgment module.
3. The method of claim 2,
the configuration template comprises full-size style configuration parameters corresponding to the current effective module, and when the target configuration parameters are matched with any one of the full-size style configuration parameters corresponding to the current effective module, the target configuration parameters pass compliance verification; or the configuration template comprises a configuration parameter format corresponding to the current validation module, and when the target configuration parameter is matched with the configuration parameter format corresponding to the current validation module, the target configuration parameter passes compliance verification;
and when the target configuration parameters do not comprise the configuration parameters of the target emptying module, the target configuration parameters pass emptying verification.
4. The method according to claim 1, wherein the sending the page configuration data to the client specifically includes:
respectively changing target configuration parameters of a target configuration module in the page configuration data according to at least one preset test pattern corresponding to a target page to obtain at least one group of changed page configuration data, so that each group of changed target configuration parameters are respectively matched with the preset configuration parameters corresponding to each preset test pattern, wherein the preset test pattern comprises the pattern of the at least one target configuration module corresponding to the target page;
and respectively sending at least one group of the changed page configuration data to the client so that the client displays the target page according to the received changed page configuration data.
5. The method according to claim 4, wherein the obtaining of the target page display data of the client and the checking of the target page display data according to the preset page display data corresponding to the page configuration data specifically comprises:
acquiring at least one target page display image of the client and a preset page display image corresponding to the at least one preset test pattern, wherein the target page display data comprises the target page display image, and the preset page display data comprises the preset page display image;
and respectively carrying out similarity verification on each target page display image according to the preset page display image.
6. The method according to claim 4, wherein before the target configuration parameters of the target configuration module in the page configuration data are respectively changed according to at least one preset test pattern corresponding to the target page, the method further comprises:
determining a plurality of pages to be tested, a full-quantity module corresponding to each page to be tested and a to-be-tested pattern corresponding to each full-quantity module;
and determining the at least one preset test pattern according to the current validation module corresponding to the target page and the to-be-tested pattern corresponding to each full module.
7. The method according to any one of claims 4 to 6, wherein before the obtaining the page configuration data sent by the server, the method further comprises:
acquiring the number of preset test patterns corresponding to a plurality of pages to be tested, wherein the pages to be tested comprise the target page;
and constructing an automatic test program according to the pages to be tested and the number of the preset test patterns, wherein the automatic test program runs in the client, the automatic test program is used for triggering the action of generating a display instruction for any page to be tested so as to enable the client to send the display instruction for any page to be tested to the server, the display instruction is used for triggering the server to send page configuration data corresponding to any page to be tested, the automatic test program is further used for recording the display times of any page to be tested and determining whether to trigger the action of generating the display instruction for the next page to be tested according to the display times and the number of the preset test patterns.
8. A page testing apparatus, comprising:
the first checking module is used for acquiring the page configuration data sent by the server and checking the page configuration data according to preset configuration data;
the data sending module is used for sending the page configuration data to the client so that the client can display a target page according to the page configuration data;
and the second checking module is used for acquiring the target page display data of the client and checking the target page display data according to the preset page display data corresponding to the page configuration data.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 7.
10. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the computer program.
CN202111499736.4A 2021-12-09 2021-12-09 Page testing method and device, storage medium and computer equipment Pending CN114138664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111499736.4A CN114138664A (en) 2021-12-09 2021-12-09 Page testing method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111499736.4A CN114138664A (en) 2021-12-09 2021-12-09 Page testing method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN114138664A true CN114138664A (en) 2022-03-04

Family

ID=80385443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111499736.4A Pending CN114138664A (en) 2021-12-09 2021-12-09 Page testing method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN114138664A (en)

Similar Documents

Publication Publication Date Title
CN108959068B (en) Software interface testing method, device and storage medium
CN108628741B (en) Webpage testing method and device, electronic equipment and medium
CN109302522B (en) Test method, test device, computer system, and computer medium
CN107145440B (en) Application program testing method and device and computer equipment
US9483385B2 (en) Method, program, and system for generating test cases
CN107967206B (en) Data test system, request interception method and request interception device
US10162742B2 (en) System and method for end to end performance response time measurement based on graphic recognition
CN110833693B (en) Game running method and device, storage medium and electronic device
CN110569159A (en) Baffle generation method, device, equipment and computer storage medium
US11237948B2 (en) Rendering engine component abstraction system
CN110708214B (en) Service data display method, device, equipment and computer readable storage medium
CN110659870A (en) Business audit test method, device, equipment and storage medium
CN110795000B (en) Automatic control method and device based on interface segmentation and terminal
CN109840212B (en) Function test method, device and equipment of application program and readable storage medium
CN110674023B (en) Interface testing method and device
KR20150030297A (en) Verification apparatus, terminal device, system, method and computer-readable medium for verifying application
CN116719736A (en) Test case generation method and device for testing software interface
CN110688318A (en) Program testing method and device
CN114138664A (en) Page testing method and device, storage medium and computer equipment
JP7457746B2 (en) Measuring device and measuring method
CN111008140B (en) Cross-platform UI (user interface) automatic testing method and device
CN114564387A (en) Scene type automatic testing method and system for OpenStack cloud platform
CN112199229A (en) Data processing method, device, equipment and storage medium
CN113110996A (en) Test method and device
CN112765041A (en) Game automatic testing method and device and electronic equipment

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