Automatic testing method, device and equipment for application page building process

By automatically obtaining test data and running preconfigured code, automatic testing of the application page building process is realized, which solves the problem of low manual testing efficiency and improves test coverage and user experience.

CN112115057BActive Publication Date: 2024-09-20JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011019570.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-24
Publication Date
2024-09-20
Estimated Expiration
2040-09-24

AI Technical Summary

Technical Problem

In the existing technology, the testing of the application page building process relies on manual operations, which is inefficient and cannot fully cover different user identities within a limited time, resulting in reduced user experience.

Method used

By obtaining test data, including the page data acquisition path, user identification and constraints, automatically obtain the page data corresponding to the user identification, and run the preconfigured test code, using the page data and constraints to automatically test the application page building process .

Benefits of technology

The test speed and efficiency are improved. The number of user IDs that can be tested within a certain period of time is more than manual testing, covering a wider range of users, and improving the test coverage of the application page building process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112115057B
    Figure CN112115057B
Patent Text Reader

Abstract

The present application relates to an automatic testing method, device and equipment for an application page building process, the method comprising: first obtaining a page data acquisition path, a user identifier and constraints, then obtaining page data corresponding to the user identifier based on the user identifier and the page data acquisition path, and then running a pre-configured test code, and then using the page data and constraints to test the application page building process. Based on this, the page data corresponding to the user identifier can be automatically obtained using the test data, so that the application page building process can be automatically tested according to the page data and constraints using the test code. Compared with the manual testing process, the speed of automatic testing can be greatly improved. Within a certain test cycle, the number of user identifiers that can be tested by the automatic testing method of the present application increases, and the test of the application page building process using the method of the present application can cover a wider range of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to an automatic testing method, device and equipment for an application page building process. Background Art

[0002] During the application startup process, the page building system is often used to build each page in the application. Generally, when building a page, the page building system will obtain one or more page templates that need to be built in the page according to the page identifier, and then obtain data that meets the user portrait according to the data source link and user identifier contained in each page template, so as to display it in the application.

[0003] In the related art, before displaying the relevant data, the page template often determines whether the data to be displayed meets the pre-set constraints. If it does, it will be displayed; if it does not, it will not be displayed and an alarm will be issued. Before the application is launched, it will undergo software testing to test whether there will be vulnerabilities during its operation. There will also be corresponding tests for the page building process of the application. However, the acquired data will often fail to meet the constraints and issue an alarm due to problems with user portraits or the number of data sources themselves. At present, the testing of the page building process only relies on manual testing of the page building of different user IDs. Manual testing is time-consuming and inefficient. In the limited test cycle, only some user IDs can be used for testing, and the user coverage is incomplete. Summary of the invention

[0004] In order to overcome the problems existing in the related art to at least a certain extent, the present application provides an automatic testing method, device and equipment for an application page building process.

[0005] According to a first aspect of the present application, a method for automatically testing an application page building process is provided, the method comprising:

[0006] Acquire test data, wherein the test data includes a page data acquisition path, a user identifier, and a constraint condition;

[0007] Based on the user identifier and the page data acquisition path, acquiring page data corresponding to the user identifier;

[0008] The preconfigured test code is run to test the application page building process using the page data and the constraint conditions.

[0009] Optionally, obtaining test data includes:

[0010] The test data is acquired periodically, wherein the user identifier acquired in each period is different.

[0011] Optionally, before running the preconfigured test code, the method further includes:

[0012] Based on the mapping relationship between the constraint condition and the preconfigured test code, and the constraint condition, the preconfigured test code is acquired.

[0013] Optionally, the test data includes a page building code for building an application page, the page building code includes the page data acquisition path, and the method further includes:

[0014] Sending the page building code to a preset operating environment, so as to use the page building code to build the application page in the preset operating environment;

[0015] The abnormal data reported in the process of building the application page is captured using a preset packet capture tool, so as to test the abnormal reporting situation in the process of building the application page according to the abnormal data.

