Test method, test device, computer readable storage medium and electronic equipment

By generating test cases under the combined granularity of placement locations and display objects, the problem of high efficiency and low page testing in the existing technology is solved, and efficient and convenient business testing is achieved.

CN120336174APending Publication Date: 2025-07-18HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510404901.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the page testing methods have high labor and time costs, low testing efficiency, and it is difficult to ensure the authenticity of page use.

Method used

By obtaining user interaction data in the page, a test case under the combined granularity of the placement position and the display object is generated, and a test case corresponding to the combination of the first placement position and the first display object is tested.

Benefits of technology

It improves the richness and flexibility of test cases, reduces the cost of test cases generation, and realizes efficient and convenient business testing, with a wide range of applicable scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336174A_ABST
    Figure CN120336174A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a test method, a test device, a storage medium and electronic equipment, and relates to the technical field of computers. The method comprises the steps of obtaining user interaction data for one or more display objects in a page; the page comprises one or more delivery positions, and the display object is used for being delivered to the delivery position to be displayed; according to the user interaction data, generating a test case under the combined granularity of a putting position and a display object; using a test case corresponding to the combination of the first putting position and the first display object to test the first putting service; the first delivery service is that the first display object is delivered at the first delivery position. According to the invention, the delivery service can be tested flexibly and conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technologies, and more particularly, to a testing method, a testing device, a computer-readable storage medium, and an electronic device. Background Art

[0002] This section aims to provide background or context for the embodiments of the present disclosure recited in the claims. The description herein is not admitted to be prior art merely because it is included in this section.

[0003] In order to meet the diverse needs of users and provide high-quality business services, applications are updated, maintained, and managed, etc. During this process, it is often necessary to test pages to check for abnormal problems. However, in the existing testing methods, a large amount of human participation is required, resulting in high labor costs and time costs, low testing efficiency, and it is difficult to ensure the authenticity of page usage. Summary of the Invention

[0004] However, currently, the testing methods for pages have high labor costs and time costs, and the testing efficiency needs to be improved.

[0005] In the related art, online sampling can be directly performed to obtain page recording data for regression of backend logic for page testing. However, this method has poor accuracy and generality. It is also possible to perform page testing with the help of a simulation platform, but it requires manual operation of the data of the simulation interface and the page content, and it is also necessary to understand the return logic of each field, resulting in high labor costs and time costs, low testing efficiency, and it is difficult to ensure the authenticity of page usage.

[0006] Therefore, there is a great need for a testing method that can flexibly and conveniently implement page testing and has high testing efficiency.

[0007] In this context, embodiments of the present disclosure are expected to provide a testing method, a testing device, a computer-readable storage medium, and an electronic device.

[0008] According to a first aspect of the present disclosure, a testing method is provided, including: obtaining user interaction data for one or more display objects in a page; the page includes one or more placement positions, and the display objects are used to be placed at the placement positions for display; generating test cases at a combination granularity of placement positions and display objects according to the user interaction data; using the test cases corresponding to the combination of a first placement position and a first display object to test a first placement service; the first placement service is: placing the first display object at the first placement position.

[0009] In one embodiment, the user interaction data includes display content data and corresponding interaction behavior data; generating test cases at the combined granularity of placement positions and display objects based on the user interaction data includes: aggregating the display content data according to the combined granularity of placement positions and display objects; mapping the aggregated display content data to a test platform to generate test content data corresponding to different combinations of placement positions and display objects; and binding the interaction behavior data to the test content data according to the correspondence between the interaction behavior data and the display content data to obtain test cases corresponding to different combinations of placement positions and display objects.

[0010] In one embodiment, the display content data includes interactive video data, and the interaction behavior data includes interaction position data; obtaining user interaction data for one or more display objects on a page includes: during a user's interaction with the display object, recording interactive video data and determining the interaction position data corresponding to the interactive video data.

[0011] In one embodiment, using the test case corresponding to the combination of the first placement position and the first display object to test the first placement service includes: obtaining first interactive video data and first interaction position data from the test case corresponding to the combination of the first placement position and the first display object; interacting with the first display object placed at the first placement position according to the first interaction position data and recording a video to obtain interactive video data to be verified; and obtaining the test result of the first placement service by comparing the first interactive video data and the interactive video data to be verified.

[0012] In one embodiment, the display content data includes interactive screenshot data, and the interaction behavior data includes interaction position data; obtaining user interaction data for one or more display objects on a page includes: during a user's interaction with the display object, recording the interaction position data and taking a screenshot of the page during the interaction to obtain interactive screenshot data.

[0013] In one embodiment, using the test case corresponding to the combination of the first placement position and the first display object to test the first placement service includes: obtaining first interaction position data and first interactive screenshot data from the test case corresponding to the combination of the first placement position and the first display object; detecting whether there is an interactive element corresponding to the first interaction position data in the first placement service and detecting whether the page after interacting with the interactive element matches the first interactive screenshot data to obtain the test result of the first placement service.

