Browser automatic testing method and device, equipment and medium

By using the access simulation tool to log in and save login information on a browser, the problem of frequent login in multi-browser tests is solved, the efficiency of automated testing is improved, and efficient reuse of browser automation tests is achieved.

CN119271547APending Publication Date: 2025-01-07SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411281029.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

During the web page automation testing process, multiple browsers are used across services and each browser needs to log in to an account, which results in the login process being new for each session, and more accounts need to be prepared in advance, resulting in inefficient automation testing.

Method used

By specifying the user directory on one browser to log in and save the directory, the login information is reused on other browsers, reducing frequent account switching and repeated login operations, and improving testing efficiency.

Benefits of technology

It greatly improves the efficiency of browser automation testing, avoids frequent login operations, and only needs to access the simulation tool at one time to simulate login, and supports automated testing of multiple browsers, including browsers on local and remote services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271547A_ABST
    Figure CN119271547A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of browser testing, and discloses an automatic browser testing method and device, equipment and a medium, which are used for improving the processing efficiency. The method comprises the following steps: receiving a test request, wherein the test request comprises an automatic test item; calling an access simulation tool in response to the test request, enabling the access simulation tool to specify a user directory to start a first browser, and logging in a target webpage on the first browser; after the login succeeds, storing the user directory; and starting a plurality of second browsers, respectively recalling the stored login information of the user directory on the plurality of second browsers to log in the target webpage, and after login succeeds, executing an automatic test on each logged-in target webpage according to the automatic test item.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated testing technology, and in particular to a browser automated testing method, device, equipment and storage medium. Background Art

[0002] During the automated testing of web pages, when multiple browsers need to be used across services and each browser needs to log in to an account for testing, the login process is a new session for each browser, so an account needs to be logged in. It can be seen that the above solution leads to the need to prepare more accounts in advance for each session during the automated testing process to perform account login operations and perform automated testing, resulting in relatively low efficiency of browser automated testing. Summary of the invention

[0003] Based on this, it is necessary to provide a browser automation testing method, device, equipment and storage medium to address the above technical problems, so as to solve the technical problem of low efficiency of browser automation testing.

[0004] In order to solve the above technical problems, the following technical solutions are provided: In a first aspect, a browser automation testing method is provided, the method comprising: receiving a test request, wherein the test request includes an automated test item; In response to the test request, calling an access simulation tool, causing the access simulation tool to start a first browser by specifying a user directory, and log in to a target web page on the first browser; After the login is successful, saving the user directory; A plurality of second browsers are started, and the login information of the user directory saved in the plurality of second browsers is respectively recalled to log in to the target webpage, and after the login is successful, the automated test is performed on each of the logged in target webpages according to the automated test items.

[0005] Furthermore, the plurality of the second browsers include local browsers and browsers on remote services.

[0006] Furthermore, after respectively recalling the login information of the user directory saved on the plurality of second browsers to log in to the target webpage, the method further comprises: Determining a login status of the target webpage on the second browser; When the login status indicates a login timeout, the step of calling the access simulation tool in response to the test request is re-executed, so that the access simulation tool specifies a user directory to start the first browser and saves the user directory after the login is successful.

[0007] Furthermore, the versions of the first browser and the second browser are the same version; or; the second browsers are browsers from different manufacturers.

[0008] Furthermore, the automated test items include a plurality of basic test items and a plurality of additional test items, and the automated test is performed on each logged-in target web page according to the automated test items, including: Parsing the operating environment of each second browser among the plurality of second browsers respectively to obtain a parsing result of the operating environment corresponding to each second browser, wherein the operating environment includes operating system information and operating device information; According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers; Using a plurality of basic test items and matching additional test items, respectively, to perform automated testing on each of the logged-in target web pages; The test results of each of the logged-in target web pages after executing the automated test are integrated to obtain an integrated test result.

[0009] Furthermore, the step of integrating the test results of each logged-in target webpage after executing the automated test to obtain the integrated test results further includes: Automatically parsing the integration test result to obtain a parsing result, wherein the parsing result includes an abnormal point test result corresponding to each of the second browsers; Receive additional test items configured by the user for the analysis result, and update the newly configured additional test items into the test item library.