[0016] Optionally, after sending the page building code to a preset operating environment so as to use the page building code to build the application page in the preset operating environment, the method further includes:

[0017] Obtaining page white screen parameters returned during the process of building the application page;

[0018] Determine whether an abnormal white screen situation occurs during the process of building the application page according to the page white screen parameters, and issue an alarm prompt when the abnormal white screen situation occurs.

[0019] According to a second aspect of the present application, there is provided an automatic testing device for an application page building process, the device comprising:

[0020] A first acquisition module, used to acquire test data, wherein the test data includes a page data acquisition path, a user identifier, and a constraint condition;

[0021] A second acquisition module, configured to acquire page data corresponding to the user identifier based on the user identifier and the page data acquisition path;

[0022] The automatic testing module is used to run the pre-configured test code and test the application page building process using the page data and the constraint conditions.

[0023] Optionally, the first acquisition module includes:

[0024] The first acquisition unit is used to periodically acquire test data, wherein the user identifier acquired in each period is different.

[0025] Optionally, the device further comprises:

[0026] The third acquisition module is used to acquire the preconfigured test code based on the mapping relationship between the constraint condition and the preconfigured test code, and the constraint condition.

[0027] Optionally, the test data includes a page building code for building an application page, the page building code includes the page data acquisition path, and the device further includes:

[0028] A sending module, used for sending the page building code to a preset operating environment, so as to use the page building code to build the application page in the preset operating environment;

[0029] The data capture module is used to capture the abnormal data reported in the process of building the application page by using a preset packet capture tool, so as to test the abnormal reporting situation in the process of building the application page according to the abnormal data.

[0030] Optionally, the device further comprises:

[0031] A fourth acquisition module is used to obtain a page white screen parameter returned during the process of building the application page;

[0032] The determination module is used to determine whether an abnormal white screen situation occurs during the process of building the application page according to the page white screen parameters, and to issue an alarm prompt when the abnormal white screen situation occurs.

[0033] According to a third aspect of the present application, there is provided an automatic testing device for an application page building process, comprising: at least one processor and a memory;

[0034] The processor is used to execute the automatic testing program of the application page building process stored in the memory to implement the automatic testing method of the application page building process described in the first aspect of the present application.

[0035] The technical solution provided by the present application may include the following beneficial effects: the present application first obtains test data, wherein the test data includes a page data acquisition path, a user identifier and constraints, and then obtains the page data corresponding to the user identifier based on the user identifier and the page data acquisition path, and then runs the pre-configured test code, and then uses the page data and constraints to test the application page building process. Based on this, the page data corresponding to the user identifier can be automatically obtained using the test data, so that the application page building process can be automatically tested according to the page data and constraints using the test code. Since the process of page data acquisition and testing using the test code are all automatically performed based on the solution of the present application, compared with the process of manual testing, the speed of the test can be greatly improved, and the efficiency is also correspondingly improved. Within a certain test cycle, the number of user identifiers that can be tested by the automatic testing method of the present application must be more than the number of user identifiers that can be tested by manual testing in the prior art. The test of the application page building process using the method of the present application can cover a wider range of users.

[0036] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] Figure 1 It is a flowchart of an automatic testing method for an application page building process provided by an embodiment of the present application;

[0039] Figure 2 It is a schematic diagram of a test process for reporting abnormal data in an application page building process provided by another embodiment of the present application;

[0040] Figure 3 It is a flowchart of a white screen test in an application page building process provided by another embodiment of the present application;

[0041] Figure 4 It is a structural schematic diagram of an automatic testing device for an application page building process provided by another embodiment of the present application;

[0042] Figure 5 It is a structural diagram of an automatic testing device for an application page building process provided by another embodiment of the present application. DETAILED DESCRIPTION