[0014] In one implementation, the test case corresponding to the combination of the first placement position and the first display object is used to test the first placement service, including: in response to a change in the running environment of the page, the test case corresponding to the combination of the first placement position and the first display object is used to test the first placement service.

[0015] According to a second aspect of the present disclosure, there is provided a test device, including: an interaction data acquisition module, configured to acquire user interaction data for one or more display objects in a page; the page includes one or more placement positions, and the display objects are used to be placed at the placement positions for display; a test case generation module, configured to generate test cases at the combination granularity of the placement position and the display object according to the user interaction data; a placement service test module, configured to use the test case corresponding to the combination of the first placement position and the first display object to test the first placement service; the first placement service is: placing the first display object at the first placement position.

[0016] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the test method of the first aspect and its possible implementation manners are implemented.

[0017] According to a fourth aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory, configured to store executable instructions of the processor; wherein, the processor is configured to execute the test method of the first aspect and its possible implementation manners by executing the executable instructions.

[0018] In the solution of the present disclosure, on the one hand, an exemplary embodiment of the present disclosure proposes a new test method. The generation of test cases basically depends on user interaction data, placement positions, and display objects, and test cases can be generated at the combination granularity of the placement position and the display object. Less other content needs to be considered in the generation of test cases, which can reduce the cost of generating test cases while paying attention to the combination manner of the placement position and the display object, and simply and conveniently improve the richness and flexibility of test cases. On the other hand, compared with the prior art that requires users to perform simulation operations one by one for testing, in this exemplary embodiment, by placing the first display object at the first placement position at the specific combination granularity of the first placement position and the first display object, business testing can be achieved, with high test efficiency and convenience. On the other hand, using the test case corresponding to the combination of the first placement position and the first display object to test the first placement service, this exemplary embodiment can formulate a targeted combination of the placement position and the display object for different scenarios to perform regression testing, and the testing has high flexibility and wide applicable scenarios. Description of the Drawings

[0019] Figure 1 A schematic diagram showing a system architecture in this exemplary embodiment.

[0020] Figure 2 A flowchart showing a test method in this exemplary embodiment.

[0021] Figure 3 A schematic diagram of a page showing a music program.

[0022] Figure 4 A schematic diagram of a page showing a music program.

[0023] Figure 5 A schematic diagram of a page showing a music program.

[0024] Figure 6 A schematic diagram of a page showing a music program.

[0025] Figure 7 A schematic diagram showing the generation of test cases at the combined granularity of a placement position and a display object in this exemplary embodiment.

[0026] Figure 8 A schematic flowchart showing the process of obtaining user interaction data for one or more display objects in a page in this exemplary embodiment.

[0027] Figure 9 A schematic flowchart showing the process of testing a first placement service using test cases corresponding to the combination of a first placement position and a first display object in this exemplary embodiment.

[0028] Figure 10 A schematic diagram showing the structure of a test device in this exemplary embodiment.

[0029] Figure 11 A schematic diagram showing the structure of an electronic device in this exemplary embodiment.

[0030] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. Detailed Embodiment

[0031] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and thus implement the present disclosure, and do not limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to fully convey the scope of the present disclosure to those skilled in the art.

[0032] Embodiments of the present disclosure can be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: all hardware, all software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0033] The principles and spirit of the present disclosure will be elaborated in detail below with reference to several representative embodiments of the present disclosure. Summary of the Invention

[0035] The inventors of the present invention have found that the current testing methods for pages have relatively high labor costs and time costs, and the testing efficiency needs to be improved.

[0036] In view of the above, the present disclosure provides a testing method, a testing device, a computer-readable storage medium, and an electronic device. Obtain user interaction data for one or more display objects in a page; the page includes one or more placement positions, and the display objects are used to be placed at the placement positions for display; generate test cases at the combination granularity of the placement positions and the display objects according to the user interaction data; use the test cases corresponding to the combination of the first placement position and the first display object to test the first placement service; the first placement service is: placing the first display object at the first placement position. On the one hand, this exemplary embodiment proposes a new testing method. The generation of test cases basically depends on user interaction data, placement positions, and display objects, and can generate test cases at the combination granularity of placement positions and display objects. Less consideration of other content is required for the generation of test cases, which can reduce the cost of generating test cases while paying attention to the combination method of placement positions and display objects, and simply and conveniently improve the richness and flexibility of test cases. On the other hand, compared with the prior art that requires users to perform simulation operations one by one for testing, this exemplary embodiment can achieve service testing by placing the first display object at the first placement position at the specific combination granularity of the first placement position and the first display object, with relatively high testing efficiency and convenience. On the other hand, using the test cases corresponding to the combination of the first placement position and the first display object to test the first placement service, this exemplary embodiment can formulate targeted combinations of placement positions and display objects for different scenarios to perform regression testing, and the testing has relatively high flexibility and wide applicable scenarios.

[0037] The various non-limiting embodiments of the present disclosure will be specifically introduced below.

[0038] Overview of Application Scenarios