[0010] In a second aspect, a browser automation testing device is provided, the device comprising: A receiving module, configured to receive a test request, wherein the test request includes an automated test item; A calling module, configured to call an access simulation tool in response to the test request, so that the access simulation tool starts a first browser by specifying a user directory, and logs in a target web page on the first browser; A saving module, used to save the user directory after the login is successful; The test module is used to start multiple second browsers, respectively recall the login information of the user directory saved on the multiple second browsers to log in to the target web page, and after successful login, perform automated testing on each logged-in target web page according to the automated test items.

[0011] Furthermore, the automated test items include a plurality of basic test items and a plurality of additional test items, and the test module is also used for: Parsing the operating environment of each second browser among the plurality of second browsers respectively to obtain a parsing result of the operating environment corresponding to each second browser, wherein the operating environment includes operating system information and operating device information; According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers; Using a plurality of basic test items and matching additional test items, respectively, to perform automated testing on each of the logged-in target web pages; The test results of each of the logged-in target web pages after executing the automated test are integrated to obtain an integrated test result.

[0012] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the browser automation testing method as described in any of the foregoing when executing the computer program.

[0013] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the browser automation testing method as described in any one of the above items are implemented.

[0014] It can be seen that in one of the solutions provided by this application, the access simulation tool is first used on a browser to specify a user directory for login and save the directory, so that the login information is stored in the specified user directory; then multiple browsers to be tested are started, and the login information stored in the user directory is reused to automatically log in for automated testing; the entire process first uses the access simulation tool to simulate the login to the specified user directory to save the session information for subsequent login reuse in other browsers. If the login information is not invalid, only one access simulation tool is needed to simulate the login, and there is no need to frequently switch accounts to log in, and there is no need to perform repeated login operations during testing. It can be seen that the efficiency of browser testing is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0016] Figure 1 This is a flowchart of a browser automation testing method in an embodiment of the present application; Figure 2This is another flow chart of a browser automation testing method in one embodiment of the present application; Figure 3 It is a structural schematic diagram of a browser automation testing device in one embodiment of the present application; Figure 4 It is a structural schematic diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] In the traditional process of automated testing of web pages, when multiple browsers need to be used across services and each browser needs to log in to an account for testing, for each browser, the login process is a new session, so a login account is required, which will result in the need to prepare more accounts in advance for each session during the automated testing process to perform account login operations, that is, more accounts need to be prepared and logins are repeated frequently, resulting in relatively low test efficiency. To solve this technical problem, the embodiments of the present application provide a browser automated testing method for improving test efficiency, and each embodiment is described in detail below.

[0019] like Figure 1 In one embodiment, a browser automation testing method is provided, the method comprising: S10, receiving a test request, where the test request includes automated test items; S20, calling the access simulation tool in response to the test request, causing the access simulation tool to start the first browser by specifying a user directory, and log in to the target webpage on the first browser; S30, after the login is successful, saving the user directory; S40, starting a plurality of second browsers, respectively recalling the saved login information of the user directory on the plurality of second browsers to log in to the target web page, and after successful login, performing automated testing on each logged-in target web page according to the automated testing items.

[0020] Browser automation testing refers to simulating real users to operate the browser, and performing browser operations such as clicking, inputting, opening and verifying on the browser, so as to test the target web page running on the browser from the perspective of the end user. Browser testing needs to be tested multiple times on different browsers. In this embodiment, when receiving a test request containing automated test items of the browser, the test request will be responded to first to call the access simulation tool, so that the access simulation tool specifies the user directory to start the first browser, and the access simulation tool uses a pre-prepared account to log in to the target web page on the first browser. The automated test items in the test request are used for the test information required to perform automated testing after a subsequent successful login. The test request can be manually triggered or automatically triggered by the corresponding test terminal, without specific limitation.

[0021] It should be noted that the access simulation tool refers to a tool that can be used to simulate a user accessing a target web page. For example, after receiving a test request, the selenium tool can be used to specify a user directory to start the first browser, so that the selenium tool uses a pre-prepared account to log in to the target web page on the first browser. The above process can be configured in advance by the selenium tool. The selenium tool is a common automation tool. The most commonly used application scenario is to perform web page automation testing, including simulating the operations that a real user may have in a browser, including simulating the user's login operation on the target web page of the browser. Therefore, this embodiment uses the selenium tool to quickly and conveniently specify the user directory to start the first browser, and log in to the target web page on the first browser. In addition to using the above-mentioned selenium tool, the access simulation tool can also use other similar tools with simulated login, which are not specifically limited. In addition, the first browser refers to any browser among the many browsers to be tested or a browser that is not to be tested, which is not specifically limited, and the target web page refers to an application running on the browser that needs to be logged in and verified.