[0043] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0044] In order to facilitate the understanding of the solution of the present application, the application page building process mentioned in the present application is explained. Generally, the application page building process is implemented by the application page building system. In the related technology, the application page is often composed of multiple components. For example, for the common "home page", it may be composed of a user information component for displaying basic user information, a recommendation component for recommending active products, etc. When building the "home page", the components that need to be displayed on the "home page" will be obtained from the application page building system, and then these components will be loaded. Since the underlying code of each component will contain some data acquisition paths (that is, the data acquisition path for the data that needs to be displayed in the component), in the process of loading the component, the corresponding data will be obtained through the data acquisition path, and then displayed on the page.

[0045] In the field of page building technology, since the building process is similar to the Lego building process and is modular, in the field of page building technology, the application page building system will be called the Lego system, and the above components will be called Lego templates.

[0046] In addition, in order to meet the business needs of application developers, each Lego template will involve corresponding constraints when loading. When loading the Lego template, the Lego template will obtain the corresponding data according to the data acquisition path involved in its underlying layer (in order to make the application page display content more personalized, the user ID will be added to the data request when obtaining the data, so that data with a certain correspondence with the user ID can be obtained, that is, data is recommended according to the user portrait corresponding to the user ID). At this time, it will be judged whether the obtained data meets the constraints. For example, the data is brief information of two insurances that need to be displayed on the page (the reason for only two insurances here may be that there are only two insurances suitable for the user portrait in the insurance type library, or there may be only two valid insurances in the insurance type library, or other situations, etc.), and the constraint is to display at least 4 insurances on the page. At this time, the obtained data obviously cannot meet the constraint. If the constraint is not met, the Lego template will not be displayed on the page (it will be displayed if it is met). At the same time, the situation that does not meet the constraint will be regarded as an abnormal situation and reported.

[0047] In the prior art, the testing of Lego templates often relies on manual testing methods with slow testing speed. Within a limited testing cycle, the efficiency of manual testing is relatively low, and the number of user identifiers that can be tested will be reduced accordingly. This will result in the inability to comprehensively cover users with different portraits during the testing process. As a result, after the application is launched, a large number of users may not be able to display the data that needs to be displayed when opening the page because the constraints do not meet the constraints, which will reduce the user experience.

[0048] In order to solve the above technical problems, this application uses the data acquisition path involved in the underlying code of the Lego template to directly obtain the corresponding data, and uses pre-configured test code to determine whether the acquired data meets the constraints, thereby realizing automatic testing of the application page building process, which is explained below in the form of an embodiment.

[0049] See also Figure 1 , Figure 1 It is a flowchart of an automatic testing method for an application page building process provided by an embodiment of the present application.

[0050] As shown in 1, the automatic testing method for the application page building process provided in this embodiment may include:

[0051] Step S101: Acquire test data, where the test data includes a page data acquisition path, a user identifier, and constraint conditions.

[0052] Among them, in this step, the way to obtain the test data can be through a human-computer interaction interface, for example, the relevant test data can be manually input into the human-computer interaction interface to achieve the purpose of obtaining the test data. Of course, since software testing itself is a repetitive process, each test process may involve repeated data, such as the page data acquisition path and constraints in this step. Therefore, the data can be directly integrated into a certain memory, and the human-computer interaction interface displays the name or logo of each type of data, which is manually checked in the human-computer interaction interface, so that when obtaining the test data, the corresponding data can be obtained from the memory according to the checked name or logo.

[0053] It should be noted that the page data acquisition path can be a path for acquiring page data, such as a network address, a storage path, etc. Page data refers to the data that needs to be displayed in the application page, and the data can be a numerical value, an icon, a picture, etc. In addition, the user ID can be an ID used to distinguish different users. Generally speaking, each user will have a unique user ID. Since current applications display data according to different user portraits to adapt the application to the personalized needs of each user, and the user portrait is often mapped to the user ID, when acquiring data through the page data acquisition path, the corresponding user portrait will be found according to the user ID, and then other platforms will recommend page data based on the user portrait.

[0054] In this embodiment, the page data acquisition path can be the path involved in the underlying code of the Lego template. In order to simplify the manual workload involved in the automatic testing process of this embodiment, the underlying code can be directly copied to the aforementioned human-computer interaction interface. Since the function of the underlying code itself is to obtain the data to be displayed by the Lego template, the Lego template can be directly run during the test to obtain the page data. The constraints obtained in this step are the conditions that the Lego template needs to meet in order to be presented. For the specific description of the constraints, please refer to the aforementioned content.

