CN116881121A - Test method, test device, electronic equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN116881121A
CN116881121A CN202310685087.XA CN202310685087A CN116881121A CN 116881121 A CN116881121 A CN 116881121A CN 202310685087 A CN202310685087 A CN 202310685087A CN 116881121 A CN116881121 A CN 116881121A
Authority
CN
China
Prior art keywords
page
tested
loading
design
similarity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310685087.XA
Other languages
Chinese (zh)
Inventor
刘俊启
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310685087.XA priority Critical patent/CN116881121A/en
Publication of CN116881121A publication Critical patent/CN116881121A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a testing method, a testing device, electronic equipment and a computer readable storage medium, and relates to the technical field of data processing, in particular to the fields of intelligent terminals, software testing and the like. The specific implementation scheme is as follows: acquiring parameters to be tested of an application program to be tested; loading the application program to be tested according to the parameter to be tested, and obtaining a loading page; and obtaining the page layout similarity of the loading page and the design page of the application program to be tested, and determining a test result according to the page layout similarity.

Description

Test method, test device, electronic equipment and computer readable storage medium
Technical Field
The disclosure relates to the technical field of data processing, in particular to the technical fields of intelligent terminals, software testing and the like. In particular, the disclosure relates to a test method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
With the popularization of the internet and the development of technology, intelligent terminals (such as mobile phones, tablet computers, etc.) are becoming more and more popular. APP (Application) based on intelligent terminal provides different services for users.
With the development of technology, intelligent terminals become more and more diversified, for example, screen parameters (such as screen size) of the intelligent terminals are more and more diversified, UI (user interface) of APP (application) installed on different intelligent terminals may be different, and in the development process of APP, the UI needs to be adapted.
Disclosure of Invention
The present disclosure provides a test method, apparatus, electronic device, computer-readable storage medium.
According to a first aspect of the present disclosure, there is provided a test method comprising:
acquiring parameters to be tested of an application program to be tested;
loading the application program to be tested according to the parameter to be tested, and obtaining a loading page;
and obtaining the page layout similarity of the loading page and the design page of the application program to be tested, and determining a test result according to the page layout similarity.
According to a second aspect of the present disclosure, there is provided a test apparatus comprising:
the parameter module is used for acquiring parameters to be tested of the application program to be tested;
the loading module is used for loading the application program to be tested according to the parameter to be tested and obtaining a loading page;
the calculation module is used for obtaining the page layout similarity of the loading page and the design page of the application program to be tested, and determining a test result according to the page layout similarity.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the test method.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the above-described test method.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described test method.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a test method provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of some steps of another testing method provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating some steps of another testing method provided by an embodiment of the present disclosure;
FIG. 4 is a flow chart of some steps of another testing method provided by an embodiment of the present disclosure;
FIG. 5 is a flow chart of some steps of another testing method provided by an embodiment of the present disclosure;
FIG. 6 is a flow chart of some steps of another testing method provided by an embodiment of the present disclosure;
FIG. 7 is a flow chart of some steps of another garment testing method provided by an embodiment of the present disclosure;
FIG. 8 is a loading page of an application to be tested and a corresponding mask layer under different parameters to be tested in a specific embodiment of a testing method according to an embodiment of the present disclosure;
FIG. 9 is a schematic structural view of a testing device according to an embodiment of the present disclosure;
fig. 10 is a block diagram of an electronic device for implementing a test method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In some related technologies, in the research and development process of the APP, for different intelligent terminals, especially intelligent terminals with different screen parameters, research and development personnel need to debug, review page presentation effects, and influence of client UI abnormality on user experience is avoided.
Even if intelligent terminals with the same screen parameters are different in corresponding service parameters (such as software version and system version), UI (user interface) is possibly different, so that research and development personnel need to debug each combination of service parameters of each screen parameter, and the debugging workload of the research and development personnel is greatly increased, and the research and development labor cost and the resource cost are increased.
The embodiment of the disclosure provides a testing method, a testing device, an electronic device and a computer readable storage medium, which aim to solve at least one of the technical problems in the prior art.
The test method provided by the embodiment of the disclosure may be performed by an electronic device such as a terminal device or a server, where the terminal device may be a vehicle-mounted device, a user device (UserEquipment, UE), a mobile device, a user terminal, a cellular phone, a cordless phone, a Personal digital assistant (Personal DigitalAssistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like, and the method may be implemented by a processor invoking computer readable program instructions stored in a memory. Alternatively, the method may be performed by a server.
Fig. 1 shows a flow chart of a test method according to an embodiment of the disclosure, and as shown in fig. 1, the method may include step S110, step S120, and step S130.
In step S110, obtaining parameters to be tested of an application to be tested;
in step S120, according to the parameters to be tested, loading the application program to be tested, and obtaining a loading page;
in step S130, the page layout similarity between the loading page and the design page of the application program to be tested is obtained, and the test result is determined according to the page layout similarity.
For example, in step S110, the application to be tested may be an application that may be installed on a smart terminal (e.g., a mobile phone, a tablet computer, a personal computer, etc.).
In some possible implementations, the parameters to be tested may include hardware parameters and software parameters of the publishing terminal corresponding to the application to be tested.
The release terminal is a terminal to be pushed to after the test and debugging of the application program to be tested are completed, such as a terminal on which the released version of the application program to be tested is installed.
The hardware parameters of the release terminal are related parameters of the hardware (such as a screen, a processor, etc.) of the release terminal, and the software parameters of the release terminal may include system parameters of the release terminal, software parameters of an application to be tested, etc.
In some possible implementations, the hardware parameters of the publishing terminal may include a screen parameter of the publishing terminal, and a device type of the publishing terminal (e.g., the publishing terminal is a mobile phone, and the publishing terminal is a tablet computer).
The screen parameters of the distribution terminal may include the size of the screen of the distribution terminal (e.g., the length of the screen, the width of the screen), the screen duty ratio, the resolution of the screen, etc.
In some possible implementations, the system parameters of the publishing terminal may include the type of operating system of the publishing terminal and the corresponding version number, such as IOS (a mobile operating system) 14.1 (corresponding version number), android (Android, a mobile operating system); a browser type of the publishing terminal may also be included, such as Safari.
In some possible implementations, the system parameter of the publishing terminal may be obtained from a UA (user agent) of the publishing terminal, where the UA of the publishing terminal is a string carried when an application of the publishing terminal makes a request to a server.
Under the condition that the parameters to be tested comprise hardware parameters and software parameters of the release terminal, different release terminals can be simulated through different parameters to be tested, so that the loading and testing processes based on the parameters to be tested in the step S120 and the step S130 are equivalent to loading and testing in different release terminals, and further testing of the application program to be tested in different release terminals is realized.
In some possible implementations, the parameters to be tested may be obtained by manual input or manual setting.
In some possible implementations, the parameter to be tested may also be obtained from data sent by the terminal, such as UA.
In some possible implementations, the parameters to be tested may be obtained by obtaining real user data with the user's consent.
And if the user agrees, acquiring the hardware parameters and the software parameters of the terminal running the application program to be tested, and determining the parameters to be tested.
In some possible implementations, in step S120, according to the parameters to be tested, the application to be tested is loaded in the testing environment, and the page displayed after the application to be tested is loaded, that is, the loading page is obtained.
The method for loading the application program to be tested according to the parameter to be tested is not limited in the embodiment of the disclosure, and any method capable of realizing the loading of the application program to be tested is within the protection scope of the embodiment of the disclosure.
In some possible implementations, in step S130, the design page of the application to be tested may be a page that the designer designs when designing the application to be tested, and that the designer wishes the application to be tested to present.
In some possible implementations, when designing an application to be tested, a designer may design different design pages for different parameters (e.g., different screen sizes and aspect ratios), and the design pages involved in calculating the page layout similarity may be design pages corresponding to the parameters to be tested (i.e., design pages corresponding to parameters similar to or identical to the parameters to be tested).
In some possible implementations, the page layout similarity of the load page and the design page may be obtained by similarity of outlines of controls (e.g., text controls, picture controls, video controls, etc.) of the load page and the design page.
In some possible implementations, the position information and the size information of the control of the loading page and the design page can be obtained.
In some possible implementations, the page layout similarity of the load page and the design page may also be obtained through a mask layer.
In some possible implementations, the page layout similarity of the loading page and the design page may be obtained according to the contour similarity of partial controls of the loading page and the design page, or may be obtained by the contour similarity of all controls of the loading page and the design page.
That is, the page layout similarity of the loading page and the design page may be the similarity of partial areas of the loading page and the design page, or the similarity of all areas of the loading page and the design page.
In some possible implementation manners, the similarity of the loading page and the design diagram corresponding to the design page can be calculated as the page layout similarity by performing screenshot on the loading page and through modes of picture segmentation, picture contour extraction and picture comparison.
In some possible implementation manners, when the length of the loading page is too long, the loading page can be subjected to scrolling operation, screenshot is respectively carried out, and then the loading page image corresponding to the loading page is obtained through image stitching.
In some possible implementations, in the case where the page layout similarity is higher than the preset threshold, the loading page and the design page may be considered similar, that is, the loading page and the design page may be considered similar in effect, so as to meet the requirements of the designer, and the test may be considered to pass.
Under the condition that the page layout similarity is lower than a preset threshold value, the loading page and the design page can be considered to be dissimilar, namely the effect of loading the page and the effect of designing the page are complementary similar, the requirements of designers are not met, errors can exist, research and development personnel are required to pay attention, and the test is failed.
In some possible implementation manners, the loading page which is not tested can be displayed, and the corresponding design drawing can be displayed on the layer of the loading page in a transparent same shape, so that a developer can more intuitively find errors of the loading page.
In some possible implementation manners, a plurality of parameters to be tested can be obtained, an application program to be tested is loaded in parallel according to the plurality of parameters to be tested, loading pages corresponding to each parameter to be tested are obtained, page layout similarity between the loading pages and corresponding design pages is calculated, and test results of the loading pages are determined, so that test efficiency is improved.
In some possible implementation manners, before calculating the page layout similarity between the loading pages and the corresponding design pages, the loading pages can be further grouped through similarity calculation between the loading pages, and the page layout similarity is calculated in a grouping mode, so that the efficiency is improved.
In the testing method provided by the embodiment of the disclosure, the application program to be tested is loaded according to the parameters to be tested, the testing result of the application program to be tested is determined according to the page layout similarity of the loaded page and the design page, the automatic testing of the application program to be tested under different parameters to be tested is realized, and the labor cost of manual testing of research personnel is reduced; meanwhile, the test result of the application program to be tested is determined according to the page layout similarity, so that the influence of contents (such as personalized recommendation, text contents, picture contents and the like which can change along with time) on the test result can be reduced, the test result is ensured to be the test result of the UI layer problem of the application program to be tested, the problem of UI non-adaptation caused by running the application program to be tested under different terminals is automatically obtained, and the UI design and modification of design and research personnel are facilitated.
The test method provided by the embodiment of the present disclosure is specifically described below.
As described above, the parameters to be tested can be acquired by acquiring the actual user data with the user agreeing.
Fig. 2 shows a specific flowchart of acquiring parameters to be tested by acquiring real user data, and as shown in fig. 2, acquiring parameters to be tested by acquiring real user data may include step S210.
In step S210, terminal operation data of a terminal running an application program to be tested is obtained, a parameter list to be tested is determined according to the terminal operation data, and the parameter list to be tested includes a plurality of parameters to be tested.
In some possible implementations, in step S210, terminal operation data of a terminal running an application to be tested may be obtained by adding an intermediate layer to the online server.
The terminal operation data comprise data of hardware parameters of the terminal, software parameters of the terminal, and the like, which can be acquired by the UA of the terminal.
As described above, UA is a character string carried when an application program issuing a terminal issues a request to a server, and includes information such as an operating system of the terminal, a browser version of the terminal, a device type of the terminal, and the like, and software parameters of the terminal can be acquired through UA.
Hardware parameters of the terminal such as the size of the screen of the terminal (e.g., the length of the screen, the width of the screen), the screen duty ratio, the resolution of the screen, etc. can be obtained from basic information of the terminal and information obtained by other applications of the terminal.
In some possible implementations, parameters of different terminals may be obtained according to terminal operation data of the different terminals, and the parameters may be used as parameters to be tested.
In some possible implementations, a plurality of different parameters to be tested may be grouped into a list of parameters to be tested.
In some possible implementations, the ranking of the parameters to be tested in the parameter list to be tested may be determined according to the number of terminals running the application to be tested corresponding to the parameters to be tested in the parameter list to be tested.
The more terminals corresponding to the parameters to be tested, that is, the more hardware parameters or software parameters of the terminals are the parameters to be tested, the more users corresponding to the parameters to be tested, the more important the parameters to be tested, the higher the ranking of the parameters to be tested in the list to be tested, and the more important the tests need to be performed (because the more users the number of people to be used is once errors occur).
Therefore, the importance degree of the parameter to be tested can be determined through the ranking of the parameter to be tested in the list to be tested.
As described above, the page layout similarity of the load page and the design page can be obtained by the similarity of the outlines of the controls of the load page and the design page.
Fig. 3 shows a flow chart for obtaining page layout similarity by loading the similarity of the outlines of the controls of the page and the design page, and as shown in fig. 3, obtaining page layout similarity by loading the similarity of the outlines of the controls of the page and the design page may include step S310 and step S320.
In step S310, determining a page layout similarity of the loading page and the design page according to the position information and the size information of at least part of the controls of the loading page and the design page;
in step S320, a test result is determined according to the page layout similarity.
In some possible implementations, in step S310, the control may be a block composed of text, pictures, videos, etc. in the same format in the page, that is, the control is an essential component of the page layout, and the position, size, and shape of the control determine the page layout of the page.
In some possible implementations, the content of the control of the loading page and the design page can be filtered through edge detection, and position information, size information, shape information and the like of the control are obtained.
In some possible implementations, the page layout similarity of the load page and the design page is obtained by comparing size information, shape information, and the like of the closely located controls in the load page and the design page.
In some possible implementations, the page layout similarity of the loading page and the design page may be obtained according to the position information and the size information of the partial controls of the loading page and the design page, or may be obtained according to the position information and the size information of all the controls of the loading page and the design page.
That is, some controls that are not important or have little impact on the page layout may be deleted from the calculation of the page layout similarity, reducing the amount of computation required to calculate the page layout similarity.
In some possible implementations, in step S320, in the case where the page layout similarity is higher than the preset threshold, the loading page and the design page may be considered similar, that is, the loading page effect and the design page effect are similar, which meets the requirements of the designer, and the test may be considered to pass.
Under the condition that the page layout similarity is lower than a preset threshold value, the loading page and the design page can be considered to be dissimilar, namely the effect of loading the page and the effect of designing the page are complementary similar, the requirements of designers are not met, errors can exist, research and development personnel are required to pay attention, and the test is failed.
The page layout similarity of the loading page and the design page is determined through the position information and the size information of the control, so that the influence of information, such as space content, irrelevant to the page layout on the page layout similarity can be avoided, and the page layout similarity is simply calculated.
As described above, the page layout similarity of the load page and the design page can be acquired by the mask layer.
Fig. 4 shows a flow chart of obtaining page layout similarity of a loading page and a design page through a mask layer, and as shown in fig. 4, obtaining page layout similarity of a loading page and a design page through a mask layer may include step S410, step S420, and step S430.
In step S410, according to the mask layer corresponding to the design page, the page layout of the loading page and the page layout of the design page are obtained;
in step S420, the similarity of the page layout of the loading page and the page layout of the design page is calculated, and the page layout similarity is obtained;
in step S430, determining a test result according to the page layout similarity;
the pixels of the mask layer corresponding to the design page are in one-to-one correspondence with the pixels of the design page, and the color of each pixel identifies whether the pixel of the design page corresponding to the pixel is a pixel related to the page layout of the design page.
In some possible implementations, in step S410, the mask may be the same size as the design drawing corresponding to the design page, and the pixels of the mask are in one-to-one correspondence with the pixels of the design drawing, and the color of each pixel of the mask is used to identify whether the pixel of the design drawing corresponding to the pixel is related to the page layout of the design page.
The pixels related to the page layout of the design page may be edge pixels of a control of the design page, and position information, size information, and the like of a space of the design page may be obtained through the pixels.
In some possible implementations, the color of a pixel of the mask layer may be used to identify whether the pixel of the design drawing corresponding to the pixel is related to the page layout of the design page, e.g., using white to identify the pixel of the design drawing corresponding to the pixel as the page layout related pixel of the design page; the pixels of the design drawing corresponding to the pixels using the black code are not the pixels related to the page layout of the design page.
In some possible implementations, according to the mask layer corresponding to the design page, the obtaining the page layout of the loading page may be obtaining the pixel of the loading page corresponding to the pixel if the pixel of the mask layer identifies that the design image pixel corresponding to the pixel is a pixel related to the page layout of the design page; in the case where a pixel of the mask layer identifies that the design image pixel corresponding to the pixel is not a page layout-related pixel of the design page, the pixel of the load page corresponding to the pixel is discarded.
Similarly, according to the mask layer corresponding to the design page, the obtaining the page layout of the design page may be obtaining the pixel of the design page corresponding to the pixel when the pixel of the mask layer identifies that the pixel of the design drawing corresponding to the pixel is the pixel related to the page layout of the design page; in the case where the pixel of the mask layer identifies that the design image pixel corresponding to the pixel is not a page layout-related pixel of the design page, the pixel of the design page corresponding to the pixel is discarded.
In some possible implementations, in step S420, the similarity of the page layout of the loading page and the page layout of the design page is calculated according to the acquired similarity of the pixels of the loading page and the pixels of the design page, and the page layout similarity is acquired.
In some possible implementations, the position information and the size information of the space of the loading page may be determined according to the acquired pixels of the loading page, the position information and the size information of the space of the design page may be determined according to the acquired pixels of the design page, and the page layout similarity may be acquired according to the position information and the size information of the space of the loading page and the position information and the size information of the space of the design page.
In some possible implementations, in step S430, in the case where the page layout similarity is higher than the preset threshold, the loading page and the design page may be considered similar, that is, the loading page effect and the design page effect are similar, which meets the designer' S requirement, and the test may be considered to pass.
Under the condition that the page layout similarity is lower than a preset threshold value, the loading page and the design page can be considered to be dissimilar, namely the effect of loading the page and the effect of designing the page are complementary similar, the requirements of designers are not met, errors can exist, research and development personnel are required to pay attention, and the test is failed.
The page content can be simply and efficiently filtered through the mask layer, and the pixels related to the page layout are obtained, so that the page layout similarity is simply and efficiently calculated.
As described above, the similarity of the loading page and the design diagram corresponding to the design page can be calculated as the page layout similarity by capturing the loading page, and by means of picture segmentation, picture contour extraction and picture comparison.
Fig. 5 is a flowchart illustrating the process of calculating the similarity of the design diagram corresponding to the loading page and the design page by performing screenshot on the loading page, and as shown in fig. 5, the process of calculating the similarity of the design diagram corresponding to the loading page and the design page by performing screenshot on the loading page may include step S510, step S520, and step S530.
In step S510, a screenshot is performed on a loading page, and a loading page image corresponding to the loading page is obtained;
in step S520, calculating the similarity between the loaded page image and the design drawing of the design page of the application program to be tested, and obtaining the page layout similarity;
in step S530, a test result is determined according to the page layout similarity.
In some possible implementations, in step S510, the loading page may be automatically screenshot using a screenshot tool.
In some possible implementation manners, when the length of the loading page is too long, the loading page after the rolling operation can be subjected to screenshot through rolling operation, and the screenshot operation is performed once for each rolling operation to obtain partial page images corresponding to the loading page; and acquiring page images corresponding to the loaded pages by virtue of all the partial page images.
In some possible implementations, in step S520, the similarity of the design diagram corresponding to the loading page and the design page may be calculated as the page layout similarity by means of picture segmentation, picture contour extraction, and picture comparison.
The image segmentation and the image contour extraction can be used for acquiring position information and size information of a control of a loading page and a design page; the image comparison can be used for comparing the similarity of the position information and the size information of the control of the loading page and the design page, and obtaining the page layout similarity.
Of course, the page layout of the loaded page can be obtained by means of the mask layer according to the intersection calculation of the page image and the mask layer; the page layout of the design page is obtained through intersection calculation of the design drawing and the mask layer, and the page layout similarity is calculated through loading the page layout of the page and the page layout of the design page.
In some possible implementations, in step S530, in the case where the page layout similarity is higher than the preset threshold, the loading page and the design page may be considered similar, that is, the loading page effect and the design page effect are similar, which meets the designer' S requirement, and the test may be considered to pass.
Under the condition that the page layout similarity is lower than a preset threshold value, the loading page and the design page can be considered to be dissimilar, namely the effect of loading the page and the effect of designing the page are complementary similar, the requirements of designers are not met, errors can exist, research and development personnel are required to pay attention, and the test is failed.
The loading page is subjected to screenshot, so that the loading page can be displayed to design research personnel in a screenshot mode, and meanwhile, the loading page can be stored, and subsequent checking of the design research personnel is facilitated. The screenshot can be analyzed and processed by some methods of picture processing, and some analysis results are obtained for reference of research personnel.
As described above, a plurality of parameters to be tested can be obtained, the application program to be tested is loaded in parallel according to the plurality of parameters to be tested, the loading page corresponding to each parameter to be tested is obtained, the page layout similarity between the loading pages and the corresponding design page is calculated, and the test results of the loading pages are determined, so that the test efficiency is improved.
Fig. 6 shows a flow chart of parallel loading application programs to be tested according to a plurality of parameters to be tested, obtaining loading pages corresponding to each parameter to be tested, calculating page layout similarity between the loading pages and corresponding design pages, and determining test results of the loading pages, which may include step S610, step S620 and step S630 as shown in fig. 6.
In step S610, a plurality of parameters to be tested of an application to be tested are obtained;
in step S620, according to each parameter to be tested, loading the application program to be tested in parallel, and obtaining a loading page corresponding to each parameter to be tested;
in step S630, for each parameter to be tested, the page layout similarity of the loading page corresponding to the parameter to be tested and the design page corresponding to the parameter to be tested is obtained, and the test result corresponding to the parameter to be tested is determined according to the page layout similarity.
In some possible implementations, in step S610, a plurality of parameters to be tested may be acquired at once, e.g., all or part of the parameters to be tested may be read at once from the list of parameters to be tested.
In some possible implementations, in step S620, the applications to be tested are loaded in parallel with different parameters to be tested, and the task number of each parallel loading may be set by the system, and the applications to be tested corresponding to all the parameters to be tested may be loaded in parallel at one time, or the applications to be tested corresponding to all the parameters to be tested may be loaded in parallel multiple times.
In some possible implementations, in step S630, the process of obtaining the page layout similarity of the loading page corresponding to the parameter to be tested and the design page corresponding to the parameter to be tested may also be performed in parallel.
The method for obtaining the page layout similarity of the loading page corresponding to the parameter to be tested and the design page corresponding to the parameter to be tested and determining the test result corresponding to the parameter to be tested according to the page layout similarity is described above, and is not repeated here.
The efficiency of the test can be greatly improved through parallel loading and parallel similarity calculation.
For example, in the research and development stage, the loading of the loading page corresponding to each model and the displaying and viewing of the loading page need at least 2 minutes and two manpower (research and development personnel and design personnel) to see whether the loading page is consistent with the original design, and when a certain loading page is inconsistent with the original design, the debugging needs to be carried out, and the debugging is at least 30 minutes.
By the testing method provided by the embodiment of the invention, the loading pages corresponding to the parameters to be tested are loaded in parallel, the testing result is determined by calculating the page layout similarity, and the page loading and analysis of 200 parameters to be tested can be executed within 2 minutes at maximum, so that research personnel and design personnel can be helped to find errors in time, and the research and development efficiency is improved.
In some possible implementations, before step S630, that is, before calculating the page layout similarity between the loading pages and the corresponding design pages, the loading pages may be further grouped by calculating the similarity between the loading pages, so as to calculate the page layout similarity in a grouping manner, thereby improving efficiency.
Fig. 7 shows a flow chart of grouping the loaded pages by similarity calculation between the loaded pages, and calculating page layout similarity in a grouping form, as shown in fig. 7, and the step S710, the step S720, the step S730, and the step S740 may be included in the step S by grouping the loaded pages by similarity calculation between the loaded pages.
In step S710, calculating the similarity of the loaded pages corresponding to different parameters to be tested, where the loaded pages with the similarity meeting the preset threshold are used as a loaded page group;
in step S720, determining a design page corresponding to the loading page group according to the design page corresponding to the loading page of the loading page group;
in step S730, for each loading page group, obtaining a page layout similarity between a loading page of the loading page group and a design page corresponding to the loading page group;
in step S740, a test result is determined according to the page layout similarity.
In some possible implementations, in step S710, calculating the similarity of the loaded pages corresponding to the different parameters to be tested may be calculating the page layout similarity of the loaded pages corresponding to the different parameters to be tested.
The method for calculating the page layout similarity is described above and will not be described here again.
In some possible implementations, in step S720, since the similarity of the loaded pages of the same loaded page group is high, the similarity of the design pages corresponding to the loaded pages of the same loaded page group is also high, and may even be the same. Determining the design page corresponding to the loading page group according to the design page corresponding to the loading page of the loading page group may be determining the design page with the largest occurrence number among the design pages corresponding to the loading page of the loading page group as the design page corresponding to the loading page group.
In some possible implementations, in step S730, for each loaded page group, since the corresponding design page is the same, the page layout similarity between the loaded page of the loaded page group and the design page corresponding to the loaded page group can be calculated in parallel, so as to reduce the reading of data in the calculation process (because the design page does not need to be re-read each time), and improve the calculation efficiency.
In some possible implementations, in step S740, in the case that the page layout similarity is higher than the preset threshold, the loading page and the design page may be considered similar, that is, the loading page effect and the design page effect are similar, which meets the requirements of the designer, and the test may be considered to pass.
Under the condition that the page layout similarity is lower than a preset threshold value, the loading page and the design page can be considered to be dissimilar, namely the effect of loading the page and the effect of designing the page are complementary similar, the requirements of designers are not met, errors can exist, research and development personnel are required to pay attention, and the test is failed.
The efficiency of page layout similarity calculation can be reduced through grouping, when the loading pages are found to be inconsistent with the design, the problem exists in all the loading pages of the grouping where the loading pages are located (because the similarity of the page layout of the loading pages of each loading page group is very high, the page layout of one loading page is often described to be very likely to be problematic, and other loading pages in the group are often described to be very likely to be problematic), so the loading pages can be optimized in a grouping mode (namely, unified optimization operation is carried out on all the loading pages of the loading page group), and secondary automatic loading and analysis are carried out in a grouping mode, thereby improving the research and development efficiency.
The test method provided by the embodiment of the present disclosure is specifically described in the following by using a specific embodiment.
Fig. 8 shows the loading page of the application to be tested (grey scale image on top of fig. 8) and the corresponding mask layer (black and white image on bottom of fig. 8) under different parameters to be tested.
As shown in fig. 8, the developer completes the page development and issues, and presents all parameters to be configured through the automated loading module, such as:
size=240×320, ua=zzz (i.e. screen size 240×320, data included in UA is ZZZ, where ZZZ is a representation to distinguish from other UA parameters and does not represent that UA is truly ZZZ);
size=320×480, ua=yyy (i.e. screen size 320×480, data included in UA is YYY, where YYY is a representation to distinguish from other UA parameters and does not represent that UA is truly YYY);
size=320×480, ua=xxx (i.e. screen size 320×480, data included in UA is XXX, where XXX is a representation to distinguish from other UA parameters and does not represent that UA is truly XXX);
the research and development designer may select one or more parameters to be tested, for example, the research and development designer performs the whole selection, after filling in the page URL (uniform resource locator) of the test of the application to be tested, click execution, sequentially using the selected parameters, loading the tested page URL, performing screenshot on the generated page, generating a picture p1, a picture p2, and a picture p3, and saving the generated screenshot.
p1, p2, p3 and the mask (white of the mask is the active area, which needs to be preserved; black is the inactive area, which does not need to be preserved) are calculated to obtain p1', p2', p3'. And (3) performing similarity calculation between p1', p2', and p3' (i.e. calculating the similarity between p1' and p2', and p1' and p3', and p2' and p3', respectively), obtaining a similarity result, and grouping, wherein the p1' and the p2' are similar to form a group.
And calculating the corresponding design drawing d and the mask layer to obtain d ', d' and p1', p2' and p3', respectively, and judging whether the d', d 'and p3' are the same. If the similarity between p3 'and d' cannot meet the threshold, judging that p3 'and d' are different.
The research staff can check the execution result of each parameter to be tested, namely p1, p2 and p3; the developer can view results different from the design drawing, such as p3; the developer can view the results in groups, such as p1, p2.
Based on the same principle as the method shown in fig. 1, fig. 9 shows a schematic structural diagram of a test device provided by an embodiment of the present disclosure, and as shown in fig. 9, the test device 90 may include:
a parameter module 910, configured to obtain parameters to be tested of an application to be tested;
the loading module 920 is configured to load an application program to be tested according to the parameter to be tested, and obtain a loading page;
The computing module 930 is configured to obtain a page layout similarity of the loading page and a design page of the application program to be tested, and determine a test result according to the page layout similarity.
In the testing device provided by the embodiment of the disclosure, the application program to be tested is loaded according to the parameters to be tested, the testing result of the application program to be tested is determined according to the page layout similarity of the loaded page and the design page, the automatic testing of the application program to be tested under different parameters to be tested is realized, and the labor cost of manual testing of research personnel is reduced; meanwhile, the test result of the application program to be tested is determined according to the page layout similarity, so that the influence of contents (such as personalized recommendation, text contents, picture contents and the like which can change along with time) on the test result can be reduced, the test result is ensured to be the test result of the UI layer problem of the application program to be tested, the problem of UI non-adaptation caused by running the application program to be tested under different terminals is automatically obtained, and the UI design and modification of design and research personnel are facilitated.
It will be appreciated that the above-described modules of the test apparatus in the embodiments of the present disclosure have the function of implementing the corresponding steps of the test method in the embodiment shown in fig. 1. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the above-mentioned testing device, reference may be specifically made to the corresponding description of the testing method in the embodiment shown in fig. 1, which is not repeated herein.
In some possible implementations, the computing module 930 includes: the control unit is used for determining the page layout similarity of the loading page and the design page according to the position information and the size information of at least part of the controls of the loading page and the design page; and the result calculation unit is used for determining a test result according to the page layout similarity.
In some possible implementations, the computing module 930 includes: the mask unit is used for acquiring the page layout of the loading page and the page layout of the design page according to the mask corresponding to the design page; the similarity calculation unit is used for calculating the similarity of the page layout of the loading page and the page layout of the design page, and obtaining the page layout similarity; the result calculation unit is used for determining a test result according to the page layout similarity; the pixels of the mask layer corresponding to the design page are in one-to-one correspondence with the pixels of the design page, and the color of each pixel identifies whether the pixel of the design page corresponding to the pixel is a pixel related to the page layout of the design page.
In some possible implementations, the parameter module 910 is further configured to: acquiring a plurality of parameters to be tested of an application program to be tested; the loading module 920 is further configured to: according to each parameter to be tested, loading the application program to be tested in parallel, and obtaining a loading page corresponding to each parameter to be tested; the computing module 930 is further configured to: and obtaining the page layout similarity of the loading page corresponding to the parameter to be tested and the design page corresponding to the parameter to be tested according to each parameter to be tested, and determining a test result corresponding to the parameter to be tested according to the page layout similarity.
In some possible implementations, the computing module 930 includes: the grouping determination unit is used for calculating the similarity of the loading pages corresponding to different parameters to be tested, and the loading pages with the similarity meeting a preset threshold value are used as a loading page group; the grouping design unit is used for determining the design page corresponding to the loading page group according to the design page corresponding to the loading page of the loading page group; the grouping calculation unit is used for acquiring page layout similarity of the loading pages of the loading page group and the design pages corresponding to the loading page group for each loading page group; and the result calculation unit is used for determining a test result according to the page layout similarity.
In some possible implementations, the computing module 930 includes: the screenshot unit is used for screenshot the loading page and obtaining a loading page image corresponding to the loading page; the screenshot calculation unit is used for calculating the similarity between the loaded page image and the design drawing of the design page of the application program to be tested and obtaining page layout similarity; and the result calculation unit is used for determining a test result according to the page layout similarity.
In some possible implementations, the screenshot unit is further configured to: performing rolling operation on the loading page, and performing screenshot on the loading page after the rolling operation to obtain a partial page image corresponding to the loading page; and splicing all the partial page images to obtain a loading page image corresponding to the loading page.
In some possible implementations, the parameters to be tested include a screen parameter of a release terminal corresponding to the application to be tested, a system parameter of the release terminal, and a software parameter of the application to be tested.
In some possible implementations, the parameter module 910 includes: the data acquisition unit is used for acquiring terminal operation data of a terminal for operating the application program to be tested, determining a parameter list to be tested according to the terminal operation data, wherein the parameter list to be tested comprises a plurality of parameters to be tested.
In some possible implementations, the parameter module 910 further includes: the ranking unit is used for determining the ranking of the parameters to be tested in the parameter list to be tested according to the number of terminals running the application program to be tested corresponding to the parameters to be tested.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the test methods as provided by the embodiments of the present disclosure.
Compared with the prior art, the electronic equipment loads the application program to be tested according to the parameters to be tested, determines the test result of the application program to be tested according to the page layout similarity of the loaded page and the design page, realizes the automatic test of the application program to be tested under different parameters to be tested, and reduces the manual test labor cost of research personnel; meanwhile, the test result of the application program to be tested is determined according to the page layout similarity, so that the influence of contents (such as personalized recommendation, text contents, picture contents and the like which can change along with time) on the test result can be reduced, the test result is ensured to be the test result of the UI layer problem of the application program to be tested, the problem of UI non-adaptation caused by running the application program to be tested under different terminals is automatically obtained, and the UI design and modification of design and research personnel are facilitated.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a test method as provided by embodiments of the present disclosure.
Compared with the prior art, the readable storage medium loads the application program to be tested according to the parameters to be tested, determines the test result of the application program to be tested according to the page layout similarity of the loaded page and the design page, realizes the automatic test of the application program to be tested under different parameters to be tested, and reduces the manual test labor cost of research personnel; meanwhile, the test result of the application program to be tested is determined according to the page layout similarity, so that the influence of contents (such as personalized recommendation, text contents, picture contents and the like which can change along with time) on the test result can be reduced, the test result is ensured to be the test result of the UI layer problem of the application program to be tested, the problem of UI non-adaptation caused by running the application program to be tested under different terminals is automatically obtained, and the UI design and modification of design and research personnel are facilitated.
The computer program product comprises a computer program which, when executed by a processor, implements a test method as provided by embodiments of the present disclosure.
Compared with the prior art, the computer program product loads the application program to be tested according to the parameters to be tested, determines the test result of the application program to be tested according to the page layout similarity of the loaded page and the design page, realizes the automatic test of the application program to be tested under different parameters to be tested, and reduces the labor cost of manual test of research personnel; meanwhile, the test result of the application program to be tested is determined according to the page layout similarity, so that the influence of contents (such as personalized recommendation, text contents, picture contents and the like which can change along with time) on the test result can be reduced, the test result is ensured to be the test result of the UI layer problem of the application program to be tested, the problem of UI non-adaptation caused by running the application program to be tested under different terminals is automatically obtained, and the UI design and modification of design and research personnel are facilitated.
Fig. 10 shows a schematic block diagram of an example electronic device 1000 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the apparatus 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM1002, and the RAM1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Various components in device 1000 are connected to I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and communication unit 1009 such as a network card, modem, wireless communication transceiver, etc. Communication unit 1009 allows device 1000 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The computing unit 1001 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the respective methods and processes described above, such as a test method. For example, in some embodiments, the test method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1000 via ROM1002 and/or communication unit 1009. When the computer program is loaded into RAM1003 and executed by computing unit 1001, one or more steps of the test method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (20)

1. A method of testing, comprising:
acquiring parameters to be tested of an application program to be tested;
loading the application program to be tested according to the parameter to be tested, and obtaining a loading page;
and obtaining the page layout similarity of the loading page and the design page of the application program to be tested, and determining a test result according to the page layout similarity.
2. The method of claim 1, wherein the obtaining the page layout similarity of the loading page and the design page of the application to be tested, and determining the test result according to the page layout similarity, comprises:
Determining the page layout similarity of the loading page and the design page according to the position information and the size information of at least part of the controls of the loading page and the design page;
and determining a test result according to the page layout similarity.
3. The method of claim 1, wherein the obtaining the page layout similarity of the loading page and the design page of the application to be tested, and determining the test result according to the page layout similarity, comprises:
acquiring the page layout of the loading page and the page layout of the design page according to the mask layer corresponding to the design page;
calculating the similarity of the page layout of the loading page and the page layout of the design page, and obtaining the similarity of the page layout;
determining a test result according to the page layout similarity;
the pixels of the mask layer corresponding to the design page are in one-to-one correspondence with the pixels of the design page, and the color of each pixel identifies whether the pixel of the design page corresponding to the pixel is a pixel related to the page layout of the design page.
4. The method of claim 1, wherein the obtaining parameters to be tested of the application to be tested comprises:
Acquiring a plurality of parameters to be tested of an application program to be tested;
loading the application program to be tested according to the parameter to be tested, and obtaining a loading page, including:
according to each parameter to be tested, loading the application program to be tested in parallel, and obtaining a loading page corresponding to each parameter to be tested;
the step of obtaining the page layout similarity of the loading page and the design page of the application program to be tested, and determining the test result according to the page layout similarity comprises the following steps:
and for each parameter to be tested, acquiring the page layout similarity of a loading page corresponding to the parameter to be tested and a design page corresponding to the parameter to be tested, and determining a test result corresponding to the parameter to be tested according to the page layout similarity.
5. The method of claim 4, wherein the obtaining the page layout similarity of the loading page and the design page of the application to be tested, and determining the test result according to the page layout similarity, comprises:
calculating the similarity of the loading pages corresponding to different parameters to be tested, wherein the loading pages with the similarity meeting a preset threshold value are used as a loading page group;
Determining a design page corresponding to the loading page group according to the design page corresponding to the loading page of the loading page group;
for each loading page group, obtaining page layout similarity of loading pages of the loading page group and design pages corresponding to the loading page group;
and determining a test result according to the page layout similarity.
6. The method of claim 1, wherein the obtaining the page layout similarity of the loading page and the design page of the application to be tested, and determining the test result according to the page layout similarity, comprises:
capturing a screenshot of the loading page to obtain a loading page image corresponding to the loading page;
calculating the similarity between the loaded page image and a design drawing of a design page of the application program to be tested, and acquiring the page layout similarity;
and determining a test result according to the page layout similarity.
7. The method of claim 6, wherein the capturing the loading page to obtain a loading page image corresponding to the loading page comprises:
performing a scrolling operation on the loading page, and performing screenshot on the loading page after the scrolling operation to obtain a part of page images corresponding to the loading page;
And splicing all the partial page images to obtain a loading page image corresponding to the loading page.
8. The method of claim 1, wherein the parameters to be tested comprise screen parameters of a release terminal corresponding to the application to be tested, and system parameters of the release terminal.
9. The method of claim 1, wherein the obtaining parameters to be tested of the application to be tested comprises:
acquiring terminal operation data of a terminal running the application program to be tested, and determining a parameter list to be tested according to the terminal operation data, wherein the parameter list to be tested comprises a plurality of parameters to be tested.
10. The method of claim 9, wherein after determining the list of parameters to be tested according to the terminal operation data, further comprising:
and determining the ranking of the parameters to be tested in the parameter list to be tested according to the number of terminals running the application program to be tested corresponding to the parameters to be tested.
11. A test apparatus comprising:
the parameter module is used for acquiring parameters to be tested of the application program to be tested;
the loading module is used for loading the application program to be tested according to the parameter to be tested and obtaining a loading page;
The calculation module is used for obtaining the page layout similarity of the loading page and the design page of the application program to be tested, and determining a test result according to the page layout similarity.
12. The apparatus of claim 11, wherein the computing module comprises:
the control unit is used for determining the page layout similarity of the loading page and the design page according to the position information and the size information of at least part of the controls of the loading page and the design page;
and the result calculation unit is used for determining a test result according to the page layout similarity.
13. The apparatus of claim 11, wherein the computing module comprises:
the mask unit is used for acquiring the page layout of the loading page and the page layout of the design page according to the mask corresponding to the design page;
the similarity calculation unit is used for calculating the similarity of the page layout of the loading page and the page layout of the design page, and obtaining the page layout similarity;
the result calculation unit is used for determining a test result according to the page layout similarity;
the pixels of the mask layer corresponding to the design page are in one-to-one correspondence with the pixels of the design page, and the color of each pixel identifies whether the pixel of the design page corresponding to the pixel is a pixel related to the page layout of the design page.
14. The apparatus of claim 11, wherein the parameter module is further to: acquiring a plurality of parameters to be tested of an application program to be tested;
the loading module is further configured to: according to each parameter to be tested, loading the application program to be tested in parallel, and obtaining a loading page corresponding to each parameter to be tested;
the computing module is further for: and for each parameter to be tested, acquiring the page layout similarity of a loading page corresponding to the parameter to be tested and a design page corresponding to the parameter to be tested, and determining a test result corresponding to the parameter to be tested according to the page layout similarity.
15. The apparatus of claim 14, wherein the computing module comprises:
the grouping determination unit is used for calculating the similarity of the loading pages corresponding to different parameters to be tested, and the loading pages with the similarity meeting a preset threshold value are used as a loading page group;
the grouping design unit is used for determining the design page corresponding to the loading page group according to the design page corresponding to the loading page of the loading page group;
the grouping calculation unit is used for acquiring page layout similarity of a loading page of the loading page group and a design page corresponding to the loading page group for each loading page group;
And the result calculation unit is used for determining a test result according to the page layout similarity.
16. The apparatus of claim 11, wherein the parameters to be tested comprise screen parameters of a distribution terminal corresponding to the application to be tested, and system parameters of the distribution terminal.
17. The apparatus of claim 11, wherein the parameter module comprises:
the data acquisition unit is used for acquiring terminal operation data of a terminal for operating the application program to be tested, and determining a parameter list to be tested according to the terminal operation data, wherein the parameter list to be tested comprises a plurality of parameters to be tested.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
19. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-10.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-10.
CN202310685087.XA 2023-06-09 2023-06-09 Test method, test device, electronic equipment and computer readable storage medium Pending CN116881121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310685087.XA CN116881121A (en) 2023-06-09 2023-06-09 Test method, test device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310685087.XA CN116881121A (en) 2023-06-09 2023-06-09 Test method, test device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116881121A true CN116881121A (en) 2023-10-13

Family

ID=88259384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310685087.XA Pending CN116881121A (en) 2023-06-09 2023-06-09 Test method, test device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116881121A (en)

Similar Documents

Publication Publication Date Title
CN113808231B (en) Information processing method and device, image rendering method and device, and electronic device
CN109582317B (en) Method and apparatus for debugging hosted applications
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN110874172B (en) Method, device, medium and electronic equipment for amplifying APP interface
CN112835579A (en) Method and device for determining interface code, electronic equipment and storage medium
CN114218890A (en) Page rendering method and device, electronic equipment and storage medium
CN113780297B (en) Image processing method, device, equipment and storage medium
CN112433713A (en) Application program design graph processing method and device
CN113625923A (en) Mouse processing method and device based on remote cloud desktop, storage medium and equipment
CN113807410B (en) Image recognition method and device and electronic equipment
CN115756461A (en) Annotation template generation method, image identification method and device and electronic equipment
CN116881121A (en) Test method, test device, electronic equipment and computer readable storage medium
CN114138358A (en) Application program starting optimization method, device, equipment and storage medium
CN113657230B (en) Method for training news video recognition model, method for detecting video and device thereof
CN113886745B (en) Page picture testing method and device and electronic equipment
CN114546199B (en) Image processing method, device, electronic equipment and storage medium
CN113360407B (en) Function positioning method and device, electronic equipment and readable storage medium
CN114328242B (en) Form testing method and device, electronic equipment and medium
CN113835893B (en) Data processing method, device, equipment, storage medium and program product
CN114398131B (en) Information display method, device, equipment, medium and program product
CN113438428B (en) Method, apparatus, device and computer-readable storage medium for automated video generation
US20210216597A1 (en) Method and apparatus for processing mini app material, electronic device and medium
CN117407044A (en) Configuration method, device, equipment and medium of cross-terminal assembly
CN114511535A (en) White screen detection method and device, electronic equipment, medium and product
CN117576388A (en) Image processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination