CN115705272A - Page testing method, related device and equipment - Google Patents

Page testing method, related device and equipment Download PDF

Info

Publication number
CN115705272A
CN115705272A CN202110939116.1A CN202110939116A CN115705272A CN 115705272 A CN115705272 A CN 115705272A CN 202110939116 A CN202110939116 A CN 202110939116A CN 115705272 A CN115705272 A CN 115705272A
Authority
CN
China
Prior art keywords
page
data
screenshot
primary
target
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
CN202110939116.1A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110939116.1A priority Critical patent/CN115705272A/en
Publication of CN115705272A publication Critical patent/CN115705272A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a page testing method, a related device and equipment, which are used for page screenshot and improving the efficiency of page testing. The method in the embodiment of the application comprises the following steps: the method comprises the steps of receiving page test data sent by a server, wherein the page test data comprise a basic field, a resource field and a conversion field, the basic field is used for describing the style of primary page data and secondary page data, the resource field is used for describing the primary page data and the content of resources to be displayed of the secondary page data, the conversion field is used for describing the calling relation between the primary page data and the secondary page data, rendering the primary page data according to the page test data to obtain a target primary page, performing screenshot processing on the target primary page to obtain a first screenshot, jumping to the target secondary page from the target primary page, performing screenshot processing on the target secondary page to obtain a second screenshot, and sending a page screenshot test result comprising the first screenshot and the second screenshot to the server.

Description

Page testing method, related device and equipment
Technical Field
The embodiment of the application relates to the technical field of data processing, in particular to a page testing method, a related device and equipment.
Background
With the development of information technology, the application programs are used more and more widely, but before each function of the application program is online, the function of the application program needs to be developed and verified by testers, and the function of the application program can be used after being developed and verified, and the development or verification can be performed through an AB experiment generally, so that the effect of the test is utilized to estimate the online effect.
However, when developing and verifying the functional module with the AB experiment, a tester usually needs to verify the functional module by using AB experiment data returned by the rear end of the bale plucking tool Mock, the AB experiment data returned by the rear end of the bale plucking tool Mock can not be directly used in the verification process, and when testing the secondary page data, the verification can be performed after manually modifying the basic data of the secondary page data according to the AB experiment data, and the verified displayed page is acquired by manually capturing a screenshot, so that the verification screenshot can be uploaded to the server, a large amount of labor cost and time cost are consumed, and therefore, the efficiency of the page testing is not high.
Disclosure of Invention
The embodiment of the application provides a page testing method, a related device and equipment, wherein a target primary page is obtained by rendering primary page data through page testing data, a first screenshot of the target primary page can be automatically intercepted, then a target secondary page which is jumped by the target primary page can be automatically intercepted, a second screenshot of the target secondary page can be automatically intercepted, a page screenshot testing result comprising the first screenshot and the second screenshot is automatically uploaded to a server, and a large amount of labor cost and time cost are not required to be invested to modify the page testing data and screenshot the testing page, so that the page testing efficiency is improved.
In view of the above, an aspect of the present application provides a page testing method, including:
receiving page test data sent by a server, wherein the page test data comprises a basic field, a resource field and a conversion field, the basic field is used for describing the style of primary page data and secondary page data of pre-jump of the primary page data, the resource field is used for describing the primary page data and the content of resources to be displayed of the secondary page data, and the conversion field is used for describing the calling relationship between the primary page data and the secondary page data;
rendering the primary page data according to the page test data to obtain a target primary page, and performing screenshot processing on the target primary page to obtain a first screenshot;
skipping from the target first-level page to a target second-level page, and performing screenshot processing on the target second-level page to obtain a second screenshot, wherein the target second-level page is obtained by rendering second-level page data according to page test data;
and sending a page screenshot test result comprising the first screenshot and the second screenshot to the server.
Another aspect of the present application provides a page testing apparatus, including:
the system comprises an acquisition unit and a conversion unit, wherein the acquisition unit is used for receiving page test data sent by a server, the page test data comprises a basic field, a resource field and a conversion field, the basic field is used for describing the style of primary page data and secondary page data of pre-jump of the primary page data, the resource field is used for describing the primary page data and the content of resources to be displayed of the secondary page data, and the conversion field is used for describing the calling relationship between the primary page data and the secondary page data;
the processing unit is used for rendering the primary page data according to the page test data to obtain a target primary page, and performing screenshot processing on the target primary page to obtain a first screenshot;
the processing unit is also used for jumping from the target primary page to the target secondary page and performing screenshot processing on the target secondary page to obtain a second screenshot, wherein the target secondary page is obtained by rendering secondary page data according to page test data;
and the sending unit is used for sending the page screenshot test result comprising the first screenshot and the second screenshot to the server.
In one possible design, in one implementation of another aspect of an embodiment of the present application,
the processing unit is further used for analyzing the page test data into a primary page object and a secondary page object, wherein the primary page object comprises a plurality of primary page key value pairs, the secondary page object comprises a plurality of secondary page key value pairs, and the plurality of primary page key value pairs and the plurality of secondary page key value pairs respectively have corresponding relations with the basic field, the resource field and the conversion field;
and the storage unit is used for storing the plurality of primary page data key value pairs and the plurality of secondary page data key value pairs, wherein the plurality of primary page data key value pairs and the plurality of secondary page data key value pairs have a mapping relation.
In one possible design, in an implementation manner of another aspect of the embodiment of the present application, the processing unit may be specifically configured to:
reading a plurality of first-level page data key value pairs;
generating primary page data according to the plurality of primary page data key value pairs;
and rendering the first-level page data to obtain a target first-level page.
In one possible design, in an implementation manner of another aspect of the embodiment of the present application, the processing unit may be specifically configured to:
performing initialization rendering on each page element in the first-level page data to obtain a context stack object corresponding to each page element;
drawing coordinates of the context stack object to obtain static coordinate data of the context stack object;
and if the page element has the dynamic attribute parameter, loading the static coordinate data and the dynamic attribute parameter to obtain the target first-level page.
In one possible design, in one implementation of another aspect of an embodiment of the present application,
the determining unit is used for determining a primary page key value pair to be updated in a target primary page according to the mapping relation between the primary page data key value pair and the secondary page data key value pair if the secondary page data key value pair has the timing update key value pair;
the processing unit is also used for indexing to the key value pair of the primary page to be updated according to the timing update key value pair, and re-rendering the target primary page data according to the key value pair of the primary page to be updated to obtain a re-rendered target primary page;
the processing unit is also used for carrying out screenshot on the re-rendered target primary page to obtain a third screenshot;
and the sending unit is also used for sending the page screenshot test result comprising the third screenshot to the server.
In one possible design, in one implementation of another aspect of an embodiment of the present application,
the processing unit is also used for counting the rendering time of the primary page data to obtain first rendering time, and counting the rendering time of the secondary page data to obtain second rendering time;
the processing unit may specifically be configured to: and sending a page screenshot test result comprising the first rendering time, the second rendering time, the first screenshot and the second screenshot to the server.
In one possible design, in one implementation of another aspect of an embodiment of the present application,
the processing unit is also used for generating an error prompt according to the page elements with failed display if the page elements with failed display exist in the target primary page or the target secondary page;
the processing unit may specifically be configured to: and sending a page screenshot test result comprising an error prompt, a first screenshot and a second screenshot to the server.
Another aspect of the present application provides a computer device, including: a memory, a transceiver, a processor, and a bus system;
wherein, the memorizer is used for storing the procedure;
the processor, when executing the program in the memory, implements the methods as described above;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
Another aspect of the present application provides a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the method of the above-described aspects.
In another aspect of the application, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the network device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the network device to perform the method provided by the above aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
the method comprises the steps of receiving basic fields containing secondary page data used for describing the style of primary page data and pre-jumping with the primary page data, resource fields used for describing the primary page data and the content of resources to be displayed of the secondary page data, and page test data used for describing conversion fields of calling relations between the primary page data and the secondary page data, rendering the primary page data according to the page test data to obtain a target primary page, performing screenshot processing on the target primary page to obtain a first screenshot, jumping to the target secondary page from the target primary page, performing screenshot processing on the target secondary page to obtain a second screenshot, and sending a page screenshot test result comprising the first screenshot and the second screenshot to a server. By the method, the purpose that the target primary page is obtained by rendering the primary page data through the page test data is achieved, the first screenshot of the target primary page can be automatically intercepted, then the target secondary page capable of jumping through the target primary page is automatically intercepted, the second screenshot of the target secondary page is automatically intercepted, the page screenshot test result comprising the first screenshot and the second screenshot is automatically uploaded to the server, the situation that the primary page or the secondary page can be rendered only by modifying the page test data in the page test process through a large amount of input human cost can be avoided, manual screenshot of the primary page or the secondary page is not needed, the input of human cost and time cost can be effectively reduced, and the page test efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of an architecture of a page control system in an embodiment of the present application;
FIG. 2 is a schematic diagram of an embodiment of a method for page testing in the embodiment of the present application;
FIG. 3 is a schematic diagram of another embodiment of a page testing method in the embodiment of the present application;
FIG. 4 is a schematic diagram of another embodiment of a page testing method in the embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of a page testing method in the embodiment of the present application;
FIG. 6 is a schematic diagram of another embodiment of a page testing method in the embodiment of the present application;
FIG. 7 is a schematic diagram of another embodiment of a page testing method in the embodiment of the present application;
FIG. 8 is a schematic diagram of another embodiment of a page testing method in the embodiment of the present application;
FIG. 9 is a schematic flow chart diagram illustrating a method for page testing in an embodiment of the present application;
FIG. 10 (a) is a schematic page diagram of a page test method in the embodiment of the present application;
FIG. 10 (b) is another schematic page diagram of the page test method in the embodiment of the present application;
FIG. 11 is a schematic diagram of page test data of a page test method in an embodiment of the present application;
FIG. 12 is another schematic diagram of page test data of the page test method in the embodiment of the present application;
FIG. 13 is a schematic diagram of an embodiment of a page test device in the embodiment of the present application;
FIG. 14 is a schematic diagram of an embodiment of a computer device in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a page testing method, a related device and equipment, which are used for rendering primary page data to obtain a target primary page through page testing data, automatically intercepting a first screenshot of the target primary page, then automatically intercepting a second screenshot of the target secondary page through a target secondary page jumped by the target primary page, and automatically uploading a page screenshot testing result comprising the first screenshot and the second screenshot to a server, so that modification of the page testing data and screenshot of the testing page are not required to be carried out with large labor cost and time cost, and the page testing efficiency is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims and in the drawings of the present application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the method for page testing provided by the present application may be applied to a scenario in which page testing is completed through page testing data, for example, page testing is performed on a video home page picture carousel function of a video application through video page testing data. As another example, the advertisement presentation function of a website home page is page tested, for example, by website page test data. As yet another example, a search page of a search function of a driving application is page tested, such as by page test data. In the above-mentioned various scenes, in order to accomplish the page test, the solution that provides among the prior art is, AB experimental data that returns through the bale plucking tool Mock rear end carries out the verification of functional module, and AB experimental data that the bale plucking tool Mock rear end returns is not necessarily can direct use at the in-process of verifying, and when carrying out second grade page data test, still need to go into the verification etc. after artifical modification that carries out basic data to second grade page data according to AB experimental data, need consume a large amount of human costs and time cost, thereby lead to the efficiency of page test not high.
In order to solve the above problem, the present application provides a method for page testing, which is applied to a page control system shown in fig. 1, please refer to fig. 1, where fig. 1 is an architecture schematic diagram of the page control system in an embodiment of the present application, as shown in the figure, a client receives page test data sent by a server and including a basic field for describing a style of primary page data and secondary page data pre-skipped to the primary page data, a resource field for describing resource contents to be displayed of the primary page data and the secondary page data, and a conversion field for describing a call relationship between the primary page data and the secondary page data, renders the primary page data according to the page test data to obtain a target primary page, performs screenshot processing on the target primary page to obtain a first screenshot, then jumps from the target primary page to the target secondary page, performs screenshot processing on the target secondary page to obtain a second screenshot, and sends a page screenshot test result including the first screenshot and the second screenshot to the server. By the method, the purpose that the target primary page is obtained by rendering the primary page data through the page test data is achieved, the first screenshot of the target primary page can be automatically intercepted, then the target secondary page capable of jumping through the target primary page is automatically intercepted, the second screenshot of the target secondary page is automatically intercepted, the page screenshot test result comprising the first screenshot and the second screenshot is automatically uploaded to the server, the situation that the primary page or the secondary page can be rendered only by modifying the page test data in the page test process through a large amount of input human cost can be avoided, manual screenshot of the primary page or the secondary page is not needed, the input of human cost and time cost can be effectively reduced, and the page test efficiency is improved.
It is understood that, the client is to connect the servers in a communication manner, only one type of client is shown in fig. 1, and in an actual scenario, a greater variety of terminal devices may participate in the process of page testing, such as a Personal Computer (PC), and the specific number and type are determined by the actual scenario and are not limited herein. In addition, fig. 1 shows one server, but in an actual scenario, a plurality of servers may participate, and particularly in a scenario of multi-model training interaction, the number of servers depends on the actual scenario, and is not limited herein.
It should be noted that, in this embodiment, the server may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform. The client may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like.
In order to solve the above problem, the present application proposes a method for page testing, which is generally performed by a server or a terminal device, and accordingly, a device applied to page testing is generally disposed in the server or the terminal device.
Referring to fig. 2 and fig. 9, a method for testing a page in the present application is described below, where an embodiment of the method for testing a page in the present application includes:
in step S101, receiving page test data sent by a server, where the page test data includes a basic field, a resource field, and a conversion field, the basic field is used to describe a style of the first-level page data and second-level page data of pre-jumping of the first-level page data, the resource field is used to describe resource contents to be displayed of the first-level page data and the second-level page data, and the conversion field is used to describe a call relationship between the first-level page data and the second-level page data;
in this embodiment, when a worker such as a Development or a test develops or tests a certain function in a page in advance, the worker may send a network request to the server, for example, a page display test request of a first page advertisement carousel image of a video application program, and specifically, the worker may use a Switch Software Development Kit (Switch sdk) library that is constructed in advance, where the Switch sdk library may be used to obtain page test data and analyze the page test data in a classified manner when the worker starts the Switch sdk library, and may provide an interface to realize functions such as obtaining values of the page test data or calling back the page test data where a corresponding function module performs a page test such as an AB experiment.
The page test data may be specifically represented as AB experimental data or other test data, and is not specifically limited herein. The AB experimental data is test data used for showing different forms when a function is added to a webpage or a page of an application program and multiple (generally two) presentation forms are needed, wherein the AB experimental data includes a group a experimental data and a group B experimental data, and may also include a group C experimental data under the group a experimental data, or a group D experimental data under the group B experimental data, and the like, wherein the group a experimental data and the group B experimental data both include a plurality of switch statements, and similarly, the group C experimental data and the group D experimental data may also include a plurality of switch statements.
For example, it is required to optimize the function of the size of the top page advertisement carousel of a video application, assuming that the page test data of the function is AB experiment data, the AB experiment data includes a group of experiment data that is test data for a carousel size with a single mobile phone end number, and the page a shown in fig. 10 (a) can be obtained through testing the group of experiment data, and the AB experiment data for testing the function further includes a group of experiment data that is test data for a carousel size with a double mobile phone end number, and a page B shown in fig. 10 (B) is obtained, it is understood that, as shown in fig. 10 (a) and fig. 10 (B), A1 may be specifically represented as an advertisement carousel size with a larger size relative to B1, A2 and A3 may be specifically represented as advertisement carousel sizes with a smaller size relative to B2 and B3, where A5 to A9, and B4 and B5 are all displays of page icons, such as a top page, a member center, or a personal center, and the like, and the size is not specifically limited herein.
For example, as shown in fig. 11, the AB experimental data may include a switch version number such as "1.2.1", an application name such as "W video", an application version number such as "9.1.1", a platform for which the switch value is applicable such as "android", a base field, a resource field, and a conversion field, and the like.
As shown in fig. 12, the basic field may be specifically represented as a switch field value of a basic (base) node, where the base node is mainly a switch for describing a style of the primary page data, the secondary page data, or other basic capabilities, for example, the style of the primary page data is described by a "feed _ extended _ type" field, where a value of the field is 2, which may indicate that a style displayed on a feed video stream page is type2. The first-level page data may be specifically represented as page data describing a home page of a web page or an application, or may be other page data, where the first-level page data is not specifically limited, and the second-level page data is next-level page data of the first-level page data, and may be specifically represented as page data of a landing page, where the landing page is not a target page that a visitor finally accesses, but is only an intermediate page guiding the visitor to the target page, and is a first page reached after the visitor clicks elements such as advertisements on the first-level page, and usually, only an outgoing link is provided on the page, and the visitor can link or jump to a corresponding web site or application through the elements such as advertisements on the first-level page, and it can be understood that the landing page is only one of the web sites or the applications.
Further, as shown in fig. 12, the Resource field may be specifically represented as a switch field value of a Resource (Resource) node, and is used to describe the Resource content to be displayed of the primary page data and the secondary page data, where the Resource content to be displayed may be specifically represented as a Resource address or a loaded address, for example, a Resource address of a first page is "http: ccc ", supply stream" xxxx. Zip ", or background icon" xxx. Jpg ", etc. It can be understood that, since values in page test data sent to different user group servers in the online environment may be different, it may be verified through the change of the resource field whether the resource corresponding to the resource field can be normally displayed in the page, or whether the resource error program corresponding to the resource field can normally run and generate a corresponding error prompt, etc.
Further, as shown in fig. 12, the conversion field may specifically be represented as a field value of a common switch (switches) node, and is used to describe a call relationship between the primary page data and the secondary page data, where the call relationship may specifically be represented as a dependency relationship between a switch value of the secondary page data and a switch value of the primary page data, for example, each sub-node in the switches node for describing the secondary page data may have a dependent base switch field value for describing the primary page data, so that in the secondary page data during the test process, a value of a base switch field for describing the primary page data may be indirectly indexed according to a base sub-node included in the switches node, and may be used for an update of the primary page data, and the like, so that classification and dependency relationship of switch statements in the page test data may be made clearer by the conversion field, where the switch value includes the switch and the switch field value.
Specifically, as shown in fig. 9, when a worker needs to test functions of a top search bar, a top navigation bar, or a whole background color, for example, during development or testing, the worker may start the SwitchSDK library, call an interface for obtaining switch data (getswitchdata), and send a page test request to the server, so that the server issues page test data through the switch data interface, and then the server can render the primary page data and the secondary page data according to the obtained page test data, so as to quickly obtain a rendering result, thereby improving efficiency of the page test to a certain extent.
In step S102, rendering the primary page data according to the page test data to obtain a target primary page, and performing screenshot processing on the target primary page to obtain a first screenshot;
in this embodiment, after the page test data is obtained, the first-level page data in the page test data may be read, a plurality of switches and switch field values required for creating one first-level page object may be obtained, then, a graphics context (CoreGraphics) drawing engine may be used to render the first-level page data including the plurality of switches and switch field values, and an automatic screenshot may be performed on a target first-level page obtained by rendering to obtain a first screenshot, without consuming a large amount of human cost to screenshot the target first-level page, so that the efficiency of page testing may be improved to a certain extent.
Wherein, coreGraphics is a high-level drawing engine in the extended-text (Quartz 2D) open source project, and can be used for drawing application development of graphics with various application program platforms. CoreGraphics is a simple encapsulation of the underlying C language in which a large number of low-level, lightweight 2D rendering Application Program (API) interfaces are provided. Core graphics sapi is simple to use and provides powerful functional access, such as transparency, path-based coating rendering, off-screen rendering, advanced color management, anti-aliasing, and generation parsing of PDF documents.
Specifically, as shown in fig. 9, after the page test data is obtained, first-level page data including a plurality of switches and switch field values may be quickly read from the page test data through a read interface, and then, APIs such as API for path-based coating drawing, off-screen presentation, advanced color management and the like provided in CoreGraphics are called to render the read first-level page data, and then, after the rendered target first-level page is presented, automatic screenshot may be performed on the target first-level page through the API for screenshot provided in CoreGraphics, specifically, uiimagepngression function and imageWithData function may be called to generate an UIImage object on the target first-level page, so as to obtain the first screenshot quickly and accurately, and the operations of rendering the first-level page test data and automatic screenshot on the target first-level page may be performed in a process initiated by the CoreGraphics, so that an operation page or a test page of the page test may not be affected, and a large amount of operation pages may be prevented from being loaded due to increase the efficiency of the test efficiency of the first-level page.
In step S103, jumping from the target first-level page to the target second-level page, and performing screenshot processing on the target second-level page to obtain a second screenshot, wherein the target second-level page is obtained by rendering second-level page data according to page test data;
in this embodiment, after the page test data is obtained, the primary page data and the secondary page data may be respectively read from the page test data, a plurality of switches and switch field values required by a primary page object may be obtained, and a plurality of switches and switch field values required by a secondary page object may be created, and then an "initWithTarget" method in an object-oriented operation thread (NSThread) technology may be called, and a target (target) and a method address are introduced to start different sub-threads, and then, the primary page data and the secondary page data are respectively synchronously rendered through a CoreGraphics drawing engine in different sub-threads to obtain a target primary page and a target secondary page, so that a situation that rendering operation which is too time-consuming is performed in a main thread, and a phenomenon that a main thread is easily blocked to cause a card running may be avoided, and a situation that the secondary page data may be rendered only after the primary page data is manually found, and basic data of the secondary page data is modified according to the primary page data may be reduced, thereby improving a degree of efficiency of a page test.
The NSThread technology is based on a thread-used and lightweight multi-thread programming method, wherein one NSThread object represents one thread, and the problems of thread synchronization and the like can be handled by managing the life cycle of the thread.
Furthermore, after a first screenshot is obtained by screenshot of the target primary page through the API provided by the CoreGraphics, the target secondary page can be automatically screenshot by directly jumping from the target primary page to the target secondary page, so that the second screenshot can be quickly obtained, the screenshot of the target secondary page is not required to be performed by calling the API provided by the CoreGraphics again, a large amount of labor cost is consumed for screenshot of the target secondary page, and therefore the page testing efficiency can be improved to a certain extent.
Specifically, as shown in fig. 9, after page test data is obtained, if there are dependent first-level page data and second-level page data in the page test data, and if there is a dependent AB experimental value, the first-level page data and the second-level page data in the page test data may be read respectively, if an AB dependent value is obtained, then different sub-threads are started by calling the NSThread technology, and in different sub-threads, the first-level page data and the second-level page data are rendered synchronously by a CoreGraphics drawing engine, if pages corresponding to the AB experimental value are loaded respectively, a target first-level page and a target second-level page may be obtained, then, after a screenshot API provided by CoreGraphics is used to obtain a first screenshot of the target first-level page, an automatic screenshot may be performed directly from the target first-level page to the target second-level page, so as to obtain a second screenshot quickly, and different page data may be rendered synchronously by multiple threads, so as to avoid a phenomenon of operating a card is avoided, and a large amount of manpower cost is not required to jump to the target first-level page and the target second screenshot may be tested at a certain efficiency.
In step S104, a page screenshot test result including the first screenshot and the second screenshot is sent to the server.
Specifically, after the first screenshot and the second screenshot are obtained, the first screenshot and the second screenshot may be written into log data and stored as a page screenshot test result, specifically, the generated first screenshot and second screenshot may be written into a sandbox directory managed by the SwitchSDK library, and then, the page test result in the log data may be uploaded to the server according to a preset time, where the preset time is set according to an actual application requirement, and may be set to be other times when the page test data sent by the server is received next time, where no specific limitation is made here.
In the embodiment of the application, a page testing method is provided, and through the above manner, the purpose that a target primary page is obtained by rendering primary page data through page testing data is achieved, a first screenshot of the target primary page can be automatically intercepted, then a second screenshot of the target secondary page can be automatically intercepted through a target secondary page jumped by the target primary page, and a page screenshot testing result including the first screenshot and the second screenshot is automatically uploaded to a server, so that the situation that the primary page or the secondary page can be rendered only by modifying the page testing data in the page testing process through a large amount of input of labor cost can be avoided, manual screenshot of the primary page or the secondary page is not needed, the input of labor cost and time cost can be effectively reduced, and the efficiency of page testing is improved.
Optionally, on the basis of the embodiment corresponding to fig. 2, in another optional embodiment of the method for testing a page provided in the embodiment of the present application, as shown in fig. 3, the method further includes:
in step S301, the page test data is parsed into a primary page object and a secondary page object, where the primary page object includes a plurality of primary page key value pairs, the secondary page object includes a plurality of secondary page key value pairs, and the plurality of primary page key value pairs and the plurality of secondary page key value pairs respectively have a corresponding relationship with the base field, the resource field, and the conversion field;
in step S302, a plurality of primary page data key-value pairs and a plurality of secondary page data key-value pairs are stored, where the plurality of primary page data key-value pairs and the plurality of secondary page data key-value pairs have a mapping relationship therebetween.
In this embodiment, after the page test data is obtained, the page test data may be converted into a first-level page Object containing a plurality of first-level page key value pairs and a second-level page Object containing a plurality of second-level page key value pairs in a unified data format through a preset data format, and then, the plurality of first-level page key value pairs and the plurality of second-level page key value pairs may be stored correspondingly, so that a mapping relationship exists between the plurality of first-level page data key value pairs and the plurality of second-level page data key value pairs, so that the computer can read and store the page test data quickly, and thus the efficiency of the page test can be improved to a certain extent.
Wherein, since some of the primary page data may be determined by a plurality of switches and switch values, the plurality of primary page key value pairs may be a plurality of switches and switch field values for indicating the presence of the primary page data. For example, assuming that a primary page a requires switches M, N, and K to determine which style to display, a corresponding primary page object may include descriptions of values of M, N, and K, and similarly, a plurality of secondary page key value pairs are switches and switch field values used for indicating existence of secondary page data.
The plurality of first-level page data key-value pairs or the plurality of second-level page data key-value pairs can be expressed in key names and key value forms, for example, the key name is' key: k _ PageTitleclass ", and the key Value corresponding to the K _ PageTitleclass is" Value:0 or 1", wherein 0 may represent blue, and 1 may represent black, and may be specifically set according to the requirements of the practical application, and is not specifically limited herein.
Specifically, after the page test data is acquired, the first-level page data and the second-level page data in the page test data can be correspondingly converted into a first-level page object which has a plurality of first-level page key value pairs and is convenient to transmit and read according to a json data format, and a second-level page object which comprises a plurality of second-level page key value pairs, then, a lightweight local database (NSUserdefaults) method can be called, the plurality of first-level page key value pairs and the plurality of second-level page key value pairs are correspondingly stored through an object ForKey method and a setObject for ForKey method in the NSUserdefaults, and a mapping relation between the plurality of first-level page key value pairs and the plurality of second-level page key value pairs is established through a dictionary ForKey method in the NSUserdefaults, so that when values in the first-level page object and the second-level page object need to be acquired subsequently, as reading character strings, required value pairs are directly read through the NSUserdefaults, and the efficiency of reading of data files can be improved, and the data files can be read again.
It should be noted that, in order to prevent an error or failure in page testing caused by modification of key values in a plurality of primary page key value pairs and a plurality of secondary page key value pairs by an external user, in this embodiment, a prefix concatenation of a class name and an underline may be performed on a key to obtain a unique key value, so as to maintain that the key value is not easily modified.
For example, the Key value "Key: the K _ PageTitleClass ' is obtained by splicing the class name ' PageTitleClass ' of the page title with the underlined prefix ' K '.
Optionally, on the basis of the embodiment corresponding to fig. 3, in another optional embodiment of the method for page testing provided in the embodiment of the present application, as shown in fig. 4, rendering the primary page data according to the page test data to obtain target primary page data includes:
in step S401, reading a plurality of primary page data key-value pairs;
in step S402, generating primary page data according to a plurality of primary page data key-value pairs;
in step S403, the primary page data is rendered to obtain a target primary page.
In this embodiment, after analyzing the acquired page test data into a plurality of primary page key-value pairs and a plurality of secondary page key-value pairs and correspondingly storing the plurality of primary page key-value pairs and the plurality of secondary page key-value pairs, an enumeration value provided in the SwitchSDK library, such as a field name of base, resource, switch, and the like, may be used to directly read the plurality of primary page data key-value pairs, and then, primary page data that can be used to create a primary page may be generated by the read plurality of primary page data key-value pairs, and then, a sub-thread may be opened by using an NSThread technology, and a CoreGraphics drawing engine may be invoked in the sub-thread to render the primary page data, thereby obtaining a target primary page.
Wherein each thread in the NSThread technique maintains a dictionary of key-value pairs that can be accessed anywhere within the thread, enabling the information in the dictionary to remain unchanged throughout the execution of the thread.
Specifically, as shown in fig. 9, after analyzing the acquired page test data into a plurality of primary page key value pairs and a plurality of secondary page key value pairs and correspondingly storing the plurality of primary page key value pairs and the plurality of secondary page key value pairs, the primary page data which can be used for creating the primary page can be generated by directly finding the key values matched with the field names from the nsuserfaults according to the field names such as base, resource, switch and the like provided in the SwitchSDK library through a read interface and directly reading the key values corresponding to the matched keys, then, since one sub-thread can be opened by using the NSThread technology and a CoreGraphics drawing engine can be called in the thread to render the primary page data to obtain a target primary page, the primary page data which is required for quickly and accurately creating the primary page can be generated from the nsuserfaults through the preset field names of enumerated values, the time for reading the primary page data can be saved, and the primary page data can be rendered by a single sub-thread, thereby improving the efficiency of the page test, and the efficiency of the primary page can be improved.
Optionally, on the basis of the embodiment corresponding to fig. 4, in another optional embodiment of the method for testing a page provided in the embodiment of the present application, as shown in fig. 5, rendering the primary page data to obtain a target primary page includes:
in step S501, performing initial rendering on each page element in the primary page data to obtain a context stack object corresponding to each page element;
in step S502, coordinate drawing is performed on the context stack object to obtain static coordinate data of the context stack object;
in step S503, if the page element has the dynamic attribute parameter, the static coordinate data and the dynamic attribute parameter are loaded to obtain the target first-level page.
In this embodiment, after the primary page data is obtained, a screenshot drawing operation may be performed on the primary page data by calling a child thread started by using an NSThread technology, specifically, a CoreGraphics drawing engine may perform an initialization rendering on each page element in the primary page data, a context stack object (context) formed by each page element may be obtained, and then, a coordinate drawing may be performed on the context stack object to obtain static coordinate data, such as long, wide, high, and the like, which can be used to determine the size and the coordinates of each page element in the primary page data.
Specifically, after the primary page data is acquired, a rendering environment of each page element in the acquired primary page data can be initialized by calling a uigraphics getcurrentcontext () function in a CoreGraphics drawing engine in an open sub-thread, a context of a current rendering environment of the primary page data, that is, a context stack object corresponding to each page element, can be acquired, and further, a state machine of the current rendering environment of the primary page data is generated by calling a cgcontextsavestate function, the state machine can be used for storing a context of the current rendering environment of the primary page data, and then, by calling a cgcontexttransfatec function, calculation and generation of element information can be performed on each page element of the primary page data, and horizontal coordinate value x, vertical coordinate value y, width, and high-level information of each page element (such as page elements like buttons, pictures, characters, input boxes and the like) can be acquired, and then, a cgextconcatatm can be called to execute a page element having a dynamic ctparameter, and display the rendering effect of some page elements, and the rendering effect of the primary page data can be acquired by calling a rendering environment of the primary page rendering window rendering function, and the rendering effect of the primary page data can be displayed by calling a cgextinct function.
It is understood that the manner of rendering the secondary page data to obtain the target secondary page is similar to the manner of rendering the primary page data to obtain the target primary page in steps S501 to S503, and it is not redundant here.
Optionally, on the basis of the embodiment corresponding to fig. 3, in another optional embodiment of the method for testing a page provided in the embodiment of the present application, as shown in fig. 6, the method further includes:
in step S601, if the secondary page data key value has a timing update key value pair, determining a primary page key value pair to be updated in the target primary page according to a mapping relationship between the primary page data key value pair and the secondary page data key value;
in step S602, the key values of the primary pages to be updated are indexed according to the timing update key value pairs, and the target primary page data is re-rendered according to the key values of the primary pages to be updated, so as to obtain re-rendered target primary pages;
in step S603, performing screenshot on the re-rendered target primary page to obtain a third screenshot;
in step S604, a page screenshot test result including the third screenshot is sent to the server.
In this embodiment, in the process of rendering the secondary page data, if the secondary page data key value in the secondary page data has a timing update key value pair, the timing update key value pair may specifically be determined by a "base: feed _ extended _ type "and" reloadTime:10", and determining a primary page key value pair to be updated in the target primary page according to a mapping relationship between the primary page data key value pair and the secondary page data key value, where the primary page key value pair to be updated may specifically be a" feed _ extended _ type included in a "base" switch node as shown in fig. 12: and 2' analyzing and obtaining, indexing from the timing update key value pair to a primary page key value to be updated at regular time according to the timing value in the timing update key value pair, re-rendering target primary page data according to the primary page key value pair to be updated to obtain a re-rendered target primary page, and realizing timing update of the target primary page.
Specifically, when the secondary page data is rendered to obtain a target secondary page, if some event is generated on the target secondary page and the target primary page needs to be updated, the target primary page may be updated at regular time by analyzing a reloadable time field to obtain a timing update key value pair, specifically, a time period set by the reloadable time field, such as 10s or 10min, may be specifically set according to an actual application requirement, where no specific limitation is imposed, and the key value of the primary page to be updated is indexed according to the timing update key value pair, for example, a value corresponding to the target primary page, such as "feed _ extend _ type", is indexed first by a field value of "feed _ extend _ type" corresponding to the reloadable time: 2', then, a CoreGraphic drawing engine can be called to re-render the target primary page according to the value, the re-rendered target primary page can be obtained, then, the target primary page is converted into an UIImage object, a third screenshot is obtained, then, a page screenshot test result containing the third screenshot can be sent to the server, regular updating, rendering, screenshot and the like of the target primary page can be achieved through regular updating of the key value pair, the page screenshot test result of the target primary page can be fully obtained, the accuracy of the target primary page test can be improved, and therefore the reliability of the page test can be improved to a certain extent.
Optionally, on the basis of the embodiment corresponding to fig. 2, in another optional embodiment of the method for page testing provided in the embodiment of the present application, as shown in fig. 7, the method further includes:
in step S701, performing rendering time statistics on the primary page data to obtain a first rendering time, and performing rendering time statistics on the secondary page data to obtain a second rendering time;
in step S702, a page screenshot test result including the first rendering time, the second rendering time, the first screenshot and the second screenshot is sent to the server.
In this embodiment, after the primary page data and the secondary page data are obtained, different sub-threads are started through an NSThread technology, and the primary page data and the secondary page data are rendered respectively, and meanwhile, the rendering time of the primary page data and the rendering time of the secondary page data can be counted respectively, corresponding first rendering time and second rendering time can be obtained, and then the first rendering time, the second rendering time, the first cut and the second cut can be included in a page cut test result and uploaded to a server, so that the page test efficiency of a target primary page and a target secondary page can be reflected visually and accurately through the duration of the first rendering time and the second rendering time, and a worker who develops or tests can obtain a page test effect accurately.
Specifically, when different sub-threads are started through the NSThread technology, and the obtained primary page data and secondary page data are rendered through the CoreGraphics drawing engine in different sub-threads, a time statistics tool provided by the SwitchSDK library can be used for performing statistics on the loading time of the rendering time of the primary page data and the rendering time of the secondary page data, respectively.
Optionally, on the basis of the embodiment corresponding to fig. 2, in another optional embodiment of the method for testing a page provided in the embodiment of the present application, as shown in fig. 8, the method further includes:
in step S801, if it is detected that a page element display failure exists in the target primary page or the target secondary page, an error prompt is generated according to the page element that has failed to display;
in step S802, a page screenshot test result including an error prompt, a first screenshot, and a second screenshot is sent to the server.
In this embodiment, after a target primary page and a target secondary page are obtained, the target primary page and the target secondary page may be respectively compared with a first screenshot and a second screenshot through a primary page image and a secondary page image preset in a resource error program, if there are page elements that are displayed inconsistently or page elements that cannot be displayed, it may be determined that the page elements are displayed unsuccessfully, an error prompt may be generated according to the page elements that are displayed unsuccessfully through the resource error program, and may be used to reflect whether the resource error program can operate normally, and then the error prompt, the first screenshot and the second screenshot may be included in a page screenshot test result and uploaded to a server, so that a worker who subsequently may prompt development or test and the like according to the error prompt may timely modify and maintain the page test data, thereby improving the efficiency of the page test to a certain extent.
Specifically, after a target primary page and a target secondary page are obtained, and a first screenshot and a second screenshot are obtained through a CoreGraphics drawing engine, it may be detected that a page element display failure exists in the target primary page or the target secondary page, specifically, the first screenshot and the second screenshot may be compared with a preset primary page image and a preset secondary page image, respectively, where the preset primary page image and the preset secondary page image are drawn according to actual application requirements, there is no specific limitation here, when the page elements in the first screenshot and the second screenshot are both capable of being displayed and are consistent with display effects in the preset primary page image and the preset secondary page image, it may be understood that the page elements in the first screenshot and the second screenshot are not consistent with display effects in the preset primary page image and the preset secondary page image, there is no resource error, or when the page elements in the first screenshot and the second screenshot are consistent with display effects in the preset primary page image and the preset secondary page image, if the page elements in the first screenshot and the second screenshot are inconsistent with display effects in the preset primary page image and the preset secondary page image, there may be no resource error, or the screenshot may be generated by a server, and the server may prompt that the page element display failure of the page element, and the resource error, and the page.
Referring to fig. 13, fig. 13 is a schematic diagram of an embodiment of a page testing apparatus 20 according to the present application, which includes:
the acquiring unit 201 is configured to receive page test data sent by a server, where the page test data includes a basic field, a resource field, and a conversion field, the basic field is used to describe a style of primary page data and secondary page data of pre-skipping of the primary page data, the resource field is used to describe the primary page data and content of a resource to be displayed of the secondary page data, and the conversion field is used to describe a call relationship between the primary page data and the secondary page data;
the processing unit 202 is configured to render the primary page data according to the page test data to obtain a target primary page, and perform screenshot processing on the target primary page to obtain a first screenshot;
the processing unit 202 is further configured to jump from the target first-level page to the target second-level page, and perform screenshot processing on the target second-level page to obtain a second screenshot, where the target second-level page is obtained by rendering second-level page data according to page test data;
and the sending unit 203 is configured to send a page screenshot test result including the first screenshot and the second screenshot to the server.
Optionally, on the basis of the embodiment corresponding to fig. 13, in another embodiment of the apparatus for page testing provided in the embodiment of the present application,
the processing unit 202 is further configured to parse the page test data into a primary page object and a secondary page object, where the primary page object includes a plurality of primary page key-value pairs, the secondary page object includes a plurality of secondary page key-value pairs, and the plurality of primary page key-value pairs and the plurality of secondary page key-value pairs respectively have a corresponding relationship with the base field, the resource field, and the conversion field;
the storage unit 204 is configured to store the plurality of primary page data key-value pairs and the plurality of secondary page data key-value pairs, where the plurality of primary page data key-value pairs and the plurality of secondary page data key-value pairs have a mapping relationship.
Optionally, on the basis of the embodiment corresponding to fig. 13, in another embodiment of the device for page testing provided in the embodiment of the present application, the processing unit 202 may be specifically configured to:
reading a plurality of first-level page data key value pairs;
generating primary page data according to the plurality of primary page data key value pairs;
and rendering the first-level page data to obtain a target first-level page.
Optionally, on the basis of the embodiment corresponding to fig. 13, in another embodiment of the device for page testing provided in the embodiment of the present application, the processing unit 202 may be specifically configured to:
performing initialization rendering on each page element in the first-level page data to obtain a context stack object corresponding to each page element;
drawing coordinates of the context stack object to obtain static coordinate data of the context stack object;
and if the page element has the dynamic attribute parameter, loading the static coordinate data and the dynamic attribute parameter to obtain a target first-level page.
Optionally, on the basis of the embodiment corresponding to fig. 13, in another embodiment of the apparatus for page testing provided in the embodiment of the present application,
a determining unit 205, configured to determine, if the secondary page data key value has a timing update key value pair, a primary page key value pair to be updated in the target primary page according to a mapping relationship between the primary page data key value pair and the secondary page data key value pair;
the processing unit 202 is further configured to index to the primary page key-value pair to be updated according to the timing update key-value pair, and re-render the target primary page data according to the primary page key-value pair to be updated, so as to obtain a re-rendered target primary page;
the processing unit 202 is further configured to perform screenshot on the re-rendered target primary page to obtain a third screenshot;
and the sending unit 203 is further configured to send a page screenshot test result including the third screenshot to the server.
Optionally, on the basis of the embodiment corresponding to fig. 13, in another embodiment of the apparatus for page testing provided in the embodiment of the present application,
the processing unit 202 is further configured to perform rendering time statistics on the primary page data to obtain a first rendering time, and perform rendering time statistics on the secondary page data to obtain a second rendering time;
the processing unit 202 may specifically be configured to: and sending a page screenshot test result comprising the first rendering time, the second rendering time, the first screenshot and the second screenshot to the server.
Optionally, on the basis of the embodiment corresponding to fig. 13, in another embodiment of the apparatus for page testing provided in the embodiment of the present application,
the processing unit 202 is further configured to generate an error prompt according to a page element that is failed to be displayed if it is detected that a page element display failure exists in the target primary page or the target secondary page;
the processing unit 202 may specifically be configured to: and sending a page screenshot test result comprising an error prompt, a first screenshot and a second screenshot to the server.
In another aspect, as shown in fig. 14, fig. 14 is a schematic structural diagram of a computer device provided in this embodiment, and the computer device 300 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) storing an application 331 or data 332. Memory 320 and storage media 330 may be, among other things, transient or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a sequence of instructions operating on the computer device 300. Still further, the central processor 310 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.
The computer device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input-output interfaces 360, and/or one or more operating systems 333, such as a Windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM ,FreeBSD TM And so on.
The computer device 300 described above is also used to perform the steps in the embodiments corresponding to fig. 2 to 8.
Another aspect of the present application provides a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the steps in the method as described in the embodiments shown in fig. 2 to 8.
Another aspect of the application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the steps of the method as described in the embodiments shown in fig. 2 to 8.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.