[0055] It should be noted that the automatic testing method of this embodiment can realize automatic testing of different Lego templates based on a large number of different user identifiers. Therefore, in this step, the page data acquisition path obtained can be the path involved in different Lego templates, and the user identifier can be a large number of user identifiers. When specifically executed, for a certain Lego template, different user identifiers can be polled.

[0056] In order to reduce the pressure of data processing during the test, the test data can also be obtained periodically, wherein the user identification obtained in each cycle is different. In a specific example, for example, there are 100 user identifications in total, and this step can divide the user identifications into 5 batches, each batch of 20, first obtain 20 user identifications, and then after the polling is completed, that is, the test process of this cycle is completed, another 20 user identifications are obtained, and then the test process is repeated until all 100 user identifications are obtained.

[0057] Step S102: based on the user identifier and the page data acquisition path, acquire the page data corresponding to the user identifier.

[0058] In this step, there can be multiple processes for obtaining page data. Since it is necessary to obtain data suitable for the user portrait based on the user portrait corresponding to the user identifier during the acquisition, if the page data in this step is to be obtained, it is necessary to find the user portrait corresponding to the user identifier. The process of obtaining the user portrait can be implemented by the processor that executes the method of this embodiment, and can also be implemented by other platforms that communicate with the processor of this embodiment (such as a policy platform for targeted recommendation data).

[0059] If implemented by a processor executing the method of this embodiment, this step may include first matching the corresponding user portrait according to the user identifier, and then obtaining the page data matching the user portrait according to the page data acquisition path according to the user portrait. In a specific example, the mapping relationship between the user identifier and the user portrait is pre-stored, wherein the user portrait may be specifically expressed as a label matching the user's daily behavior, such as "games", "takeout", "online shopping" and other labels. According to the above labels, the page data that adapts to these labels can be selected through the page data acquisition path. For example, the Lego template tested at this time is a template for advertising, then the obtained page data may be an icon link of some games or an icon link directly to a takeaway platform, etc.

[0060] If you need to rely on the aforementioned policy platform to obtain page data, then in this step, you can first send the user ID and the page data acquisition path to the policy platform, and then the policy platform will match the corresponding user portrait according to the user ID, and then select the page data that suits the user portrait through the page data acquisition path, and finally return the page data. It should be noted that the process of obtaining page data according to the user portrait can refer to the aforementioned related description of the tag, which will not be repeated here.

[0061] Step S103: Run the pre-configured test code and test the application page building process using the page data and constraints.

[0062] In this step, the test code refers to the code used to test whether the page data meets the constraint conditions. For example, the constraint condition is at least 4 advertisement data, and the obtained page data contains 2 advertisement data. The preconfigured test code is used to compare the number in the page data with the number in the constraint condition to obtain the test result.

[0063] It should be noted that the preconfigured test code refers to the test code corresponding to the constraint condition. Since the constraint conditions corresponding to different Lego templates may be different, different test codes need to be preconfigured in the face of different constraint conditions. In one example, each constraint condition will correspond to a test code. Therefore, before this step, the method of this embodiment may also include a process of obtaining a preconfigured test code, which may be specifically: obtaining a preconfigured test code based on a preset mapping relationship, the mapping relationship being a one-to-one correspondence between the constraint condition and the test code, and the preconfigured test code being a test code corresponding to the constraint condition in the mapping relationship.

[0064] In addition, in the actual testing process, the constraints corresponding to similar templates may be similar or even the same. Therefore, in order to reduce the number of test codes, the same test code can be used for testing similar or identical constraints. In other words, different constraints will have their own test codes corresponding to them, but a certain test code can correspond to multiple constraints.