[0039] It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in any way in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0040] The embodiments of the present disclosure can be applied to scenarios related to regression testing and inspection of services. The specific application scenarios will be described below in combination with the system architecture.

[0041] Figure 1 A schematic diagram of the system architecture of a test method is shown. The system architecture includes a terminal device 110 and a server 120. The terminal device 110 can be various electronic devices such as a smart phone, a computer, a tablet, etc. The terminal device 110 can be used to display a page, collect user interaction data about the displayed objects on the page, and send it to the server 120. The server 120 can receive the user interaction data, generate test cases according to the interaction data, and perform tests on the delivery service.

[0042] Exemplary Method

[0043] An exemplary embodiment of the present disclosure provides a test method. Refer to Figure 2 As shown, the method may include steps S210 to S230. The following will specifically describe Figure 2 each step in.

[0044] Refer to Figure 2 , in step S210, obtain user interaction data for one or more displayed objects on the page; the page includes one or more placement positions, and the displayed objects are used to be placed at the placement positions for display.

[0045] Among them, the page refers to the interface on the terminal device that can display specific service content. For example, in a music program, a page of music content as shown Figure 3 can be displayed, which may include a song cover 310, operable options 320, a talent song list 330, new song recommendations 340, specific songs 350, etc. The displayed object refers to an object on the page for displaying specific content or a channel for placing materials. For example, a certain section or channels corresponding to different business parties, such as an operation channel or a non-operation channel. The displayed object can be displayed on the page in various forms such as a floating window, a pop-up window, a floating interface, or a list. The displayed content can be a specific presented content entity, which can be resources in various forms such as text, image, link, video, music, etc. For example, in Figure 3In the page of the music program shown, the master playlists and new song recommendation sections can be display objects. Specific contents such as images, songs, and texts that can be displayed are included. The display objects can be placed at the placement positions on the page. Different business parties can place different display objects at the same placement position. In this exemplary embodiment, the business parties can pre-configure the content to be placed. For example, they can determine the title, playlist, link, etc. through a general template, or configure it through a custom policy, and then place the display objects according to the configuration information.

[0046] In this exemplary embodiment, a page can include one or more placement positions. The placement position refers to the position for placing display objects, which can be a specific position or a region. For example, Figure 3 the region where the master playlist shown is located can be regarded as a placement position. In this exemplary embodiment, a page can include one or more display objects. Different display objects can be placed at different placement positions. For example, the page of the music program can include multiple different placement positions such as new song recommendation, daily recommendation, hot song list, and event recommendation. Each placement position can include corresponding display objects. Additionally, the same placement position can also be used to place different display objects. For example, different contents can be placed according to different business parties in the event recommendation. For example, the same placement position can be used by business party 1 to place activity 1, or by business party 2 to place activity 2, etc.

[0047] The user interaction data of the display object refers to the trigger behavior data that triggers the display of the corresponding display object. For example, when the user first opens the music program every day, the daily activity will be displayed in the middle of the page. The daily activity can be a display object, and the user interaction data of the display object is the user's initial opening of the program. The trigger operation when the user usually opens the music program will display the home page content of the music program. The home page content can be a display object, and the user interaction data is the user's regular opening of the music program. When the user clicks on the activity option, a page including an activity pop-up window will be displayed. The activity pop-up window can include a display object, and the user interaction data is the user's clicking on the activity option. When the user performs specific operations within the activity pop-up window and switches to the recommended activity page, the recommended activity can be a display object, and the user interaction data is the user's performing specific operations within the pop-up window. In this exemplary embodiment, the user interaction data can also include the display content data of the display object.

[0048] It should be noted that the content displayed on different pages can be different. For example, Figure 3 display the page content under the music attribute of the music program, Figure 4 display the home page after entering the music program; the content displayed on the same page at different times, under different operations, or for different users can also be different. For example, Figure 4As shown, after User 1 enters the music program on the same day, the content of today's rights and interests activities can be displayed at the placement position 410. After User 2 enters the music program on the same day, a page as shown in Figure 5 can be displayed. Figure 5 In it, at the placement position 510, it shows that the user's rights and interests have expired, as well as relevant rights and interests recommendation content, etc.; according to the user's interaction operations, it can also jump from a certain page to a page as shown in Figure 6 . At Figure 6 , at the placement position 610, it shows rights and interests activities and options, etc.

[0049] In step S220, according to the user interaction data, test cases are generated at the combined granularity of the placement position and the display object.

[0050] A test case refers to test data designed to verify the effect of specific placement content. In this exemplary embodiment, test cases can be generated at the combined granularity of the placement position and the display object, and are associated with user interaction data. For example, a test case can be to display today's activity content at the middle placement position on the home page of the music program, and the associated user interaction data can be that the user opens the music program for the first time on the same day. In this exemplary embodiment, the test case can be a mock (simulated object) case.

[0051] The same placement position can be combined with different display objects to obtain different test cases, so as to simulate the page display effects of different users. For example, for the same music program, if User A has the rights and interests identity and User B does not, then when opening the music program, User A can correspondingly display the rights and interests activity content and the rights and interests validity period at the middle placement position on the page, and User B can correspondingly display the relevant content to become a rights and interests identity at the middle placement position on the page, etc.