Claims (10)

1. A method for page testing, comprising:
receiving page test data sent by a server, wherein the page test data comprises a basic field, a resource field and a conversion field, the basic field is used for describing the style of primary page data and secondary page data of pre-jump of the primary page data, the resource field is used for describing the primary page data and the content of resources to be displayed of the secondary page data, and the conversion field is used for describing the call relationship between the primary page data and the secondary page data;
rendering the primary page data according to the page test data to obtain a target primary page, and performing screenshot processing on the target primary page to obtain a first screenshot;
skipping from the target primary page to the target secondary page, and performing screenshot processing on the target secondary page to obtain a second screenshot, wherein the target secondary page is obtained by rendering the secondary page data according to the page test data;
and sending a page screenshot test result comprising the first screenshot and the second screenshot to the server.
2. The method of claim 1, wherein before rendering the primary page data according to the page test data to obtain a target primary page, the method further comprises:
analyzing the page test data into a primary page object and a secondary page object, wherein the primary page object comprises a plurality of primary page key value pairs, the secondary page object comprises a plurality of secondary page key value pairs, and the plurality of primary page key value pairs and the plurality of secondary page key value pairs respectively have corresponding relations with the basic field, the resource field and the conversion field;
and storing the plurality of primary page data key-value pairs and the plurality of secondary page data key-value pairs, wherein the plurality of primary page data key-value pairs and the plurality of secondary page data key-value pairs have a mapping relation.
3. The method of claim 2, wherein the rendering the primary page data according to the page test data to obtain target primary page data comprises:
reading the plurality of primary page data key-value pairs;
generating the primary page data according to the plurality of primary page data key value pairs;
rendering the primary page data to obtain the target primary page.
4. The method of claim 3, wherein said rendering the primary page data to obtain the target primary page comprises:
performing initialization rendering on each page element in the primary page data to obtain a context stack object corresponding to each page element;
drawing coordinates of the context stack object to obtain static coordinate data of the context stack object;
and if the page element has the dynamic attribute parameter, loading the static coordinate data and the dynamic attribute parameter to obtain the target first-level page.
5. The method of claim 2, wherein after the jumping from the target primary page to the target secondary page and performing screenshot processing on the target secondary page to obtain a second screenshot, the method further comprises:
if the secondary page data key value has a timing updating key value pair, determining a primary page key value pair to be updated in the target primary page according to the mapping relation between the primary page data key value pair and the secondary page data key value pair;
indexing to the primary page key value pair to be updated according to the timing updating key value pair, and re-rendering the target primary page data according to the primary page key value pair to be updated to obtain a re-rendered target primary page;
performing screenshot on the re-rendered target primary page to obtain a third screenshot;
and sending a page screenshot test result comprising the third screenshot to the server.
6. The method of claim 1, wherein prior to sending a page shot test result comprising the first shot and the second shot to the server, the method further comprises:
performing rendering time statistics on the primary page data to obtain first rendering time, and performing rendering time statistics on the secondary page data to obtain second rendering time;
the sending, to the server, a page screenshot test result including the first screenshot and the second screenshot includes:
and sending a page screenshot test result comprising the first rendering time, the second rendering time, the first screenshot and the second screenshot to the server.
7. The method of claim 1, wherein prior to sending a page shot test result comprising the first shot and the second shot to the server, the method further comprises:
if the page element display failure exists in the target primary page or the target secondary page, generating an error prompt according to the page element with the display failure;
the sending, to the server, a page screenshot test result including the first screenshot and the second screenshot includes:
and sending a page screenshot test result comprising the error prompt, the first screenshot and the second screenshot to the server.
8. An apparatus for page testing, comprising:
the system comprises an acquisition unit and a conversion unit, wherein the acquisition unit is used for receiving page test data sent by a server, the page test data comprises a basic field, a resource field and a conversion field, the basic field is used for describing the style of primary page data and secondary page data of pre-jump of the primary page data, the resource field is used for describing the to-be-displayed resource content of the primary page data and the secondary page data, and the conversion field is used for describing the calling relationship between the primary page data and the secondary page data;
the processing unit is used for rendering the primary page data according to the page test data to obtain a target primary page, and performing screenshot processing on the target primary page to obtain a first screenshot;
the processing unit is further configured to jump from the target primary page to the target secondary page, and perform screenshot processing on the target secondary page to obtain a second screenshot, where the target secondary page is obtained by rendering the secondary page data according to the page test data;
and the sending unit is used for sending a page screenshot test result comprising the first screenshot and the second screenshot to the server.
9. A computer device, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor, when executing the program in the memory, implementing the method of any one of claims 1 to 7;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
10. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 7.
CN202110939116.1A 2021-08-16 2021-08-16 Page testing method, related device and equipment Pending CN115705272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110939116.1A CN115705272A (en) 2021-08-16 2021-08-16 Page testing method, related device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110939116.1A CN115705272A (en) 2021-08-16 2021-08-16 Page testing method, related device and equipment