[0065] In this step, after the application page building process is tested by the test code, the test results will be obtained accordingly, and the test results can be displayed in the preset position of the display screen for the tester to monitor and adjust the constraints. Of course, in order to facilitate the tester's evaluation of the test results, when displaying the test results, the test results of different user identifiers can be directly displayed for a certain constraint, such as displaying it in the form of a list, or displaying the number of times the constraint conditions are met and the number of times the constraint conditions are not met during the test. Based on the displayed data, the tester can directly determine whether the constraint conditions are reasonably established. For example, a large part of the page data corresponding to the user identifier cannot meet the constraint conditions. At this time, the number of non-constraint conditions displayed will be large, which shows that the constraint conditions are set more unreasonable, and the requirements in the constraint conditions can be appropriately lowered.

[0066] In this embodiment, test data is first obtained, wherein the test data includes a page data acquisition path, a user identifier, and constraints, and then based on the user identifier and the page data acquisition path, the page data corresponding to the user identifier is obtained, and then the pre-configured test code is run, and the application page building process is tested using the page data and constraints. Based on this, the page data corresponding to the user identifier can be automatically obtained using the test data, and then the application page building process can be automatically tested using the test code according to the page data and constraints. Since the process of page data acquisition and testing using the test code are all automatically performed based on the scheme of this application, compared to the process of manual testing, the speed of the test can be greatly improved, and the efficiency is also correspondingly improved. Within a certain test cycle, the number of user identifiers that can be tested by the automatic testing method of this application is necessarily greater than the number of user identifiers that can be tested by manual testing in the prior art. The test of the application page building process using the method of this application can cover a wider range of users.

[0067] In the above embodiment, the test is to test whether the constraints in the application page building process are reasonable. In order to test more comprehensively, another embodiment of the present application also provides a method for testing whether data that does not meet the constraints is reported in the application page building process. Please refer to Figure 2 , Figure 2 It is a schematic diagram of a test process for reporting abnormal data in an application page building process provided by another embodiment of the present application.

[0068] like Figure 2 As shown, the method for testing whether abnormal data is reported in this embodiment may include:

[0069] Step S201: Send the page building code to the preset operating environment, so as to use the page building code to build the application page in the preset operating environment.

[0070] It should be noted that the preset operating environment can refer to a virtual machine environment or a physical mobile terminal environment. Generally, the preset operating environment can directly use the underlying construction code of the Lego template to directly build the Lego template, which is similar to the process of using the application normally. In the normal construction process, page data that does not meet the constraints will be reported, but there will be software defects that are not reported. This embodiment will test whether the abnormal data is reported correctly. Therefore, in this step, the page construction code will be sent to the preset operating environment first, and the preset operating environment will use the page construction code to build the application page.

[0071] Among them, the page building code is a part of the test data, which is used to build the application page. Moreover, the page building code includes the aforementioned page data acquisition path. The relationship between the page building code and the page data acquisition path has been explained in the aforementioned content and will not be repeated here.

[0072] Step S202: using a preset packet capture tool to capture abnormal data reported during the process of building the application page, so as to test the abnormal reporting situation during the process of building the application page according to the abnormal data.

[0073] In this step, the preset packet capture tool is software for intercepting and viewing the contents of network data packets. The packet capture tool can capture all IP packets in the data communication process and perform layer-by-layer unpacking and analysis. In this embodiment, the packet capture tool is pre-set in the preset operating environment to intercept the uplink data of the preset operating environment, that is, the reported abnormal data, and then the abnormal reporting situation in the process of building the application page is tested according to the intercepted abnormal data.

[0074] Specifically, the abnormal data intercepted in this embodiment can be compared with the test results in the aforementioned embodiments to determine whether the preset operating environment has reported all the abnormal data. In a specific example, when building in the preset operating environment, it is also based on the user identifier. Taking the user identifier as a and the constraints as m and n as an example, the test result of the aforementioned embodiment may be that the page data of a does not satisfy m, but satisfies n. If the abnormal data captured at this time is empty, it can be concluded that the abnormal reporting situation is incorrect; if the abnormal data captured at this time is that the page data of a does not satisfy m, it can be explained that the abnormal reporting ability of the page building code is normal, and it can be concluded that the abnormal reporting situation is normal.