[0022] After logging into the target webpage on the first browser using the access simulation tool, since a user directory is specified for logging in, after the login is successful, the user directory will have login information. This embodiment will save the user directory for subsequent testing and exit the first browser. Then, multiple second browsers are started, and the login information of the user directory saved on the multiple second browsers is recalled to log into the target webpage, which is equivalent to obtaining the session information stored in the user directory in the above step. The session information of the user directory is specified to start a new browser to access the target webpage to refresh the login information in the loaded session information, and after the login is successful, the automated test is performed on each of the logged-in target webpages according to the automated test items.

[0023] It can be seen that in the embodiment of the present application, a browser automation testing method is provided, which first uses an access simulation tool on a browser to specify a user directory to log in and save the directory, so that the specified user directory has login information; then multiple browsers to be tested are started, and the login information stored in the user directory is reused to automatically log in for automated testing; the entire process first uses the access simulation tool to simulate the login to the specified user directory to save the session information for subsequent login reuse in other browsers. In the case that the login information is not invalid, only one access simulation tool is needed to simulate the login, and there is no need to frequently switch accounts to log in, and there is no need to perform repeated login operations during testing. It can be seen that compared with the traditional solution, the test efficiency is greatly improved.

[0024] In one embodiment, the plurality of second browsers include a local browser and a browser on a remote service.

[0025] The local browser refers to the browser installed locally on the terminal, and the browser on the remote service also refers to the remote service browser. For example, the remote service browser includes a browser running in the form of a container on the cloud, which is not specifically limited. In this embodiment, the application scenario of browser automation testing is expanded. Due to the processing mechanism of this embodiment, the session information saved after the access simulation tool simulates the login can be directly reused, making the above test application scenario possible, so that the same session simulated by the access simulation tool can support the expansion of more browsers, including browsers on remote services for automated testing, and effectively and comprehensively verify the target web page.

[0026] It is also worth mentioning that through the browser on the remote service, more browsers can be copied in batches for automated testing, further improving testing efficiency.

[0027] In one embodiment, after step 30, that is, after respectively recalling the login information of the user directory saved on the plurality of second browsers to log in to the target webpage, the method further includes: Determining a login status of the target webpage on the second browser; When the login status indicates a login timeout, the step of calling the access simulation tool in response to the test request is re-executed, so that the access simulation tool specifies a user directory to start the first browser and saves the user directory after the login is successful.

[0028] In this embodiment, in the process of respectively recalling the login information of the user directory saved on multiple second browsers to log in to the target webpage, since the target webpage may have a timeout login restriction, that is, the target webpage has a time limit for the session information, this step needs to add the judgment logic of the login status. For the login information of the reused session information, if it times out, the login information in the user directory cannot be reused, resulting in login failure and inability to perform subsequent automated testing. Therefore, in this embodiment, after the login information of the user directory saved on multiple second browsers is recalled to log in to the target webpage, the login status of the target webpage on the second browser will be judged. If the login status indicates a login timeout, the step of calling the access simulation tool in response to the test request, so that the access simulation tool specifies the user directory to start the first browser and save the user directory after the login is successful, that is, re-execute step S10 to re-acquire new session information so that the new session information can be reused to perform the subsequent automated testing steps to ensure the implementation of the solution. For example, the selenium tool is used again to specify the user directory to start the first browser, so that the selenium tool uses the pre-prepared account to log in to the target webpage on the first browser again, and saves the user directory for reuse when starting the second browser later.

[0029] It can be seen that in this embodiment, the problem of automated test failure caused by the login timeout setting of the target webpage is effectively avoided through the logical determination of the login status, thereby ensuring the effective execution of the automated test.

[0030] In one embodiment, the versions of the first browser and the second browser are the same. In this embodiment, since the first time the access simulation tool is called to specify the user directory to start the first browser and log in to the target webpage on the first browser, the specified user directory saves the session information of the successful login in the first browser. In this embodiment, in order to further ensure the smoothness of the automated testing process and reduce the occurrence of failures, the first browser that the access simulation tool simulates the login and the second browser that reuses the session information later will be kept the same version, thereby effectively avoiding the problem that the user information may not be universal due to different versions.