Publications (1)

Publication Number Publication Date
CN115705272A true CN115705272A (en) 2023-02-17

Family

ID=85181272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110939116.1A Pending CN115705272A (en) 2021-08-16 2021-08-16 Page testing method, related device and equipment

Country Status (1)

Country Link
CN (1) CN115705272A (en)

Similar Documents

Publication Publication Date Title
US11741002B2 (en) Test automation systems and methods using logical identifiers
CN110955409B (en) Method and device for creating resources on cloud platform
CN113018870A (en) Data processing method and device and computer readable storage medium
CN113485927A (en) Test data generation method, device, equipment and storage medium
CN112187713A (en) Message conversion method, device, computer equipment and storage medium
CN111831277B (en) Virtual data generation method, system, device and computer readable storage medium
CN114265657A (en) Method and device for displaying page of applet
CN111597102A (en) Page performance testing method, terminal and storage medium
CN113268221A (en) File matching method and device, storage medium and computer equipment
CN117762519A (en) Component management method, device, computer equipment and storage medium
CN116756016A (en) Multi-browser testing method, device, equipment, medium and program product
CN115118687B (en) Message pushing method and device, storage medium and computer equipment
CN107767434B (en) Method for acquiring texture mapping configuration information in virtual reality technology and storage medium
CN115827457A (en) Browser compatibility testing method and related equipment
US20140304690A1 (en) Systems and Methods for Outputting an Application to Another Environment
CN115705272A (en) Page testing method, related device and equipment
CN113419738A (en) Interface document generation method and device and interface management equipment
CN113961279A (en) Page rendering method, device, server and storage medium
CN116755684B (en) OAS Schema generation method, device, equipment and medium
CN112765040B (en) Page test method, system, computer equipment and storage medium
CN111638903B (en) Method and device for generating difference information of different software versions
US20240176728A1 (en) Plug and play language acceptance testing
CN117649459A (en) Image drawing method, data generating method and device
CN115543807A (en) Automatic regression testing method and device, computer equipment and storage medium
CN114968238A (en) Chart drawing method, device, equipment and computer readable 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