[0075] In addition, in the process of building the application page, it is very likely to encounter an abnormal white screen, that is, the content that should be displayed cannot be displayed. Due to the different network environments of the terminals carrying the application, the white screen may be caused by a poor network. Therefore, in order to test whether an abnormal white screen will appear under hard factors other than a poor network, this application specially proposes a white screen test method, please refer to Figure 3 , Figure 3 It is a flowchart of a white screen test in an application page building process provided by another embodiment of the present application.

[0076] like Figure 3 As shown, this embodiment is implemented based on the process of building an application page in a preset operating environment in the above-mentioned embodiment, and the process of the white screen test may include:

[0077] Step S301: Obtain page white screen parameters returned during the process of building an application page.

[0078] It should be noted that there can be two types of page white screen parameters. The first type represents the time consumed from the start of construction to the completion of construction. The second type is the parameter directly returned when the construction is not completed during the construction process. The acquisition and processing of these two types of page white screen parameters will be reflected in the description of step S302.

[0079] Step S302: determine whether an abnormal white screen situation occurs during the process of building the application page according to the page white screen parameters, and issue an alarm prompt when an abnormal white screen situation occurs.

[0080] In this embodiment, there may be two types of page blank screen parameters, and the abnormal blank screen conditions determined according to the two page blank screen parameters may also be different.

[0081] For the first type, since the application page cannot display page data during the process from the beginning to the completion of construction, this stage can be called a white screen. In this case, the longer the white screen time is, the worse the user experience will be. Therefore, a timer can be set in the preset operating environment, and the timing process of the timer can be controlled by code. When the page construction code starts to run, the timer is started, and when the construction is completed, the timer is stopped. Then the time value of the timing is stored in the form of a page white screen parameter in a preset storage address, waiting to be obtained, or directly displayed at the preset position of the screen to serve as an alarm prompt.

[0082] For the second type, when a white screen appears and the page cannot be displayed for a period of time according to the characteristics of the preset operating environment (Android, iOS, etc.), a fixed parameter will be directly ranged. The appearance of this parameter is generally due to more serious problems such as the crash of the page building code and the crash of the page rendering. This embodiment directly detects the parameter and stores the parameter in the form of a page white screen parameter in a preset storage address, waiting to be obtained, or directly displayed at a preset position on the screen to serve as an alarm prompt.

[0083] The above two page white screen parameters can be directly fed back to the tester in a displayed way, or actively queried and obtained by the tester, and then the page construction code can be adjusted according to the page white screen parameters to shorten the white screen time, or solve abnormal white screens caused by other problems (such as page construction code crash, page rendering crash, etc.).

[0084] See also Figure 4 , Figure 4 It is a structural diagram of an automatic testing device for an application page building process provided by another embodiment of the present application.

[0085] like Figure 4 As shown, the automatic testing device for the application page building process provided in this embodiment may include:

[0086] The first acquisition module 401 is used to acquire test data, where the test data includes a page data acquisition path, a user identifier, and constraint conditions;

[0087] The second acquisition module 402 is used to acquire the page data corresponding to the user identifier based on the user identifier and the page data acquisition path;

[0088] The automatic testing module 403 is used to run the pre-configured test code and test the application page building process using the page data and constraints.

[0089] In this embodiment, first, the first acquisition module will acquire test data, wherein the test data includes a page data acquisition path, a user identifier, and constraints. Then, the second acquisition module acquires the page data corresponding to the user identifier based on the user identifier and the page data acquisition path, and then the automatic test module runs the preconfigured test code, and then uses the page data and constraints to test the application page building process. Based on this, the page data corresponding to the user identifier can be automatically acquired using the test data, and then the application page building process can be automatically tested using the test code according to the page data and constraints. Since the process of page data acquisition and testing using the test code are all automatically performed based on the solution of this application, compared with the process of manual testing, the speed of the test can be greatly improved, and the efficiency is also correspondingly improved. Within a certain test cycle, the number of user identifiers that can be tested by the automatic testing method of this application must be more than the number of user identifiers that can be tested by manual testing in the prior art. The test of the application page building process using the method of this application can cover a wider range of users.

[0090] Furthermore, the first acquisition module includes:

[0091] The first acquisition unit is used to periodically acquire test data, wherein the user identifier acquired in each period is different.

[0092] Furthermore, the device also includes:

[0093] The third acquisition module is used to acquire the preconfigured test code based on a preset mapping relationship, where the mapping relationship is a one-to-one correspondence between constraints and test codes, and the preconfigured test code is the test code corresponding to the constraints in the mapping relationship.

[0094] Further, the test data includes a page building code for building an application page, the page building code includes a page data acquisition path, and the device further includes:

[0095] A sending module, used to send the page building code to a preset operating environment, so as to use the page building code to build an application page in the preset operating environment;

[0096] The data capture module is used to capture the abnormal data reported in the process of building the application page by using the preset packet capture tool, so as to test the abnormal reporting situation in the process of building the application page according to the abnormal data.

[0097] Furthermore, the device also includes:

[0098] The fourth acquisition module is used to obtain the page white screen parameters returned during the process of building the application page;

[0099] The determination module is used to determine whether an abnormal white screen situation occurs during the construction of the application page according to the page white screen parameters, and to issue an alarm prompt when an abnormal white screen situation occurs.

[0100] It should be noted that the specific description of the functions of the above modules can refer to the corresponding method description in the above embodiments, which will not be repeated here.

[0101] See also Figure 5 , Figure 5 It is a structural diagram of an automatic testing device for an application page building process provided by another embodiment of the present application.

[0102] like Figure 5 As shown, the automatic test equipment 500 provided in this embodiment includes: at least one processor 501, a memory 502, at least one network interface 503 and other user interfaces 504. Production Node Management The various components in the production node management system 500 are coupled together through a bus system 505. It can be understood that the bus system 505 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 5 Various buses are labeled as bus system 505 .

[0103] The user interface 504 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0104] It can be understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0105] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and a second application 5022 .

[0106] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The second application 5022 includes various second application programs, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The program for implementing the method of the embodiment of the present invention can be included in the second application 5022.

[0107] In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the second application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:

[0108] Obtain test data, which includes page data acquisition path, user ID and constraint conditions;

[0109] Based on the user identifier and the page data acquisition path, obtain the page data corresponding to the user identifier;

[0110] Run pre-configured test code to test the application page building process using page data and constraints.

[0111] Optionally, obtain test data, including:

[0112] The test data is acquired periodically, wherein the user identifier acquired in each period is different.

[0113] Optionally, before running the preconfigured test code, the method further includes:

[0114] The preconfigured test code is obtained based on a preset mapping relationship, where the mapping relationship is a one-to-one correspondence between constraint conditions and test codes, and the preconfigured test code is the test code corresponding to the constraint conditions in the mapping relationship.

[0115] Optionally, the test data includes a page building code for building an application page, the page building code includes a page data acquisition path, and the method further includes:

[0116] Sending the page building code to the preset operating environment to build the application page in the preset operating environment using the page building code;

[0117] Use the preset packet capture tool to capture the abnormal data reported during the construction of the application page, so as to test the abnormal reporting situation during the construction of the application page based on the abnormal data.

[0118] Optionally, after sending the page building code to the preset operating environment to build the application page in the preset operating environment using the page building code, the method further includes:

[0119] Get the page white screen parameters returned during the process of building the application page;

[0120] Determine whether an abnormal white screen occurs during the process of building the application page based on the page white screen parameters, and issue an alarm prompt when an abnormal white screen occurs.

[0121] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0122] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of the present application, or a combination thereof.

[0123] For software implementation, the technology of this article can be implemented by a unit that performs the functions of this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0124] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0125] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0126] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0127] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0128] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0129] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0130] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0131] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0132] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0133] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for automatically testing an application page building process, characterized in that: The method comprises: Acquire test data, wherein the test data includes a page data acquisition path, a user identifier, and a constraint condition; Acquiring page data corresponding to the user identifier based on the user identifier and the page data acquisition path includes: Matching a corresponding user portrait according to the user identifier, and acquiring page data matching the user portrait according to the page data acquisition path according to the user portrait, wherein the user portrait represents a label matching the user's daily behavior; Running preconfigured test code to test the application page building process using the page data and the constraint conditions; Displaying the number of times the constraint condition is met and the number of times the constraint condition is not met, and judging whether the constraint condition is reasonably established based on the displayed data; When the constraint condition is set to be unreasonable, the requirement in the constraint condition is lowered.

2. The method according to claim 1, characterized in that The obtaining of test data comprises: The test data is acquired periodically, wherein the user identifier acquired in each period is different.

3. The method according to claim 1, characterized in that: Before running the preconfigured test code, the method further includes: Based on the mapping relationship between the constraint condition and the preconfigured test code, and the constraint condition, the preconfigured test code is acquired.

4. The method according to claim 1, characterized in that: The test data includes a page building code for building an application page, the page building code includes the page data acquisition path, and the method further includes: Sending the page building code to a preset operating environment, so as to use the page building code to build the application page in the preset operating environment; The abnormal data reported in the process of building the application page is captured using a preset packet capture tool, so as to test the abnormal reporting situation in the process of building the application page according to the abnormal data.

5. The method according to claim 4, characterized in that After sending the page building code to a preset operating environment so as to use the page building code to build the application page in the preset operating environment, the method further includes: Obtaining page white screen parameters returned during the process of building the application page; Determine whether an abnormal white screen situation occurs during the process of building the application page according to the page white screen parameters, and issue an alarm prompt when the abnormal white screen situation occurs.

6. An automatic testing device for an application page building process, characterized in that: The device comprises: A first acquisition module, used to acquire test data, wherein the test data includes a page data acquisition path, a user identifier, and a constraint condition; A second acquisition module, configured to acquire page data corresponding to the user identifier based on the user identifier and the page data acquisition path; The second acquisition module is specifically used to match the corresponding user portrait according to the user identifier, and acquire the page data matching the user portrait according to the page data acquisition path according to the user portrait, wherein the user portrait represents a label matching the user's daily behavior; An automatic testing module, used to run pre-configured test code and test the application page building process using the page data and the constraint conditions; Displaying the number of times the constraint condition is met and the number of times the constraint condition is not met, and judging whether the constraint condition is reasonably established based on the displayed data; When the constraint condition is set to be unreasonable, the requirement in the constraint condition is lowered.

7. The device according to claim 6, characterized in that The first acquisition module includes: The first acquisition unit is used to periodically acquire test data, wherein the user identifier acquired in each period is different.

8. The device according to claim 6, characterized in that The device also includes: The third acquisition module is used to acquire the preconfigured test code based on the mapping relationship between the constraint condition and the preconfigured test code, and the constraint condition.

9. The device according to claim 6, characterized in that The test data includes a page building code for building an application page, the page building code includes the page data acquisition path, and the device further includes: A sending module, used for sending the page building code to a preset operating environment, so as to use the page building code to build the application page in the preset operating environment; The data capture module is used to capture the abnormal data reported in the process of building the application page by using a preset packet capture tool, so as to test the abnormal reporting situation in the process of building the application page according to the abnormal data.

10. The device according to claim 9, characterized in that The device also includes: A fourth acquisition module is used to obtain a page white screen parameter returned during the process of building the application page; The determination module is used to determine whether an abnormal white screen situation occurs during the process of building the application page according to the page white screen parameters, and to issue an alarm prompt when the abnormal white screen situation occurs.

11. An automatic testing device for an application page building process, characterized in that: include: at least one processor and memory; The processor is used to execute the automatic testing program of the application page building process stored in the memory to implement the automatic testing method of the application page building process described in any one of claims 1-5.