[0031] In one embodiment, the plurality of second browsers may also be different types of browsers, that is, browsers provided by different manufacturers. In this way, a large number of different types of browsers can be automatically tested simultaneously, thereby verifying the operation of the target web page in different browsers and verifying the compatibility of the browsers.

[0032] In one embodiment, if Figure 2As shown, the automated test items include multiple basic test items and multiple additional test items. In step S40, that is, performing automated tests on each logged-in target web page according to the automated test items, includes: S41, respectively analyzing the operating environment of each second browser among the plurality of second browsers to obtain an operating environment analysis result corresponding to each second browser, wherein the operating environment includes operating system information and operating device information; S42, matching one or more additional test items for each second browser according to the analysis result of the operating environment corresponding to each second browser; S43, using a plurality of basic test items and matching additional test items to perform automated testing on each of the logged-in target web pages; S44, integrating the test results of each logged-in target webpage after executing the automated test to obtain an integrated test result.

[0033] In this embodiment, the automated test items include test items of multiple different test types, mainly including multiple basic test items and multiple additional test items, wherein the basic test items refer to some basic test types necessary for automated testing of the target web page, exemplary, for example, including but not limited to the target web page click, input, open and other operations, and / or the test of the response of the functional module provided by the target web page. The additional test items refer to the test types that are additionally customized for some special operating environments of the target web page. It should be understood that the operating environments of multiple browsers are different. For example, for local browsers, the systems and devices they run are quite different; similarly, for browsers of remote services, some of them exist in the form of containers, and the situation is relatively special. For the above situation, a variety of general additional test items are set. Exemplarily, taking the container-mounted environment as an example, customized test types can be set for functions such as form input and data reading. In addition, the operating systems carried by the browsers are also different, such as windows system, windows system on virtual machines, linux operating system, and so on.

[0034] Therefore, in this embodiment, during the process of executing the automated test on each of the logged-in target web pages, the operating environment of each of the multiple second browsers is analyzed respectively to obtain the analysis result of the operating environment corresponding to each of the second browsers, wherein the operating environment includes the operating system information and the operating device information. According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers. According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers. The test results after the automated test is executed on each of the logged-in target web pages are integrated to obtain the integrated test result.

[0035] For example, each of the logged-in target web pages performs automated testing. For example, browser 1 uses basic test item 1 and basic test item 2; browser 2 uses test item 1 and basic test item 2; browser 3 uses test item 1, basic test item 2, and additional test item 3; browser 4 uses test item 1, basic test item 2, and additional test item 4; and so on, finally obtaining the test results on different browsers, and finally performing integration processing to obtain automated test results.

[0036] It can be seen that in this embodiment, a plurality of basic items are used to ensure the basic complete test content of each second browser test, and secondly, matching additional test items are used to obtain test information under special circumstances, so that the integrated automated test results contain more and more comprehensive test content; at the same time, each browser can contain different test content, which is targeted and can be tested at the same time without interfering with each other, which is conducive to subsequent optimization or improvement of target web page development and has higher application value.

[0037] In one embodiment, after step S44, that is, integrating the test results of each logged-in target webpage after executing the automated test and obtaining the integrated test results, the following is further included: S45, automatically parsing the integrated test result to obtain a parsing result, wherein the parsing result includes an abnormal point test result corresponding to each of the second browsers; S45: receiving additional test items configured by the user for the analysis result, and updating the newly configured additional test items into the test item library.

[0038] Based on the above embodiment, after integrating the test results of each logged-in target web page after executing the automated test and obtaining the integrated test results, in order to ensure the completeness and pertinence of the subsequent automated test process, a test item library will be set up, which contains test items of multiple different test types, mainly including multiple basic test items and multiple additional test items. During the automated test, the required test items are selected from the test item library. In this embodiment, the integrated test results are automatically parsed to obtain the parsed results, which contain the abnormal point test results corresponding to each of the second browsers. For example, browser A and browser B may contain different additional test items. After the two are automatically tested according to the test method of this application, the abnormal points that appear in the end may be different. Therefore, it is necessary to configure new additional test items for these abnormalities and update them to the library for later matching and use.