[0052] This exemplary embodiment does not require any hardware or software changes on the device side. By placing a display object at a certain position, the corresponding test case can be obtained. Through the combination of different positions and different display objects, multiple test cases can be obtained.

[0053] In step S230, the test case corresponding to the combination of the first placement position and the first display object is used to test the first placement service; the first placement service is: placing the first display object at the first placement position.

[0054] Among them, the first placement position can be any placement position used for testing, the first display object can be any display object used for testing, and the first placement service can be placing the first display object at the first placement position. Specifically, according to the different types of services, both the first placement position and the first display object can change.

[0055] This exemplary embodiment can use test cases of a specific combination of a first placement position and a first display object to test the page effect under the first placement position and the first display object. The test scenarios can be, for example, scenarios such as updating, revising, or optimizing the program or platform where the page is located. For example, after upgrading a music program, running the test cases of a certain first placement position and a first display object can specifically determine whether the program upgrade will affect the specific display object at a specific position.

[0056] In an exemplary embodiment, the user interaction data includes display content data and corresponding interaction behavior data; generating test cases at the combination granularity of the placement position and the display object according to the user interaction data may include the following steps:

[0057] Aggregate the display content data according to the combination granularity of the placement position and the display object;

[0058] Map the aggregated display content data to the test platform to generate test content data corresponding to different combinations of the placement position and the display object;

[0059] Bind the interaction behavior data to the test content data according to the correspondence between the interaction behavior data and the display content data to obtain test cases corresponding to different combinations of the placement position and the display object.

[0060] In practical applications, the business side can first determine the placement location and the application scenario of the location, and then place relevant materials or resources at the placement location on the page. The materials or resources can be regarded as the placement objects, and the specific resource content, such as specific text data or image data, etc., can be regarded as the display content data. There can be multiple display objects at one placement location, and different display objects may have a competitive relationship. The content seen by different users may be different, and the specific content display form, trigger form, or interaction form may all be different. Based on this, in this exemplary embodiment, the recording data can be sampled according to the placement location and the display object to obtain the display content data. The display content data refers to the specific content corresponding to placing a specific display object at the placement location, such as text, image, link, music, video, etc. After obtaining the display content data, it can be aggregated according to the combination granularity of the placement location and the display object. During the aggregation process, duplicate data removal processing can also be performed to solve the problem of data redundancy and reduce the complexity of subsequent data processing. At this time, the display content data of different users under different placement locations and display objects is obtained. Then, the display content data can be mapped to a test platform, which can be a mock platform, to generate test content data corresponding to different combinations of placement locations and display objects, such as mock use cases. Finally, according to the correspondence between the interaction behavior data and the display content data, such as what kind of behavior can trigger the display of what kind of display content data, the interaction behavior data is bound to the test content data to obtain test cases corresponding to different combinations of placement locations and display objects, such as binding the interaction behavior data to the mock use cases to obtain mock use cases with corresponding interaction behavior data.

[0061] Figure 7 FIG. shows a schematic diagram of generating test cases at the combination granularity of the placement location and the display object, which is specifically described by taking the recording of 4 interfaces as an example:

[0062] The interface recording use case 1 710 can respond to the user's request data to obtain the display content data 711 of the placement location A / display object A_1, the display content data 712 of the placement location B / display object B_1, and the display content data 713 of the placement location C / display object C_1;

[0063] The interface recording use case 2 720 can respond to the user's request data to obtain the display content data 721 of the placement location B / display object B_1, the display content data 722 of the placement location C / display object C_2, and the display content data 723 of the placement location D / display object D_1;

[0064] The interface recording use case 3730 can respond to the user's request data and obtain the display content data 731 of the placement position A / display object A_1, the display content data 732 of the placement position B / display object B_1, and the display content data 733 of the placement position C / display object C_1;

[0065] The interface recording use case 4740 can respond to the user's request data and obtain the display content data 741 of the placement position A / display object A_3, the display content data 742 of the placement position B / display object B_1, and the display content data 743 of the placement position C / display object C_1.

[0066] Among them, responding to the user's request data can be responding to the request data of different users. For example, in response to the request data of user 1 for the placement position A, a use case for recording the display content data of the placement position A / display object A_1 is recorded. This exemplary embodiment is only for illustrative purposes, and the content and quantity of the display content data are not specifically limited. For example, it can also include more interface recording use cases, placement positions, or display objects.

[0067] By aggregating and deduplicating the above display content data, a use case 750 for the display content data of different users under different placement positions / display objects can be obtained. For example Figure 7 As shown, the placement position A appears in the interface recording use cases 1, 3, and 4. However, the use cases 3 and 4 present the same display content data. Therefore, the use cases 1 and 4 can be obtained after deduplication. This use case can be regarded as the process of displaying the display object A_1 at the placement position A on the page.

[0068] Then, this exemplary embodiment can store the obtained display content data in the form of use case 760 in a preset database. For example, if there are two use cases corresponding to position A, then the use cases 1 and 2 corresponding to position A can be saved; further, the display content data can be mapped to the mock platform 770 to generate mock use cases 780 corresponding to different combinations of placement positions and display objects. The same group of use cases can correspond to the same mock ID (Identify, unique identifier). For example, the use cases of different display content data corresponding to different display objects at the same position can correspond to the same ID. Finally, according to the correspondence between the interaction behavior data and the display content data, the interaction behavior data is bound to the mock use cases to obtain mock use cases corresponding to different combinations of placement positions and display objects with trigger behaviors. Figure 7 The number of use cases in [the text] is only for illustrative purposes. How many use cases are saved before the display content data is mapped to the mock platform, after mapping to the mock platform, the same number of mock use cases can be generated one-to-one.

[0069] In an exemplary embodiment, the above display content data includes interactive video data, and the above interaction behavior data includes interaction location data; obtaining user interaction data for one or more display objects on a page may include:

[0070] During the user's interaction with the display object, record the interactive video data and determine the interaction location data corresponding to the interactive video data.

[0071] In this exemplary embodiment, the interaction behavior data may include interaction location data, which may be the specific location data where the user conducts the interaction, such as the location where an option is clicked or the location where an operation is performed, etc. The display content data may include interactive video data, which refers to the dynamic video data during the user's interaction with the display object. For example, when entering the home page of a music program and a pop-up window content of a specific event is displayed, the user can interact with the pop-up window content, such as giving a like, forwarding, or clicking on the content to jump to the specific content of the event. This process can be the interactive video data. Obtaining the user interaction data for the display object on the page in this exemplary embodiment may be to record the interactive video data during the user's interaction with the display object and determine the interaction location data corresponding to the interactive video data.

[0072] In an exemplary embodiment, the above testing the first placement service using the test case corresponding to the combination of the first placement location and the first display object may include:

[0073] Obtain the first interactive video data and the first interaction location data from the test case corresponding to the combination of the first placement location and the first display object;

[0074] According to the first interaction location data, interact with the first display object placed at the first placement location and record a video to obtain the interactive video data to be verified;

[0075] Obtain the test result of the first placement service by comparing the first interactive video data and the interactive video data to be verified.

[0076] Among them, the first interactive video data and the first interactive position data refer to the interactive video data and interactive position data corresponding to the first placement position and the first display object. When conducting tests, for the combination of the first placement position and the first display object, the corresponding first interactive video data and first interactive position data can be obtained. For example, for placement position A and display object a, there can be corresponding interactive video V1 and interactive position data P1, and for placement position B and display object b, there can also be corresponding interactive video V2 and interactive position data P2. The first interactive video data and first interactive position data corresponding to different combinations of placement positions and display objects can be different. It should be noted that the above first interactive video data and first interactive position data can be those before the placement test, such as the use cases stored in the mock platform, which can be used for subsequent regression tests.

[0077] Then, when testing the first placement service, according to the first interactive position data, interactions can be performed on the first display object placed at the first placement position, and a video can be recorded to obtain the interactive video data to be verified. For example, after the application program is upgraded and revised, using the first interactive position data, interactions are performed on the first display object placed at the first placement position, and the process is recorded to obtain the interactive video data to be verified. This video data can refer to the new video data recorded during the test.

[0078] Furthermore, by comparing the first interactive video data with the interactive video data to be verified, the test result of the first placement service can be obtained. That is, by comparing the pre-stored video use case with the video during the test process, the test result can be determined. This test result can include the result of whether the first interactive video data is consistent with the interactive video data to be verified. If they are consistent, it indicates that the update of the application program has not affected the page. If they are inconsistent, it indicates that the update of the application program may have affected the display object at the placement position included in the video data.

[0079] Comparing the first interactive video data with the interactive video data to be verified can be frame-by-frame comparison of the video frames of the first interactive video data and the interactive video data to be verified, or it can be comparison of the video frames by extracting frames. For example, the third frame of the first interactive video data is extracted and compared with the third frame of the interactive video data to be verified, etc. The present disclosure does not make specific limitations on this. Whether the video frames are consistent can be achieved by calculating the similarity of the video frames.

[0080] In an exemplary embodiment, the display content data includes interactive screenshot data, and the interactive behavior data includes interactive position data; obtaining user interaction data for one or more display objects in a page includes:

[0081] During the user's interaction with the display object, record the interaction position data and take screenshots of the page during the interaction process to obtain interaction screenshot data.

[0082] In this exemplary embodiment, the interaction behavior data may include interaction position data, which may be the specific position data where the user performs the interaction, such as the position where an option is clicked or the position where an operation is performed, etc. The display content data may include interaction screenshot data, which refers to the static image data during the user's interaction with the display object. For example, when entering the home page of a music program and a pop-up window content of a specific activity is displayed, the user can interact with the pop-up window content, such as giving a like, forwarding, or clicking on the content to jump to the specific content of the activity, etc. The page screenshots corresponding to any moment or multiple moments during this process can be used as interaction screenshot data. In this exemplary embodiment, the page screenshot after the interaction operation can be used as interaction screenshot data. For example, when the user clicks on the content activity option and the page jumps, the screenshot of the jumped page can be used as interaction screenshot data, etc. The user interaction data for the display object on the page obtained in this exemplary embodiment may be to record the interaction position data and take screenshots of the page during the user's interaction with the display object to obtain interaction screenshot data.

[0083] In one exemplary embodiment, the above test cases corresponding to the combination of the first placement position and the first display object for testing the first placement service may include:

[0084] Obtain the first interaction position data and the first interaction screenshot data from the test cases corresponding to the combination of the first placement position and the first display object;

[0085] Detect whether there is an interactive element corresponding to the first interaction position data in the first placement service according to the first interaction position data, and detect whether the page after interacting with the interactive element matches the first interaction screenshot data to obtain the test result of the first placement service.

[0086] Among them, the first interaction screenshot data and the first interaction position data refer to the interaction screenshot data and the interaction position data corresponding to the first placement position and the first display object.

[0087] The test can be to detect whether there is an interactive element corresponding to the first interaction position data in the first placement service according to the first interaction position data, and to detect whether the page after interacting with the interactive element matches the first interaction screenshot data, so as to obtain the test result of the first placement service. Here, the interactive element refers to any component with interactive functions, such as display controls like pop-up windows and floating windows, or options or components such as play, forward, like, and page jump. The test result can include whether there is an interactive element corresponding to the first interaction position data in the first placement service, or whether the page after interacting with the interactive element matches the first interaction screenshot data.

[0088] When testing the first placement service, if there is no interactive element corresponding to the first interaction position data in the first placement service, for example, the pop-up window fails to pop up normally when it should, and the page after interacting with the interactive element does not match the first interaction screenshot data, for example, after performing an interaction operation with the interactive element, it should jump to page A, but it does not jump, or there is an abnormal jump or other situations where it fails to successfully jump to page A, it indicates that the test of the first placement service is abnormal. For example, after the program is upgraded, the page is inconsistent with the first interaction screenshot after interacting with a certain interactive element, which indicates that the program upgrade has affected the page display during this process, and further inspection or adjustment can be carried out.

[0089] In this exemplary embodiment, video data or screenshot data can be selected for testing according to different application scenarios or requirements. For example, for placing and displaying objects according to a general template or a custom policy, the user interface automation verification can be a fixed verification template. By verifying preset information, such as common titles, subtitles, playlist covers, etc., the test can be carried out. At this time, interactive screenshot data can be used for testing. In other cases, for example Figures 4 to 6 involves the dynamic changes of the global pop-up window, such as the position of the pop-up window. The service can customize the style and content of the pop-up window. When testing, if simply verifying the rationality, correctness, and compatibility of the pop-up window elements according to the fixed user interface automation is not sufficient, other capabilities of the user interface can be combined, such as white picture and white screen detection capabilities, self-identifying element comparison capabilities, and self-identifying jump and click verification capabilities to check the placement content data. At this time, interactive video data can be used for testing.

[0090] In an exemplary embodiment, using the test case corresponding to the combination of the first placement position and the first display object to test the first placement service may include:

[0091] In response to a change in the running environment of the page, using the test case corresponding to the combination of the first placement position and the first display object to test the first placement service.

[0092] Among them, the change in the running environment may include changes in the application described on the page, such as update operations like upgrade, optimization, and version change, which cause changes in the page content, such as new content being added to the page or changes in the page logic. In this exemplary embodiment, when the running environment of the page changes, the test cases corresponding to the combination of the first placement position and the first display object can be used to test the first placement service.

[0093] Figure 8 The flowchart shows a process of obtaining user interaction data for one or more display objects on a page in this exemplary embodiment, which may specifically include:

[0094] Step S810, start timing recording in response to the start of the placement service of the display object at the placement position;

[0095] Step S820, obtain user interaction data for one or more display objects on the page;

[0096] Among them, the user interaction data may include display content data and interaction behavior data. The display content data may include interaction screenshot data and interaction video data. Therefore, the user interaction data can be recorded in two ways;

[0097] The first way can execute:

[0098] Step S821, record interaction position data during the interaction of the user with the display object;

[0099] Step S822, take a screenshot of the page during the interaction to obtain interaction screenshot data;

[0100] The second way can execute:

[0101] Step S823, record interaction video data during the interaction of the user with the display object;

[0102] Step S824, determine the interaction position data corresponding to the interaction video data;

[0103] After obtaining the user interaction data, step S830 can be executed to record the placement data at the relevant position through the relevant interface, and generate test cases at the combination granularity of the placement position and the display object according to the user interaction data, and save them to the preset database.

[0104] The test cases saved in the preset database can be used for regression testing later, and the test cases corresponding to the combination of the first placement position and the first display object can be used to test the first placement service.