[0039] In this embodiment, the integrated test results are automatically parsed to obtain parsed results, additional test items configured by the user for the parsed results are received, and the newly configured additional test items are updated to the test item library, so as to further update the breadth and depth of the content of the additional test items in a targeted manner, which is conducive to improving the sophistication and comprehensiveness of browser automation testing.

[0040] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0041] It should be noted that the above embodiment describes a browser automation testing method provided in the embodiment of the present application. Based on the browser automation testing method, a corresponding browser automation testing device is also provided, which are described separately below.

[0042] like Figure 3 A browser automation testing device is provided, characterized in that the device includes a receiving module 101, a calling module 102, a saving module 103 and a testing module 104.

[0043] The receiving module 101 is used to receive a test request, wherein the test request includes an automated test item; The calling module 102 is used to call the access simulation tool in response to the test request, so that the access simulation tool starts the first browser by specifying the user directory and logs in the target web page on the first browser; A saving module 103, used for saving the user directory after the login is successful; The test module 104 is used to start multiple second browsers, respectively recall the login information of the user directory saved on the multiple second browsers to log in to the target web page, and after successful login, perform automated testing on each logged-in target web page according to the automated test items.

[0044] It can be seen that in the embodiment of the present application, a browser automation testing device is provided, which first uses an access simulation tool on a browser to specify a user directory to log in and save the directory, so that the login information is stored in the specified user directory; then multiple browsers to be tested are started, and the login information stored in the user directory is reused to automatically log in for automated testing; the entire process first uses the access simulation tool to simulate the login to the specified user directory to save the session information for subsequent login reuse in other browsers. In the case that the login information is not invalid, only one access simulation tool is needed to simulate the login, and there is no need to frequently switch accounts to log in, and there is no need to perform repeated login operations during testing. It can be seen that compared with the traditional solution, the test efficiency is greatly improved.

[0045] In one embodiment, the automated test items include multiple basic test items and multiple additional test items, and the test module 104 is further used to: Parsing the operating environment of each second browser among the plurality of second browsers respectively to obtain a parsing result of the operating environment corresponding to each second browser, wherein the operating environment includes operating system information and operating device information; According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers; Using a plurality of basic test items and matching additional test items, respectively, to perform automated testing on each of the logged-in target web pages; The test results of each of the logged-in target web pages after executing the automated test are integrated to obtain an integrated test result.

[0046] It can be seen that in the browser automation testing device provided in this embodiment, a plurality of basic items are used to ensure the basic complete test content of each second browser test, and secondly, matching additional test items are used to obtain test information under special circumstances, so that the integrated automated test results contain more and more comprehensive test content; at the same time, each browser can contain different test content and be tested at the same time without interfering with each other, which is conducive to subsequent optimization or improvement of target web page development and has higher application value.

[0047] In one embodiment, the testing module 104 is further configured to: Automatically parsing the integration test result to obtain a parsing result, wherein the parsing result includes an abnormal point test result corresponding to each of the second browsers; Receive additional test items configured by the user for the analysis result, and update the newly configured additional test items into the test item library.

[0048] In one embodiment, the plurality of second browsers include a local browser and a browser on a remote service.

[0049] In one embodiment, the browser automated testing apparatus is further used for: Determining a login status of the target webpage on the second browser; When the login status indicates a login timeout, the step of calling the access simulation tool in response to the test request is re-executed, so that the access simulation tool specifies a user directory to start the first browser and saves the user directory after the login is successful.

[0050] In one embodiment, the versions of the first browser and the second browser are the same version; or; the second browsers are browsers from different manufacturers.

[0051] It should be understood that for various details and possible implementations of the browser automation testing device, reference may also be made to the relevant descriptions of the aforementioned embodiments. To avoid redundant descriptions, the specific descriptions are not repeated here one by one.

[0052] In one embodiment, a computer device is provided. The computer device may be a server. The computer device is used to implement the steps in a browser automation testing method or the functions of a browser automation testing device. The internal structure diagram thereof may be as follows: Figure 4 As shown. The computer device includes a processor and a memory connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The computer device also includes a computer-readable storage medium and a memory. When the computer-readable instructions are executed by the processor, the steps in a browser automation testing method or the functions of a browser automation testing device are implemented. The computer-readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0053] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the steps in the aforementioned browser automation testing method or the functional steps of a browser automation testing device when executing the computer-readable instructions.