[0105] Figure 9 The figure shows a schematic flowchart of a test case corresponding to a combination of a first placement position and a first display object in this exemplary embodiment for testing a first placement service, which may specifically include:

[0106] Step S910: Bind the identifier of the test case, for example, automatically bind the ID of the mock case;

[0107] Step S920: According to the identifier of the bound case, obtain the corresponding test case from a preset database; the test case includes the combination of the first placement position and the first display object; and use the test case corresponding to the combination of the first placement position and the first display object to test the first placement service;

[0108] Furthermore, different test processes S920 can be executed according to different display content data;

[0109] For screenshot data, Method 1 can be executed:

[0110] Step S921: Obtain the first interaction position data and the first interaction screenshot data from the test case corresponding to the combination of the first placement position and the first display object;

[0111] Step S922: Detect whether there is an interactive element corresponding to the first interaction position data in the first placement service;

[0112] If there is no interactive element corresponding to the first interaction position data, execute Step S923 to generate test exception information, such as generating an error report;

[0113] If there is an interactive element corresponding to the first interaction position data, execute Step S924 to detect whether the page after interacting with the interactive element matches the first interaction screenshot data; for example, whether the displayed page after jumping is consistent with the page included in the case stored in the preset database;

[0114] Step S925: Obtain the test result of the first placement service according to the matching result. If it does not match, return to execute Step S923;

[0115] For video data, Method 2 can be executed:

[0116] Step S926: Obtain the first interaction video data and the first interaction position data from the test case corresponding to the combination of the first placement position and the first display object;

[0117] Step S927: According to the first interaction position data, interact with the first display object placed at the first placement position and record a video to obtain the interactive video data to be verified;

[0118] Step S928: Obtain the test result of the first placement service by comparing the first interactive video data with the interactive video data to be verified.

[0119] Exemplary Apparatus

[0120] An exemplary embodiment of the present disclosure further provides a test device. Refer to Figure 10 As shown, the test device 1000 may include the following program modules: an interactive data acquisition module 1010, configured to acquire user interactive data for one or more display objects in a page; the page includes one or more placement positions, and the display objects are used to be placed at the placement positions for display; a test case generation module 1020, configured to generate test cases at the combined granularity of the placement position and the display object according to the user interactive data; a placement service test module 1030, configured to test the first placement service by using the test cases corresponding to the combination of the first placement position and the first display object; the first placement service is: placing the first display object at the first placement position.

[0121] In one embodiment, the user interactive data includes display content data and corresponding interactive behavior data; the test case generation module 1020 includes: an aggregation unit, configured to aggregate the display content data according to the combined granularity of the placement position and the display object; a mapping unit, configured to map the aggregated display content data to a test platform to generate test content data corresponding to different combinations of the placement position and the display object; a binding unit, configured to bind the interactive behavior data to the test content data according to the correspondence between the interactive behavior data and the display content data to obtain test cases corresponding to different combinations of the placement position and the display object.

[0122] In one embodiment, the display content data includes interactive video data, and the interactive behavior data includes interactive position data; the interactive data acquisition module 1010 includes: a video recording unit, configured to record interactive video data during the user's interaction with the display object and determine the interactive position data corresponding to the interactive video data.

[0123] In one embodiment, the placement service test module 1030 includes: a first data acquisition unit, configured to acquire first interactive video data and first interactive position data from the test cases corresponding to the combination of the first placement position and the first display object; a video recording unit, configured to interact with the first display object placed at the first placement position according to the first interactive position data and record a video to obtain the interactive video data to be verified; a video comparison unit, configured to obtain the test result of the first placement service by comparing the first interactive video data with the interactive video data to be verified.

[0124] In one embodiment, the displayed content data includes interactive screenshot data, and the interactive behavior data includes interactive location data; the interactive data acquisition module 1010 includes: a location recording unit, configured to, during a user's interaction with a displayed object, record the interactive location data and take a screenshot of the page during the interaction process to obtain interactive screenshot data.

[0125] In one embodiment, the placement service testing module 1030 includes: a screenshot acquisition unit, configured to obtain first interactive location data and first interactive screenshot data from a test case corresponding to the combination of a first placement location and a first displayed object; a page detection unit, configured to detect whether there is an interactive element corresponding to the first interactive location data in the first placement service according to the first interactive location data, and detect whether the page after interacting with the interactive element matches the first interactive screenshot data to obtain a test result of the first placement service.

[0126] In one embodiment, the placement service testing module 1030 includes: a testing unit, configured to, in response to a change in the running environment of the page, use a test case corresponding to the combination of a first placement location and a first displayed object to test the first placement service.

[0127] In addition, other specific details of the embodiments of the present disclosure have been described in detail in the embodiments of the above method, and will not be repeated here.

[0128] Exemplary Storage Medium

[0129] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method of the present disclosure is implemented. The above method can be implemented by a program product. For example, a portable compact disc read-only memory (CD-ROM) can be used and includes program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.

[0130] The program product may employ any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0131] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0132] The program code contained on the readable medium may be transmitted with any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0133] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0134] Exemplary Electronic Device

[0135] Exemplary embodiments of the present disclosure also provide an electronic device, which can be Figure 1 any device among them. The electronic device includes a processor and a memory for storing executable instructions of the processor. The processor is configured to execute the above method of the present disclosure by executing the executable instructions.

[0136] Refer toFigure 11 An electronic device according to an exemplary embodiment of the present disclosure will be described. Figure 11 The illustrated electronic device 1100 is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0137] As Figure 11 shown, the electronic device 1100 is presented in the form of a general-purpose computing device. The components of the electronic device 1100 may include, but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 that connects different system components (including the storage unit 1120 and the processing unit 1110).

[0138] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification above. For example, the processing unit 1110 can execute the method steps as Figure 2 , Figure 8 or Figure 9 shown, etc.

[0139] The storage unit 1120 may include a volatile storage unit, such as a random access storage unit (RAM) 1121 and / or a cache storage unit 1122, and may further include a read-only storage unit (ROM) 1123.

[0140] The storage unit 1120 may also include a program / utility 1124 having a set (at least one) of program modules 1125. Such program modules 1125 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0141] The bus 1130 may include a data bus, an address bus, and a control bus.

[0142] The electronic device 1100 can also communicate with one or more external devices 1200 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and such communication can be carried out through the input / output (I / O) interface 1140. The electronic device 1100 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 1150. As shown in the figure, the network adapter 1150 communicates with other modules of the electronic device 1100 through the bus 1130. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0143] It should be noted that although several modules or sub-modules of the device are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0144] In addition, although the operations of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0145] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefit. This division is only for the convenience of expression. The present disclosure aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A testing method, characterized in that, Including: Obtaining user interaction data for one or more display objects in a page; the page includes one or more placement positions, and the display objects are used to be placed at the placement positions for display; Generating test cases at the combined granularity of placement positions and display objects according to the user interaction data; Using the test cases corresponding to the combination of the first placement position and the first display object to test the first placement service; the first placement service is: placing the first display object at the first placement position.

2. The method according to claim 1, wherein The user interaction data includes display content data and corresponding interaction behavior data; the generating test cases at the combined granularity of placement positions and display objects according to the user interaction data includes: Aggregating the display content data at the combined granularity of placement positions and display objects; Mapping the aggregated display content data to a test platform to generate test content data corresponding to different combinations of placement positions and display objects; Binding the interaction behavior data to the test content data according to the corresponding relationship between the interaction behavior data and the display content data to obtain test cases corresponding to different combinations of placement positions and display objects.

3. The method according to claim 2, characterized in that, The display content data includes interactive video data, and the interaction behavior data includes interactive position data; The obtaining user interaction data for one or more display objects in a page includes: During the user's interaction with the display object, recording interactive video data and determining the interactive position data corresponding to the interactive video data.

4. The method according to claim 3, characterized in that, The using the test cases corresponding to the combination of the first placement position and the first display object to test the first placement service includes: Obtaining first interactive video data and first interactive position data from the test cases corresponding to the combination of the first placement position and the first display object; Interacting with the first display object placed at the first placement position according to the first interactive position data and recording a video to obtain interactive video data to be verified; Obtaining the test result of the first placement service by comparing the first interactive video data and the interactive video data to be verified.

5. The method according to claim 2, wherein The display content data includes interactive screenshot data, and the interaction behavior data includes interactive position data; The obtaining user interaction data for one or more display objects in a page includes: During the user's interaction with the display object, recording interactive position data and taking a screenshot of the page during the interaction to obtain interactive screenshot data.

6. The method according to claim 5, characterized in that The using the test cases corresponding to the combination of the first placement position and the first display object to test the first placement service includes: Obtaining first interactive position data and first interactive screenshot data from the test cases corresponding to the combination of the first placement position and the first display object; Detecting whether there is an interactive element corresponding to the first interactive position data in the first placement service according to the first interactive position data, and detecting whether the page after interacting with the interactive element matches the first interactive screenshot data to obtain the test result of the first placement service.

7. The method according to claim 6, wherein Testing the first ad delivery service using the test case corresponding to the combination of the first ad placement position and the first display object includes: In response to a change in the running environment of the page, testing the first ad delivery service using the test case corresponding to the combination of the first ad placement position and the first display object.

8. A testing device, characterized in that, Including: An interaction data acquisition module for acquiring user interaction data for one or more display objects on the page; the page includes one or more ad placement positions, and the display objects are used to be placed at the ad placement positions for display; A test case generation module for generating test cases at the combination granularity of ad placement positions and display objects according to the user interaction data; An ad delivery service testing module for testing the first ad delivery service using the test case corresponding to the combination of the first ad placement position and the first display object; the first ad delivery service is: placing the first display object at the first ad placement position.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that, Including: A processor; And A memory for storing executable instructions of the processor; Wherein, the processor is configured to execute the method according to any one of claims 1 to 7 by executing the executable instructions.