[0054] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps in any of the aforementioned browser automation testing methods, or the steps of virtualizing services in the functions of a browser automation testing device.

[0055] It can be seen that in the computer-readable storage medium or computer device provided by the present application, firstly, a designated user directory is logged in and saved using an access simulation tool on a browser, so that login information is stored in the designated user directory; then multiple browsers to be tested are started, and the login information stored in the user directory is reused to automatically log in and perform automated testing; the entire process first uses the access simulation tool to simulate the login to the designated user directory to save the session information for subsequent login reuse in other browsers, and in the case where the login information is not invalid, only one access simulation tool is needed to simulate the login, and there is no need to frequently switch accounts to log in, and there is no need to perform repeated login operations during testing. It can be seen that the efficiency of browser testing is greatly improved.

[0056] It should be noted that more details about the implementation of the computer device or computer-readable storage medium can be found in the records of the aforementioned method embodiments, and the specific description will not be repeated here.

[0057] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0058] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0059] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A browser automation testing method, characterized in that: The method comprises: receiving a test request, wherein the test request includes an automated test item; In response to the test request, calling an access simulation tool, causing the access simulation tool to start a first browser by specifying a user directory, and log in to a target web page on the first browser; After the login is successful, saving the user directory; Start multiple second browsers, respectively recall the login information of the user directory saved on the multiple second browsers to log in to the target webpage, and after the login is successful, perform automated testing on each logged-in target webpage according to the automated testing items.

2. The browser automation testing method according to claim 1, characterized in that: The plurality of second browsers include local browsers and browsers on remote services.

3. The browser automation testing method according to claim 1, characterized in that: After respectively recalling the login information of the user directory saved on the plurality of second browsers to log in to the target webpage, the method further comprises: Determining a login status of the target webpage on the second browser; When the login status indicates a login timeout, the step of calling the access simulation tool in response to the test request is re-executed, so that the access simulation tool specifies a user directory to start the first browser and saves the user directory after the login is successful.

4. The browser automation testing method according to claim 1, characterized in that: The versions of the first browser and the second browser are the same; or the second browsers are browsers from different manufacturers.

5. The browser automation testing method according to any one of claims 1 to 4, characterized in that: The automated test items include a plurality of basic test items and a plurality of additional test items, and the automated test is performed on each logged-in target webpage according to the automated test items, including: Parsing the operating environment of each second browser among the plurality of second browsers respectively to obtain a parsing result of the operating environment corresponding to each second browser, wherein the operating environment includes operating system information and operating device information; According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers; Using a plurality of basic test items and matching additional test items, respectively, to perform automated testing on each of the logged-in target web pages; The test results of each of the logged-in target web pages after executing the automated test are integrated to obtain an integrated test result.

6. The browser automation testing method according to claim 5, characterized in that: After integrating the test results of each logged-in target webpage after executing the automated test and obtaining the integrated test results, the method further includes: Automatically parsing the integration test result to obtain a parsing result, wherein the parsing result includes an abnormal point test result corresponding to each of the second browsers; Receive additional test items configured by the user for the analysis result, and update the newly configured additional test items into the test item library.

7. A browser automated testing device, characterized in that: The device comprises: A receiving module, configured to receive a test request, wherein the test request includes an automated test item; A calling module, configured to call an access simulation tool in response to the test request, so that the access simulation tool starts a first browser by specifying a user directory, and logs in a target web page on the first browser; A saving module, used to save the user directory after the login is successful; The test module is used to start multiple second browsers, respectively recall the login information of the user directory saved on the multiple second browsers to log in to the target web page, and after successful login, perform automated testing on each logged-in target web page according to the automated test items.

8. The browser automation testing device according to claim 7, characterized in that: The automated test items include a plurality of basic test items and a plurality of additional test items, and the test module is further used for: Parsing the operating environment of each second browser among the plurality of second browsers respectively to obtain a parsing result of the operating environment corresponding to each second browser, wherein the operating environment includes operating system information and operating device information; According to the analysis result of the operating environment corresponding to each of the second browsers, one or more additional test items are matched for each of the second browsers; Using a plurality of basic test items and matching additional test items, respectively, to perform automated testing on each of the logged-in target web pages; The test results of each of the logged-in target web pages after executing the automated test are integrated to obtain an integrated test result.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the browser automation testing method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the browser automation testing method according to any one of claims 1 to 6 are implemented.