[go: up one dir, main page]

CN116756016A - Multi-browser testing methods, apparatus, equipment, media and program products - Google Patents

Multi-browser testing methods, apparatus, equipment, media and program products Download PDF

Info

Publication number
CN116756016A
CN116756016A CN202310714359.4A CN202310714359A CN116756016A CN 116756016 A CN116756016 A CN 116756016A CN 202310714359 A CN202310714359 A CN 202310714359A CN 116756016 A CN116756016 A CN 116756016A
Authority
CN
China
Prior art keywords
browser
test
script
tested
test environment
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
CN202310714359.4A
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.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC 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 Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310714359.4A priority Critical patent/CN116756016A/en
Publication of CN116756016A publication Critical patent/CN116756016A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a multi-browser testing method, apparatus, device, storage medium, and program product, which can be applied to the technical field of finance. The multi-browser testing method comprises the following steps: determining a master control browser and a browser to be tested from a plurality of browsers; responding to the operation behavior instruction input by the master control browser, and executing the recording of the script; determining a key code segment based on the script; starting a testing environment based on a configuration file of a browser to be tested; generating a test script according to the configuration file and the key code segment; and executing the test of the browser to be tested based on running the test script in the test environment.

Description

多浏览器测试方法、装置、设备、介质及程序产品Multi-browser testing methods, apparatus, equipment, media and program products

技术领域Technical field

本公开涉及金融科技领域,更具体地涉及一种多浏览器测试方法、装置、设备、介质和程序产品。The present disclosure relates to the field of financial technology, and more specifically to a multi-browser testing method, device, equipment, medium and program product.

背景技术Background technique

现有的浏览器常常存在多个类型多个版本,对于不同的浏览器需准备不同的测试环境以及不同的测试脚本。导致多浏览器测试的成本较高,测试环境较为复杂不利于监控,编写不同浏览器的测试脚本对测试人员的专业能力要求较高,导致人工成本较大。而且,当前浏览器测试过程通常是通过机器语言进行回放,测试人员无法实时观测到浏览器测试情况,不利于及时保证测试的准确性。Existing browsers often have multiple types and versions, and different test environments and different test scripts need to be prepared for different browsers. As a result, the cost of multi-browser testing is high, and the test environment is relatively complex, which is not conducive to monitoring. Writing test scripts for different browsers requires higher professional capabilities of testers, resulting in higher labor costs. Moreover, the current browser testing process is usually played back through machine language, and testers cannot observe the browser testing situation in real time, which is not conducive to ensuring the accuracy of the test in a timely manner.

发明内容Contents of the invention

鉴于上述问题,本公开提供了一种多浏览器测试方法、装置、设备、介质和程序产品。In view of the above problems, the present disclosure provides a multi-browser testing method, apparatus, equipment, media and program products.

根据本公开的第一个方面,提供了一种多浏览器测试方法,包括:从多个浏览器中确定主控浏览器和待测试浏览器;响应于主控浏览器被输入的操作行为指令,执行脚本的录制;基于脚本,确定关键代码段;基于待测试浏览器的配置文件,启动测试环境;根据配置文件与所述关键代码段,生成测试脚本;基于在测试环境中运行测试脚本,执行待测试浏览器的测试。According to the first aspect of the present disclosure, a multi-browser testing method is provided, including: determining a master browser and a browser to be tested from multiple browsers; responding to operational behavior instructions input by the master browser , execute the recording of the script; determine the key code segments based on the script; start the test environment based on the configuration file of the browser to be tested; generate the test script based on the configuration file and the key code segments; based on running the test script in the test environment, Execute tests for the browser under test.

根据本公开的实施例,从多个浏览器中确定主控浏览器,包括:获取每一浏览器的历史数据;基于历史数据,确定每一浏览器的测试频率;将与最高测试频率对应的浏览器确定为主控浏览器。According to an embodiment of the present disclosure, determining the master browser from multiple browsers includes: obtaining historical data of each browser; determining the test frequency of each browser based on the historical data; The browser is determined to be the master browser.

根据本公开的实施例,响应于主控浏览器被输入的操作行为指令,执行脚本的录制,包括:对主控浏览器执行页面监控;响应于被输入的操作行为指令,执行脚本的录制;其中,脚本中包含主控浏览器页面上的所有操作行为指令;基于预设的文件保存路径,将脚本保存至指定目录。According to an embodiment of the present disclosure, executing the recording of the script in response to the input operation behavior instruction of the main control browser includes: performing page monitoring on the main control browser; in response to the input operation behavior instruction, executing the recording of the script; Among them, the script contains all operation behavior instructions on the main control browser page; based on the preset file saving path, the script is saved to the specified directory.

根据本公开的实施例,该多浏览器测试方法还包括:对指定目录进行定时扫描;基于定时扫描,获得最新上传的脚本。According to an embodiment of the present disclosure, the multi-browser testing method further includes: performing a scheduled scan on the specified directory; and obtaining the latest uploaded script based on the scheduled scan.

根据本公开的实施例,基于脚本确定关键代码段,包括:提取脚本中的测试指令,确定关键代码段;其中,关键代码段是测试指令的集合。According to an embodiment of the present disclosure, determining a key code segment based on a script includes: extracting test instructions in the script and determining the key code segment; where the key code segment is a set of test instructions.

根据本公开的实施例,测试环境为镜像容器,基于待测试浏览器的配置文件,启动测试环境,包括:读取待测试浏览器的配置文件,得到待测浏览器的型号和版本;基于待测试浏览器的型号和版本,查找测试环境;响应于测试环境查找成功,启动该测试环境;响应于测试环境查找失败,创建测试环境。According to an embodiment of the present disclosure, the test environment is a mirror container. Based on the configuration file of the browser to be tested, starting the test environment includes: reading the configuration file of the browser to be tested to obtain the model and version of the browser to be tested; The model and version of the test browser are searched for the test environment; in response to the successful search of the test environment, the test environment is started; in response to the failure of the test environment search, the test environment is created.

根据本公开的实施例,创建测试环境包括:读取待测试浏览器的配置文件,得到待测浏览器的型号和版本;基于待测试浏览器的型号和版本,确定待测试浏览器的驱动程序;根据待测试浏览器的型号、版本以及驱动程序,制作镜像容器。According to an embodiment of the present disclosure, creating a test environment includes: reading the configuration file of the browser to be tested to obtain the model and version of the browser to be tested; and determining the driver of the browser to be tested based on the model and version of the browser to be tested ; Create an image container based on the model, version and driver of the browser to be tested.

根据本公开的实施例,根据配置文件与关键代码段生成测试脚本,包括:基于待测试浏览器的配置文件,确定测试环境参数;其中,配置文件包括每个浏览器的版本和型号;读取脚本的字节码,基于测试环境参数,对字节码进行修改,得到待测试浏览器的测试代码,测试代码中创建有多个类;将关键代码段插入到测试代码中的指定类,得到测试脚本。According to an embodiment of the present disclosure, generating a test script based on the configuration file and key code segments includes: determining test environment parameters based on the configuration file of the browser to be tested; wherein the configuration file includes the version and model of each browser; reading The bytecode of the script is modified based on the test environment parameters to obtain the test code of the browser to be tested. Multiple classes are created in the test code; insert the key code segment into the specified class in the test code to obtain Test script.

根据本公开的实施例,在测试环境中运行测试脚本来执行待测试浏览器的测试,包括:将测试脚本下发至测试环境中;在测试环境中执行测试脚本;响应于测试脚本开始运行,可视化展示测试环境界面。According to an embodiment of the present disclosure, running the test script in the test environment to perform the test of the browser to be tested includes: sending the test script to the test environment; executing the test script in the test environment; in response to the test script starting to run, Visually display the test environment interface.

本公开的第二方面提供了一种多浏览器测试装置,包括:确定模块,用于从多个浏览器中确定主控浏览器和待测试浏览器;录制模块,用于响应于主控浏览器被输入的操作行为指令,执行脚本的录制;分析模块,用于基于脚本,确定关键代码段;环境启动模块,用于基于待测试浏览器的配置文件,启动测试环境;生成模块,用于根据配置文件与关键代码段生成测试脚本;测试模块,用于在测试环境中运行测试脚本来执行待测试浏览器的测试。A second aspect of the present disclosure provides a multi-browser testing device, including: a determination module for determining a master browser and a browser to be tested from multiple browsers; a recording module for responding to the master browser The operation behavior instructions input by the browser are used to record the script; the analysis module is used to determine the key code segments based on the script; the environment startup module is used to start the test environment based on the configuration file of the browser to be tested; the generation module is used to Generate test scripts based on configuration files and key code segments; the test module is used to run test scripts in the test environment to perform tests on the browser to be tested.

本公开的第三方面提供了一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序,其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得一个或多个处理器执行上述多浏览器测试方法。A third aspect of the present disclosure provides an electronic device, including: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are processed by the one or more When the processor is executed, one or more processors are caused to execute the above multi-browser testing method.

本公开的第四方面还提供了一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行上述多浏览器测试方法。A fourth aspect of the present disclosure also provides a computer-readable storage medium on which executable instructions are stored. When executed by a processor, the instructions cause the processor to execute the above-mentioned multi-browser testing method.

本公开的第五方面还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述多浏览器测试方法。A fifth aspect of the present disclosure also provides a computer program product, including a computer program that implements the above multi-browser testing method when executed by a processor.

附图说明Description of the drawings

通过以下参照附图对本公开实施例的描述,本公开的上述内容以及其他目的、特征和优点将更为清楚,在附图中:The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:

图1示意性示出了根据本公开实施例的多浏览器测试方法、装置、设备、介质和程序产品的应用场景图;Figure 1 schematically shows an application scenario diagram of multi-browser testing methods, devices, equipment, media and program products according to embodiments of the present disclosure;

图2示意性示出了根据本公开实施例的多浏览器测试方法的流程图;Figure 2 schematically shows a flow chart of a multi-browser testing method according to an embodiment of the present disclosure;

图3示意性示出了根据本公开实施例从多个浏览器中确定主控浏览器的流程图;Figure 3 schematically shows a flow chart for determining a master browser from multiple browsers according to an embodiment of the present disclosure;

图4示意性示出了根据本公开实施例响应于主控浏览器被输入的操作行为指令执行脚本的录制的流程图;Figure 4 schematically illustrates a flow chart of recording a script executed in response to an operation behavior instruction input by the master browser according to an embodiment of the present disclosure;

图5示意性示出了根据本公开实施例基于待测试浏览器的配置文件启动测试环境的流程图;Figure 5 schematically shows a flow chart for starting a test environment based on the configuration file of the browser to be tested according to an embodiment of the present disclosure;

图6示意性示出了根据本公开实施例创建测试环境的流程图;Figure 6 schematically shows a flow chart for creating a test environment according to an embodiment of the present disclosure;

图7示意性示出了根据本公开实施例根据配置文件与关键代码段生成测试脚本的流程图;Figure 7 schematically shows a flow chart for generating a test script based on configuration files and key code segments according to an embodiment of the present disclosure;

图8示意性示出了根据本公开实施例在测试环境中运行测试脚本来执行待测试浏览器的测试的流程图;Figure 8 schematically illustrates a flow chart of running a test script in a test environment to perform testing of a browser to be tested according to an embodiment of the present disclosure;

图9示意性示出了根据本公开实施例的多浏览器测试装置的结构框图;以及Figure 9 schematically shows a structural block diagram of a multi-browser testing device according to an embodiment of the present disclosure; and

图10示意性示出了根据本公开实施例的适于实现多浏览器测试方法的电子设备的方框图。FIG. 10 schematically shows a block diagram of an electronic device suitable for implementing a multi-browser testing method according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for convenience of explanation, numerous specific details are set forth to provide a comprehensive understanding of the disclosed embodiments. It will be apparent, however, that one or more embodiments may be practiced without these specific details. Furthermore, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily confusing the concepts of the present disclosure.

在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The terms "comprising," "comprising," and the like, as used herein, indicate the presence of stated features, steps, operations, and/or components but do not exclude the presence or addition of one or more other features, steps, operations, or components.

在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used here should be interpreted to have meanings consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。Where an expression similar to "at least one of A, B, C, etc." is used, it should generally be interpreted in accordance with the meaning that a person skilled in the art generally understands the expression to mean (e.g., "having A, B and C "A system with at least one of" shall include, but is not limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or systems with A, B, C, etc. ).

需要说明的是,本公开提供的多浏览器测试的方法和装置可用于金融科技领域,也可用于除金融领域之外的任意领域,本公开提供的多浏览器测试的方法和装置的应用领域不做限定。It should be noted that the multi-browser testing method and device provided by the present disclosure can be used in the field of financial technology, and can also be used in any field except the financial field. The application fields of the multi-browser testing method and device provided by the present disclosure are: No restrictions.

在本公开的技术方案中,所涉及的用户个人信息的获取,存储和应用等,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。In the technical solution of this disclosure, the acquisition, storage and application of user personal information involved are in compliance with relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good customs.

在本公开的技术方案中,在获取或采集用户个人信息之前,均获取了用户的授权或同意。In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

本公开的实施例提供了一种多浏览器测试方法,包括:从多个浏览器中确定主控浏览器和待测试浏览器。响应于主控浏览器被输入的操作行为指令,执行脚本的录制。基于脚本,确定关键代码段。基于待测试浏览器的配置文件,启动测试环境。根据配置文件与关键代码段生成测试脚本。在测试环境中运行测试脚本来执行待测试浏览器的测试。Embodiments of the present disclosure provide a multi-browser testing method, including: determining a master browser and a browser to be tested from multiple browsers. In response to the operation behavior command input by the main control browser, the recording of the script is executed. Based on the script, identify key code segments. Start the test environment based on the configuration file of the browser to be tested. Generate test scripts based on configuration files and key code segments. Run the test script in the test environment to perform tests on the browser under test.

图1示意性示出了根据本公开实施例的多浏览器测试方法、装置、设备、介质及程序产品的应用场景图。Figure 1 schematically shows an application scenario diagram of a multi-browser testing method, apparatus, equipment, media and program products according to an embodiment of the present disclosure.

如图1所示,根据该实施例的应用场景100可以包括终端设备101、102、103、网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Figure 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium used to provide communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。Users can use terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 101, 102, and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

服务器105可以是提供各种服务的服务器,例如对用户利用终端设备101、102、103所浏览的网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。The server 105 may be a server that provides various services, such as a backend management server that provides support for websites browsed by users using the terminal devices 101, 102, and 103 (example only). The background management server can analyze and process the received user request and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device.

需要说明的是,本公开实施例所提供的多浏览器测试方法一般可以由服务器105执行。相应地,本公开实施例所提供的多浏览器测试装置一般可以设置于服务器105中。本公开实施例所提供的多浏览器测试方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的多浏览器测试装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。It should be noted that the multi-browser testing method provided by the embodiment of the present disclosure can generally be executed by the server 105. Correspondingly, the multi-browser testing device provided by the embodiment of the present disclosure can generally be installed in the server 105. The multi-browser testing method provided by the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and/or the server 105. Correspondingly, the multi-browser testing device provided by the embodiment of the present disclosure can also be set up in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and/or the server 105.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of terminal devices, networks and servers in Figure 1 is only illustrative. Depending on implementation needs, there can be any number of end devices, networks, and servers.

以下将基于图1描述的场景,通过图2~图8对公开实施例的多浏览器测试方法进行详细描述。The multi-browser testing method of the disclosed embodiment will be described in detail below based on the scenario described in Figure 1 and through Figures 2 to 8.

图2示意性示出了根据本公开实施例的多浏览器测试方法的流程图。Figure 2 schematically shows a flow chart of a multi-browser testing method according to an embodiment of the present disclosure.

如图2所示,该实施例的多浏览器测试包括操作S210~操作S260。As shown in Figure 2, the multi-browser test in this embodiment includes operations S210 to S260.

在操作S210,从多个浏览器中确定主控浏览器和待测试浏览器。In operation S210, a master browser and a browser to be tested are determined from multiple browsers.

在一些实施例中,通常存在多个浏览器,若要对每一浏览器进行页面监控,需耗费大量资源。In some embodiments, there are usually multiple browsers, and performing page monitoring on each browser requires a large amount of resources.

因此,本公开提出将多个浏览器划分为主控浏览器和待测试浏览器,其中,主控浏览器为测试频率较高的浏览器,其余浏览器则为待测试浏览器。通过对主控浏览器进行页面行为监控,确定在主控浏览器执行的测试行为,响应于主控浏览器存在测试行为,对待测试浏览器执行同步测试。Therefore, the present disclosure proposes to divide multiple browsers into master browsers and browsers to be tested, where the master browser is a browser with a higher testing frequency, and the remaining browsers are browsers to be tested. By monitoring the page behavior of the master browser, the test behavior executed in the master browser is determined. In response to the presence of test behavior in the master browser, a synchronous test is performed on the browser to be tested.

通过将浏览器划分为主控浏览器和待测试浏览器,并对主控浏览器进行页面监控,可以有效节约系统资源。By dividing the browser into a master browser and a browser to be tested, and monitoring the page of the master browser, system resources can be effectively saved.

在操作S220,响应于主控浏览器被输入的操作行为指令,执行脚本的录制。In operation S220, recording of the script is performed in response to the operation behavior instruction input by the host browser.

在一些实施例中,通过脚本监控服务对主控浏览器进行脚本的录制。当主控浏览器开启时,脚本监控服务也会相应开启,在脚本监控服务检测到主控浏览器上被输入操作行为指令的情况下,脚本监控服务进行主控浏览器的脚本录制。In some embodiments, the script is recorded on the master browser through a script monitoring service. When the master browser is opened, the script monitoring service will also be opened accordingly. When the script monitoring service detects that an operation behavior instruction is entered on the master browser, the script monitoring service records the script of the master browser.

在操作S230,基于脚本,确定关键代码段。In operation S230, a key code segment is determined based on the script.

在一些实施例中,对录制的脚本进行解析,将测试脚本中测试指令的集合确定为关键代码段。In some embodiments, the recorded script is parsed, and a set of test instructions in the test script is determined as a key code segment.

在具体实施中,对录制的脚本进行解析,将该脚本解析为多个操作步骤。对操作步骤中的testScript方法进行提取,得到关键代码段,其中,testScript方法中包含用于执行特定测试的一系列指令,以实现浏览器的测试。In a specific implementation, the recorded script is parsed and the script is parsed into multiple operation steps. Extract the testScript method in the operation step to obtain the key code segment. The testScript method contains a series of instructions for executing specific tests to implement browser testing.

在完整的浏览器测试过程中,至少包括测试环境的搭建以及构建测试用例、编写测试指令等步骤。本公开对录制的脚本进行解析,讲脚本还原为多个浏览器测试步骤,并对编写测试指令这一操作步骤进行进一步解析,从testScript方法中确定关键代码段,其中,关键代码段是用于执行特定测试的一系列指令的合集。The complete browser testing process includes at least the steps of setting up a test environment, building test cases, and writing test instructions. This disclosure analyzes the recorded script, restores the script into multiple browser test steps, further analyzes the step of writing test instructions, and determines the key code segment from the testScript method, where the key code segment is used for A collection of instructions that perform a specific test.

在操作S240,基于待测试浏览器的配置文件,启动测试环境。In operation S240, a test environment is started based on the configuration file of the browser to be tested.

在一些实施例中,利用监控调度服务读取待测试浏览器的配置文件,基于配置文件确定与待测试浏览器对应的测试环境,并启动该测试环境用于后续测试。其中,测试环境基于待测试浏览器配置文件搭建的镜像容器,待测试浏览器的配置文件为JSON格式,包含浏览器的配置信息以及Selenoid hub的服务器地址信息,Selenoid hub用于在镜像容器中启动浏览器。In some embodiments, the monitoring and scheduling service is used to read the configuration file of the browser to be tested, determine the test environment corresponding to the browser to be tested based on the configuration file, and start the test environment for subsequent testing. Among them, the test environment is a mirror container built based on the configuration file of the browser to be tested. The configuration file of the browser to be tested is in JSON format and contains the configuration information of the browser and the server address information of Selenoid hub. Selenoid hub is used to start in the mirror container. browser.

在操作S250,根据配置文件与关键代码段,生成测试脚本。In operation S250, a test script is generated according to the configuration file and key code segments.

在一些实施例中,开源组件库javassist以基于待测试浏览器的配置文件动态生成用于对该待测试浏览器执行测试的测试脚本,该测试脚本中的测试指令为上述关键代码段。In some embodiments, the open source component library javassist dynamically generates a test script for testing the browser to be tested based on the configuration file of the browser to be tested, and the test instructions in the test script are the above-mentioned key code segments.

在操作S260,基于在测试环境中运行测试脚本,执行待测试浏览器的测试。In operation S260, a test of the browser to be tested is performed based on running the test script in the test environment.

在一些实施例中,将测试脚本发放至对应的测试环境中,在启动的测试环境中进行待测试浏览器的测试。本申请利用镜像容器构建测试环境,由于镜像容器具有资源隔离的特点,因此,可以在一台硬件服务器中搭建多个镜像容器,每一个镜像容器都相当于一台可以独立进行测试的硬件服务器,在进行多浏览器测试时,实现多个待测试浏览器的并行测试,提高测试效率,降低测试用时。In some embodiments, the test script is distributed to the corresponding test environment, and the browser to be tested is tested in the started test environment. This application uses mirror containers to build a test environment. Since mirror containers have the characteristics of resource isolation, multiple mirror containers can be built in one hardware server. Each mirror container is equivalent to a hardware server that can be independently tested. When conducting multi-browser testing, parallel testing of multiple browsers to be tested can be implemented to improve testing efficiency and reduce testing time.

本公开实施例通过对主控浏览器上的操作行为进行脚本录制,提取录制的脚本中的关键代码段,基于待测试浏览器的配置文件以及关键代码段动态生成用于对待测试浏览器进行测试的测试脚本,并在镜像容器中运行测试脚本,执行待测试浏览器的测试。本公开提供的多浏览器测试方法,无论是主控浏览器的脚本录制还是测试脚本的生成,均为自动实现,降低了对技术人员的能力要求,实现多个浏览器的高效测试。This disclosed embodiment performs script recording on the operation behavior on the main control browser, extracts the key code segments in the recorded script, and dynamically generates them based on the configuration file of the browser to be tested and the key code segments for testing the browser to be tested. test script, and run the test script in the image container to execute the test of the browser to be tested. The multi-browser testing method provided by the present disclosure, whether it is script recording of the master browser or generation of test scripts, is automatically implemented, which reduces the ability requirements for technical personnel and enables efficient testing of multiple browsers.

在上述实施例的基础上,图3示意性示出了根据本公开实施例从多个浏览器中确定主控浏览器的流程图。Based on the above embodiments, FIG. 3 schematically shows a flow chart for determining a master browser from multiple browsers according to an embodiment of the present disclosure.

如图3所示,该实施例的从多个浏览器中确定主控浏览器包括操作S310~S330。As shown in Figure 3, determining the master browser from multiple browsers in this embodiment includes operations S310 to S330.

在操作S310,获取每一浏览器的历史数据。In operation S310, historical data of each browser is obtained.

在操作S320,基于历史数据,确定每一浏览器的测试频率。In operation S320, the testing frequency of each browser is determined based on historical data.

在操作S330,将与最高测试频率对应的浏览器确定为主控浏览器。In operation S330, the browser corresponding to the highest testing frequency is determined as the master browser.

在一些实施例中,基于每一浏览器历史数据中的测试频率,将测试频率最高的浏览器确定为主控浏览器,并基于用户在主控浏览器上的操作行为,对其他浏览器进行测试,以保证浏览器测试的时效性,避免出现一些浏览器长期未测试的情况。In some embodiments, based on the testing frequency in the historical data of each browser, the browser with the highest testing frequency is determined as the master browser, and based on the user's operating behavior on the master browser, other browsers are Test to ensure the timeliness of browser testing and avoid the situation where some browsers have not been tested for a long time.

在上述实施例的基础上,图4示意性示出了根据本公开实施例响应于主控浏览器被输入的操作行为指令执行脚本的录制的流程图。Based on the above embodiments, FIG. 4 schematically illustrates a flowchart of recording a script executed in response to an operation behavior instruction input by the host browser according to an embodiment of the present disclosure.

如图4所示,该实施例的响应于主控浏览器被输入的操作行为指令执行脚本的录制包括操作S410~S430。As shown in FIG. 4 , in this embodiment, the recording of execution script in response to the operation behavior instruction inputted by the master browser includes operations S410 to S430.

在操作S410,对主控浏览器执行页面监控。In operation S410, page monitoring is performed on the master browser.

在一些实施例中,为主控浏览器设置脚本监控服务,该脚本监控服务至少具备浏览器页面监控功能以及脚本录制功能。该脚本监控服务随主控浏览器的启动而启动。例如,当主控浏览器为107.0.5304.121版本的Chrome浏览器时,基于该主控浏览器的配置(如版本、型号等),选择相应的脚本监控服务,该服务可以安装于主控浏览器上,当主控浏览器启动时,该脚本监控服务也随之启动,对主控浏览器进行页面监控。In some embodiments, a script monitoring service is set up for the master browser, and the script monitoring service at least has a browser page monitoring function and a script recording function. The script monitoring service is started when the master browser is started. For example, when the master browser is the Chrome browser version 107.0.5304.121, based on the configuration of the master browser (such as version, model, etc.), select the corresponding script monitoring service, which can be installed in the master browser On, when the master browser is started, the script monitoring service is also started to monitor the page of the master browser.

在操作S420,响应于被输入的操作行为指令,执行脚本的录制。In operation S420, recording of the script is performed in response to the input operation behavior instruction.

在一些实施例中,当脚本监控服务检测到主控浏览器页面上被输入操作行为指令,则开启脚本录制功能,对主控浏览器页面进行脚本录制,录制的脚本中包含该页面上的所有操作行为指令。In some embodiments, when the script monitoring service detects that an operation behavior instruction is input on the main browser page, the script recording function is enabled to record the script on the main browser page. The recorded script includes all the commands on the page. Operational behavioral instructions.

在操作S430,基于预设的文件保存路径,将脚本保存至指定目录。In operation S430, the script is saved to the specified directory based on the preset file saving path.

在一些实施例中,预设脚本监控服务的文件保存路径,当主控浏览器页面的脚本录制完成后,自动基于预设的文件保存路径保存至指定目录中。并统一脚本的存储格式,其中,脚本的存储格式可以为AutoTestFile_XXXX-XX-XX HH:mm:ss,以脚本录制完成的时间进行存储,例如AutoTestFile_2023-01-0117:35:24.script,表示该脚本是在2023-01-01的17:35:24分录制完成的,便于按照时间顺序进行脚本排序,使得录制到的脚本最终形成一个完整的可以实现浏览器测试的代码串。In some embodiments, the file saving path of the script monitoring service is preset. After the script recording of the master browser page is completed, the file saving path is automatically saved to the specified directory based on the preset file saving path. And unify the storage format of the script. The storage format of the script can be AutoTestFile_XXXX-XX-XX HH:mm:ss, which is stored with the time when the script recording is completed. For example, AutoTestFile_2023-01-0117:35:24.script means that The script was recorded at 17:35:24 on 2023-01-01, which facilitates sorting the scripts in chronological order, so that the recorded script eventually forms a complete code string that can be used for browser testing.

在一些实施例中,该多浏览器测试方法还可以包括:对指定目录执行定时扫描;基于定时扫描,获得最新上传的脚本。其中,定时扫描的频率为1s一次,该定时扫描过程在主控浏览器的测试过程中持续进行,以确保脚本的完整性。In some embodiments, the multi-browser testing method may also include: performing a scheduled scan on the specified directory; and obtaining the latest uploaded script based on the scheduled scan. Among them, the frequency of scheduled scanning is once every 1 second. This scheduled scanning process continues during the test process of the master browser to ensure the integrity of the script.

在上述实施例的基础上,图5示意性示出了根据本公开实施例基于待测试浏览器的配置文件启动测试环境的流程图。Based on the above embodiments, FIG. 5 schematically shows a flow chart for starting a test environment based on the configuration file of the browser to be tested according to an embodiment of the present disclosure.

如图5所示,该实施例的基于待测试浏览器的配置文件启动测试环境包括操作S510~S540。As shown in Figure 5, starting the test environment based on the configuration file of the browser to be tested in this embodiment includes operations S510 to S540.

在操作S510,读取待测试浏览器的配置文件,得到待测浏览器的型号和版本。In operation S510, the configuration file of the browser to be tested is read to obtain the model and version of the browser to be tested.

在操作S520,基于待测试浏览器的型号和版本,查找测试环境。In operation S520, a test environment is found based on the model and version of the browser to be tested.

在操作S530,响应于测试环境查找成功,启动该测试环境。In operation S530, in response to the test environment finding being successful, the test environment is started.

在操作S540,响应于测试环境查找失败,创建测试环境。In operation S540, in response to the test environment lookup failure, a test environment is created.

在一些实施例中,根据待测试浏览器的配置文件,确定于该待测试浏览器对应的测试环境,启动该测试环境用于进行待测试浏览器的测试,其中,测试环境为镜像容器(Docker)。每一个Docker都相当于一个可以独立进行测试的硬件服务器,因此,利用Docker容器执行浏览器测试,可以有效节约硬件资源,即使是不同的浏览器,也可以通过在一台硬件服务器上布置多个Docker容器实现多浏览器的测试,无需使用大量硬件服务器,避免硬件资源的浪费。由于Docker容器的运行机制为沙箱机制,不存在接口,与外界完全隔离可以将测试脚本限定在特定的运行范围内,避免不同浏览器相互影响,以顺利实现多浏览器的同时测试。In some embodiments, according to the configuration file of the browser to be tested, a test environment corresponding to the browser to be tested is determined, and the test environment is started for testing the browser to be tested, where the test environment is a mirror container (Docker ). Each Docker is equivalent to a hardware server that can be tested independently. Therefore, using Docker containers to perform browser testing can effectively save hardware resources. Even for different browsers, multiple browsers can be deployed on one hardware server. Docker containers enable multi-browser testing without the need to use a large number of hardware servers and avoid the waste of hardware resources. Since the running mechanism of the Docker container is a sandbox mechanism, there is no interface, and complete isolation from the outside world can limit the test script to a specific operating range to avoid different browsers from affecting each other, so as to smoothly achieve simultaneous testing of multiple browsers.

在具体实施时,通过读取待测试浏览器的配置文件,获取待测试浏览器的型号信息和版本信息。型号信息主要是指浏览器所属公司,如Chrome浏览器、Firefox浏览器、IE浏览器、MicrosoftEdg浏览器等。版本信息则是指每一型号浏览器的具体版本,如Chrome浏览器可以进一步划分为107.0版本、78.0版本等。基于待测试浏览器的型号信息和版本信息,在已搭建的测试环境中查找是否存在与该待测试浏览器对应的Docker容器。若查找成功,即查找到与该待测试浏览器对应的Docker容器,则启动该Docker容器用于进行浏览器测试。若查找失败,即未查找到与该待测试浏览器对应的Docker容器,则进行测试环境的创建,即创建相应的Docker容器。During specific implementation, the model information and version information of the browser to be tested are obtained by reading the configuration file of the browser to be tested. Model information mainly refers to the company to which the browser belongs, such as Chrome browser, Firefox browser, IE browser, Microsoft Edge browser, etc. Version information refers to the specific version of each browser model. For example, the Chrome browser can be further divided into version 107.0, version 78.0, etc. Based on the model information and version information of the browser to be tested, find whether there is a Docker container corresponding to the browser to be tested in the established test environment. If the search is successful, that is, the Docker container corresponding to the browser to be tested is found, and the Docker container is started for browser testing. If the search fails, that is, the Docker container corresponding to the browser to be tested is not found, the test environment is created, that is, the corresponding Docker container is created.

在上述实施例的基础上,图6示意性示出了根据本公开实施例创建测试环境的流程图。Based on the above embodiments, FIG. 6 schematically shows a flow chart for creating a test environment according to embodiments of the present disclosure.

如图6所示,该实施例的创建测试环境包括操作S610~S630。As shown in Figure 6, creating a test environment in this embodiment includes operations S610 to S630.

在操作S610,读取待测试浏览器的配置文件,得到待测浏览器的型号和版本。In operation S610, the configuration file of the browser to be tested is read to obtain the model and version of the browser to be tested.

在操作S620,基于待测试浏览器的型号和版本,确定待测试浏览器的驱动程序。In operation S620, the driver of the browser to be tested is determined based on the model and version of the browser to be tested.

在操作S630,根据待测试浏览器的型号、版本以及驱动程序,制作镜像容器。In operation S630, an image container is created according to the model, version and driver of the browser to be tested.

在一些实施例中,通常会尽可能多的收集不同型号、不同版本的浏览器,并基于这些浏览器的版本和型号,制作多个与每一浏览器一一对应的Docker容器。其中,在创建Docker容器时,可以基于每一浏览器的显示名称,设置与该浏览器对应的Docker容器的标识符,便于进行Docker容器的查找与识别,提高Docker容器的启动效率。In some embodiments, as many browsers of different models and versions are usually collected as possible, and based on the versions and models of these browsers, multiple Docker containers corresponding to each browser are produced. Among them, when creating a Docker container, you can set the identifier of the Docker container corresponding to the browser based on the display name of each browser to facilitate the search and identification of the Docker container and improve the startup efficiency of the Docker container.

其中,Docker是开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux上。Docker镜像类似于虚拟机里的镜像,是一个只读的模板,一个独立的文件系统,包括运行容器所需的数据,可以用来创建新的容器。Docker容器是由Docker镜像创建的运行实例。Docker容器与虚拟机类似。Among them, Docker is an open source application container engine that allows developers to package their applications and dependency packages into a portable container and then publish them to any popular Linux. A Docker image is similar to an image in a virtual machine. It is a read-only template and an independent file system that includes the data required to run the container and can be used to create new containers. Docker containers are running instances created from Docker images. Docker containers are similar to virtual machines.

在具体的实施例中,每一个待测试浏览器均匹配一个用于测试的Docker容器。待测试浏览器的配置文件中除了该浏览器的型号信息以及版本信息,还可以包括Selenoidhub的服务器地址信息。Selenoid hub是一种开源工具,用于在Web浏览器上执行自动化测试,具有极高的兼容性,可以适用于多种类型的浏览器。In a specific embodiment, each browser to be tested is matched with a Docker container used for testing. In addition to the model information and version information of the browser, the configuration file of the browser to be tested can also include Selenoidhub's server address information. Selenoid hub is an open source tool for performing automated testing on web browsers. It has extremely high compatibility and can be applied to many types of browsers.

在一些实施例中,通过调用Selenoid hub中的Selenoid服务在Docker容器中运行浏览器,以实现Docker容器中的浏览器测试。Selenoid具有运行过程可视化、支持多版本浏览器同时运行,可以远程操作,可以录像等优点,便于实现多浏览器的同时测试。In some embodiments, browser testing in the Docker container is implemented by calling the Selenoid service in the Selenoid hub to run the browser in the Docker container. Selenoid has the advantages of visualizing the running process, supporting the simultaneous operation of multiple versions of browsers, remote operation, and video recording, making it easy to implement simultaneous testing of multiple browsers.

本公开以集群的方式将Docker容器部署在硬件服务器上,并通过在Docker容器中运行浏览器实现浏览器的测试,有效实现多浏览器的同步测试。This disclosure deploys Docker containers on hardware servers in a cluster manner, and implements browser testing by running browsers in Docker containers, effectively realizing synchronous testing of multiple browsers.

在上述实施例的基础上,图7示意性示出了根据本公开实施例根据配置文件与关键代码段生成测试脚本的流程图。Based on the above embodiments, FIG. 7 schematically shows a flow chart for generating a test script based on configuration files and key code segments according to an embodiment of the present disclosure.

如图7所示,该实施例的根据配置文件与关键代码段生成测试脚本包括操作S710~S730。As shown in Figure 7, generating a test script based on the configuration file and key code segments in this embodiment includes operations S710 to S730.

在操作S710,基于待测试浏览器的配置文件,确定测试环境参数。In operation S710, test environment parameters are determined based on the configuration file of the browser to be tested.

在操作S720,读取脚本的字节码,基于测试环境参数,对字节码进行修改,得到待测试浏览器的测试代码,测试代码中创建有多个类。In operation S720, the bytecode of the script is read, and based on the test environment parameters, the bytecode is modified to obtain the test code of the browser to be tested. Multiple classes are created in the test code.

在操作S730,将关键代码段插入到测试代码中的指定类,得到测试脚本。In operation S730, the key code segment is inserted into the specified class in the test code to obtain a test script.

在一些实施例中,不同的浏览器的测试环境不同,因此,需要基于待测试浏览器的配置文件,确定当前待测试浏览器的测试环境参数。基于测试环境参数,动态生成该待测试浏览器的测试脚本。In some embodiments, different browsers have different test environments. Therefore, it is necessary to determine the test environment parameters of the current browser to be tested based on the configuration file of the browser to be tested. Based on the test environment parameters, the test script of the browser to be tested is dynamically generated.

且由于本公开中测试脚本是在虚拟环境的Docker容器中执行浏览器测试,因此,测试脚本的具体表现形式可以为直接应用于虚拟环境的字节码。And since the test script in this disclosure executes the browser test in the Docker container of the virtual environment, the specific form of the test script can be bytecode directly applied to the virtual environment.

动态生成测试脚本可以实现无入侵式的代码扩展,即在不用修改源码的情况下改变测试环境中现有的字节码,快速简便的实现浏览器的测试。Dynamically generating test scripts can achieve non-invasive code expansion, that is, changing the existing bytecode in the test environment without modifying the source code, and implementing browser testing quickly and easily.

在具体实施中,测试脚本中应包括实现脚本运行的基础类方法以及对浏览器进行测试的类方法。测试脚本由动态生成的代码以及关键代码段构成。其中动态生成的代码用于维持脚本的顺利运行,包含多个类,由开源组件库javassist中的java agent方法动态生成,该动态生成的代码可以直接附加在指定的测试进程中,用于实现测试脚本在Docker容器中的顺利运行。关键代码段则是插入在动态生成的代码中的指定类中,通过调用指定类的execScript方法进行调用,进行待测试浏览器的测试。该测试脚本还可以包括动态编译生成的可执行jar文件,该jar文件用于将测试脚本插入到指定的虚拟的测试环境(Docker容器)中。In specific implementation, the test script should include basic class methods for running the script and class methods for testing the browser. Test scripts consist of dynamically generated code and key code snippets. The dynamically generated code is used to maintain the smooth running of the script. It contains multiple classes and is dynamically generated by the java agent method in the open source component library javassist. The dynamically generated code can be directly attached to the specified test process to implement testing. The script runs smoothly in the Docker container. The key code segment is inserted into the specified class in the dynamically generated code, and is called by calling the execScript method of the specified class to test the browser to be tested. The test script may also include an executable jar file generated by dynamic compilation, which is used to insert the test script into a specified virtual test environment (Docker container).

本公开实施例提供的测试脚本生成方法,自动进行主控浏览器的脚本录制,并基于录制后的脚本自动生成用于待测试浏览器的脚本。这种自动根据主控浏览器的测试操作实时生成测试脚本的方法,降低了对测试人员的技术能力要求,测试人员仅需通过主控浏览器的测试操作,即可相应实现其余多个待测试浏览器的同步测试。有效减少了测试人员为不同浏览器编写多个测试脚本的工作量,减轻人力成本,提高测试效率。且本公开通过建立多个互不干扰的Docker容器,实现多个待测试浏览器的同步测试,在极小的测试环境中实现多种类、多版本浏览器的管理。The test script generation method provided by the embodiment of the present disclosure automatically records the script of the master browser, and automatically generates a script for the browser to be tested based on the recorded script. This method of automatically generating test scripts in real time based on the test operations of the main browser reduces the technical ability requirements of the testers. The testers only need to perform the test operations of the main browser to implement the remaining tests. Browser sync testing. It effectively reduces the workload of testers writing multiple test scripts for different browsers, reduces labor costs, and improves testing efficiency. Moreover, the present disclosure realizes the synchronous testing of multiple browsers to be tested by establishing multiple Docker containers that do not interfere with each other, and realizes the management of multiple types and multiple versions of browsers in a very small test environment.

在上述实施例的基础上,图8示意性示出了根据本公开实施例在测试环境中运行测试脚本来执行待测试浏览器的测试的流程图。Based on the above embodiments, FIG. 8 schematically shows a flow chart of running a test script in a test environment to perform testing of the browser to be tested according to an embodiment of the present disclosure.

如图8所示,该实施例的在测试环境中运行测试脚本来执行待测试浏览器的测试包括操作S810~S830。As shown in FIG. 8 , in this embodiment, running the test script in the test environment to perform the test of the browser to be tested includes operations S810 to S830.

在操作S810,将测试脚本下发至测试环境中。In operation S810, the test script is delivered to the test environment.

在操作S820,在测试环境中执行测试脚本。In operation S820, the test script is executed in the test environment.

在操作S830,响应于测试脚本开始运行,可视化展示测试环境界面。In operation S830, in response to the test script starting to run, the test environment interface is visually displayed.

在一些实施例中,通过虚拟网络控制台(Virtual Network Console,VNC)访问Selenoid Master服务,对所有运行中的Docker容器的浏览器测试页面进行视频展示,使得测试人员可以同时查看多个浏览器的测试画面,便于测试人员实时同步观察多个浏览器在测试过程中的反馈信息,保证每一浏览器测试的准确性,便于测试人员在测试过程中进行及时调整。In some embodiments, the Selenoid Master service is accessed through a virtual network console (Virtual Network Console, VNC), and the browser test pages of all running Docker containers are video displayed, so that testers can view multiple browsers at the same time. The test screen allows testers to simultaneously observe the feedback information of multiple browsers during the test process in real time, ensuring the accuracy of each browser test, and making it easy for testers to make timely adjustments during the test process.

基于上述多浏览器测试方法,本公开还提供了一种多浏览器测试装置。以下将结合图9对该装置进行详细描述。Based on the above multi-browser testing method, the present disclosure also provides a multi-browser testing device. The device will be described in detail below with reference to FIG. 9 .

图9示意性示出了根据本公开实施例的多浏览器测试装置的结构框图。Figure 9 schematically shows a structural block diagram of a multi-browser testing device according to an embodiment of the present disclosure.

如图9所示,该实施例的多浏览器测试装置900包括确定模块910、录制模块920、分析模块930、环境启动模块940、生成模块950和测试模块960。As shown in FIG. 9 , the multi-browser testing device 900 of this embodiment includes a determination module 910 , a recording module 920 , an analysis module 930 , an environment startup module 940 , a generation module 950 and a testing module 960 .

确定模块910用于从多个浏览器中确定主控浏览器和待测试浏览器。在一实施例中,确定模块910可以用于执行前文描述的操作S210,在此不再赘述。The determining module 910 is used to determine the master browser and the browser to be tested from multiple browsers. In an embodiment, the determination module 910 may be used to perform the operation S210 described above, which will not be described again here.

录制模块920用于响应于主控浏览器被输入的操作行为指令,执行脚本的录制。在一实施例中,录制模块920可以用于执行前文描述的操作S220,在此不再赘述。The recording module 920 is configured to perform recording of the script in response to the operation behavior instructions input by the main control browser. In an embodiment, the recording module 920 may be used to perform the operation S220 described above, which will not be described again here.

分析模块930用于基于脚本,确定关键代码段。在一实施例中,分析模块930可以用于执行前文描述的操作S230,在此不再赘述。The analysis module 930 is used to determine key code segments based on the script. In an embodiment, the analysis module 930 may be used to perform the operation S230 described above, which will not be described again here.

环境启动模块940用于基于待测试浏览器的配置文件,启动测试环境。在一实施例中,环境启动模块940可以用于执行前文描述的操作S240,在此不再赘述。The environment startup module 940 is used to start the test environment based on the configuration file of the browser to be tested. In one embodiment, the environment startup module 940 may be used to perform the operation S240 described above, which will not be described again here.

生成模块950用于根据配置文件与关键代码段生成测试脚本。在一实施例中,生成模块950可以用于执行前文描述的操作S250,在此不再赘述。The generation module 950 is used to generate test scripts based on configuration files and key code segments. In an embodiment, the generation module 950 may be used to perform the operation S250 described above, which will not be described again here.

测试模块960用于在测试环境中运行测试脚本来执行待测试浏览器的测试。在一实施例中,测试模块960可以用于执行前文描述的操作S260,在此不再赘述。The testing module 960 is used to run test scripts in the testing environment to perform testing of the browser to be tested. In one embodiment, the test module 960 may be used to perform the operation S260 described above, which will not be described again here.

根据本公开的实施例,确定模块910、录制模块920、分析模块930、环境启动模块940、生成模块950和测试模块960中的任意多个模块可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,确定模块910、录制模块920、分析模块930、环境启动模块940、生成模块950和测试模块960中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,确定模块910、录制模块920、分析模块930、环境启动模块940、生成模块950和测试模块960中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。According to embodiments of the present disclosure, any multiple modules among the determination module 910, the recording module 920, the analysis module 930, the environment startup module 940, the generation module 950 and the testing module 960 can be combined and implemented in one module, or any one of them Modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the determining module 910, the recording module 920, the analyzing module 930, the environment starting module 940, the generating module 950 and the testing module 960 may be at least partially implemented as a hardware circuit, such as a field programmable gate. Array (FPGA), programmable logic array (PLA), system on a chip, system on a substrate, system on a package, application specific integrated circuit (ASIC), or any other reasonable means by which circuits can be integrated or packaged Or firmware, or any one of the three implementation methods of software, hardware and firmware, or an appropriate combination of any of them. Alternatively, at least one of the determination module 910, the recording module 920, the analysis module 930, the environment startup module 940, the generation module 950 and the testing module 960 may be at least partially implemented as a computer program module, and when the computer program module is run, Can perform corresponding functions.

图10示意性示出了根据本公开实施例的适于实现多浏览器测试方法的电子设备的方框图。FIG. 10 schematically shows a block diagram of an electronic device suitable for implementing a multi-browser testing method according to an embodiment of the present disclosure.

如图10所示,根据本公开实施例的电子设备1000包括处理器1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储部分1008加载到随机访问存储器(RAM)1003中的程序而执行各种适当的动作和处理。处理器1001例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC))等等。处理器1001还可以包括用于缓存用途的板载存储器。处理器1001可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 10 , an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 that can be loaded into a random access memory (RAM) 1003 according to a program stored in a read-only memory (ROM) 1002 or from a storage part 1008 program to perform various appropriate actions and processes. Processor 1001 may include, for example, a general-purpose microprocessor (eg, a CPU), an instruction set processor and/or an associated chipset, and/or a special-purpose microprocessor (eg, an application specific integrated circuit (ASIC)), or the like. Processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiments of the present disclosure.

在RAM 1003中,存储有电子设备1000操作所需的各种程序和数据。处理器1001、ROM 1002以及RAM 1003通过总线1004彼此相连。处理器1001通过执行ROM 1002和/或RAM1003中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 1002和RAM 1003以外的一个或多个存储器中。处理器1001也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are stored. The processor 1001, ROM 1002, and RAM 1003 are connected to each other through a bus 1004. The processor 1001 performs various operations according to the method flow of the embodiment of the present disclosure by executing programs in the ROM 1002 and/or RAM 1003. It should be noted that the program may also be stored in one or more memories other than ROM 1002 and RAM 1003. The processor 1001 may also perform various operations according to the method flow of embodiments of the present disclosure by executing programs stored in the one or more memories.

根据本公开的实施例,电子设备1000还可以包括输入/输出(I/O)接口1005,输入/输出(I/O)接口1005也连接至总线1004。电子设备1000还可以包括连接至I/O接口1005的以下部件中的一项或多项:包括键盘、鼠标等的输入部分1006;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1007;包括硬盘等的存储部分1008;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1009。通信部分1009经由诸如因特网的网络执行通信处理。驱动器1010也根据需要连接至I/O接口1 005。可拆卸介质1011,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1010上,以便于从其上读出的计算机程序根据需要被安装入存储部分1008。According to embodiments of the present disclosure, the electronic device 1000 may further include an input/output (I/O) interface 1005 that is also connected to the bus 1004 . Electronic device 1000 may also include one or more of the following components connected to I/O interface 1005: an input portion 1006 including a keyboard, mouse, etc.; including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and an output section 1007 of speakers and the like; a storage section 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem and the like. The communication section 1009 performs communication processing via a network such as the Internet. Driver 1010 is also connected to I/O interface 1005 as needed. Removable media 1011, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage portion 1008 as needed.

本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/device/system described in the above embodiments; it may also exist independently without being assembled into the device/system. in the device/system. The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 1002和/或RAM 1003和/或ROM 1002和RAM 1003以外的一个或多个存储器。According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, but is not limited to, portable computer disks, hard disks, random access memory (RAM), and read-only memory (ROM). , erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include one or more memories other than the ROM 1002 and/or RAM 1003 and/or the ROM 1002 and RAM 1003 described above.

本公开的实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。当计算机程序产品在计算机系统中运行时,该程序代码用于使计算机系统实现本公开实施例所提供的物品推荐方法。Embodiments of the present disclosure also include a computer program product including a computer program containing program code for performing the method illustrated in the flowchart. When the computer program product is run in the computer system, the program code is used to cause the computer system to implement the item recommendation method provided by the embodiments of the present disclosure.

在该计算机程序被处理器1001执行时执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。When the computer program is executed by the processor 1001, the above-described functions defined in the system/device of the embodiment of the present disclosure are performed. According to embodiments of the present disclosure, the systems, devices, modules, units, etc. described above may be implemented by computer program modules.

在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分1009被下载和安装,和/或从可拆卸介质1011被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 1009, and/or installed from the removable medium 1011. The program code contained in the computer program can be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

在这样的实施例中,该计算机程序可以通过通信部分1009从网络上被下载和安装,和/或从可拆卸介质1011被安装。在该计算机程序被处理器1001执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。In such embodiments, the computer program may be downloaded and installed from the network via communication portion 1009 and/or installed from removable media 1011. When the computer program is executed by the processor 1001, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to embodiments of the present disclosure, the systems, devices, devices, modules, units, etc. described above may be implemented by computer program modules.

根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。According to the embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages. Specifically, high-level procedural and/or object-oriented programming may be utilized. programming language, and/or assembly/machine language to implement these computational procedures. Programming languages include, but are not limited to, programming languages such as Java, C++, python, "C" language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., provided by an Internet service). (business comes via Internet connection).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block in the block diagram or flowchart illustration, and combinations of blocks in the block diagram or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or may be implemented by special purpose hardware-based systems that perform the specified functions or operations. Achieved by a combination of specialized hardware and computer instructions.

本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。Those skilled in the art will understand that the features described in the various embodiments and/or claims of the present disclosure may be combined or/or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, various combinations and/or combinations of features recited in the various embodiments and/or claims of the disclosure may be made without departing from the spirit and teachings of the disclosure. All such combinations and/or combinations fall within the scope of this disclosure.

以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment is described separately above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims (13)

1.一种多浏览器测试方法,包括:1. A multi-browser testing method, including: 从多个浏览器中确定主控浏览器和待测试浏览器;Determine the master browser and the browser to be tested from multiple browsers; 响应于主控浏览器被输入的操作行为指令,执行脚本的录制;In response to the operation behavior instructions input by the main control browser, execute the recording of the script; 基于所述脚本,确定关键代码段;Based on the script, identify key code segments; 基于所述待测试浏览器的配置文件,启动测试环境;Based on the configuration file of the browser to be tested, start the test environment; 根据所述配置文件与所述关键代码段,生成测试脚本;Generate a test script according to the configuration file and the key code segment; 基于在所述测试环境中运行测试脚本,执行待测试浏览器的测试。Based on running the test script in the test environment, the test of the browser to be tested is performed. 2.根据权利要求1所述的多浏览器测试方法,所述从多个浏览器中确定主控浏览器,包括:2. The multi-browser testing method according to claim 1, wherein determining the master browser from multiple browsers includes: 获取每一浏览器的历史数据;Obtain historical data for each browser; 基于所述历史数据,确定每一浏览器的测试频率;Based on the historical data, determine the testing frequency of each browser; 将与最高测试频率对应的浏览器确定为主控浏览器。The browser corresponding to the highest testing frequency is determined as the master browser. 3.根据权利要求1所述的多浏览器测试方法,所述响应于主控浏览器被输入的操作行为指令,执行脚本的录制,包括:3. The multi-browser testing method according to claim 1, wherein the recording of the execution script in response to the operation behavior instructions input by the master browser includes: 对主控浏览器执行页面监控;Perform page monitoring on the master browser; 响应于被输入的操作行为指令,执行脚本的录制;其中,所述脚本中包含主控浏览器页面上的所有操作行为指令;In response to the input operation behavior instructions, perform recording of the script; wherein the script contains all operation behavior instructions on the main control browser page; 基于预设的文件保存路径,将所述脚本保存至指定目录。Based on the preset file saving path, save the script to the specified directory. 4.根据权利要求3所述的多浏览器测试方法,还包括:4. The multi-browser testing method according to claim 3, further comprising: 对所述指定目录进行定时扫描;Perform regular scans of the specified directory; 基于所述定时扫描,获得最新上传的脚本。Based on the scheduled scan, the latest uploaded script is obtained. 5.根据权利要求1所述的多浏览器测试方法,所述基于所述脚本确定关键代码段,包括:5. The multi-browser testing method according to claim 1, wherein determining key code segments based on the script includes: 提取所述脚本中的测试指令,确定关键代码段;其中,关键代码段是所述测试指令的集合。Extract the test instructions in the script and determine the key code section; where the key code section is a set of the test instructions. 6.根据权利要求1所述的多浏览器测试方法,所述测试环境为镜像容器,所述基于所述待测试浏览器的配置文件,启动测试环境,包括:6. The multi-browser testing method according to claim 1, wherein the test environment is a mirror container, and starting the test environment based on the configuration file of the browser to be tested includes: 读取所述待测试浏览器的配置文件,得到待测浏览器的型号和版本;Read the configuration file of the browser to be tested and obtain the model and version of the browser to be tested; 基于所述待测试浏览器的型号和版本,查找测试环境;Find the test environment based on the model and version of the browser to be tested; 响应于测试环境查找成功,启动该测试环境;In response to the successful search of the test environment, start the test environment; 响应于测试环境查找失败,创建测试环境。In response to the test environment lookup failing, create a test environment. 7.根据权利要求6所述的多浏览器测试方法,所述创建测试环境包括:7. The multi-browser testing method according to claim 6, said creating a test environment includes: 读取所述待测试浏览器的配置文件,得到待测浏览器的型号和版本;Read the configuration file of the browser to be tested and obtain the model and version of the browser to be tested; 基于所述待测试浏览器的型号和版本,确定待测试浏览器的驱动程序;Based on the model and version of the browser to be tested, determine the driver of the browser to be tested; 根据所述待测试浏览器的型号、版本以及驱动程序,制作镜像容器。Create an image container based on the model, version and driver of the browser to be tested. 8.根据权利要求1所述的多浏览器测试方法,所述根据所述配置文件与所述关键代码段生成测试脚本,包括:8. The multi-browser testing method according to claim 1, generating a test script according to the configuration file and the key code segment, including: 基于待测试浏览器的配置文件,确定测试环境参数;其中,所述配置文件包括每个浏览器的版本和型号;Determine the test environment parameters based on the configuration file of the browser to be tested; wherein the configuration file includes the version and model of each browser; 读取所述脚本的字节码,基于所述测试环境参数,对所述字节码进行修改,得到待测试浏览器的测试代码,所述测试代码中创建有多个类;Read the bytecode of the script, modify the bytecode based on the test environment parameters, and obtain the test code of the browser to be tested, where multiple classes are created in the test code; 将关键代码段插入到测试代码中的指定类,得到测试脚本。Insert the key code snippet into the specified class in the test code to obtain the test script. 9.根据权利要求1所述的多浏览器测试方法,所述在所述测试环境中运行测试脚本来执行待测试浏览器的测试,包括:9. The multi-browser testing method according to claim 1, said running a test script in the test environment to perform the test of the browser to be tested, including: 将测试脚本下发至测试环境中;Distribute test scripts to the test environment; 在所述测试环境中执行所述测试脚本;Execute the test script in the test environment; 响应于测试脚本开始运行,可视化展示测试环境界面。In response to the test script starting to run, the test environment interface is visually displayed. 10.一种多浏览器测试装置,包括:10. A multi-browser testing device, including: 确定模块,用于从多个浏览器中确定主控浏览器和待测试浏览器;The determination module is used to determine the master browser and the browser to be tested from multiple browsers; 录制模块,用于响应于主控浏览器被输入的操作行为指令,执行脚本的录制;The recording module is used to execute the recording of the script in response to the operation behavior instructions input by the main control browser; 分析模块,用于基于所述脚本,确定关键代码段;An analysis module, used to determine key code segments based on the script; 环境启动模块,用于基于所述待测试浏览器的配置文件,启动测试环境;The environment startup module is used to start the test environment based on the configuration file of the browser to be tested; 生成模块,用于根据所述配置文件与所述关键代码段生成测试脚本;A generation module, configured to generate a test script based on the configuration file and the key code segment; 测试模块,用于在所述测试环境中运行测试脚本来执行待测试浏览器的测试。The test module is used to run test scripts in the test environment to perform tests on the browser to be tested. 11.一种电子设备,包括:11. An electronic device, including: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,a storage device for storing one or more programs, 其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行根据权利要求1~9中任一项所述的方法。Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 9. 12.一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行根据权利要求1~9中任一项所述的方法。12. A computer-readable storage medium having executable instructions stored thereon, which when executed by a processor causes the processor to perform the method according to any one of claims 1 to 9. 13.一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现根据权利要求1~9中任一项所述的方法。13. A computer program product, comprising a computer program that implements the method according to any one of claims 1 to 9 when executed by a processor.
CN202310714359.4A 2023-06-15 2023-06-15 Multi-browser testing methods, apparatus, equipment, media and program products Pending CN116756016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310714359.4A CN116756016A (en) 2023-06-15 2023-06-15 Multi-browser testing methods, apparatus, equipment, media and program products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310714359.4A CN116756016A (en) 2023-06-15 2023-06-15 Multi-browser testing methods, apparatus, equipment, media and program products

Publications (1)

Publication Number Publication Date
CN116756016A true CN116756016A (en) 2023-09-15

Family

ID=87958398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310714359.4A Pending CN116756016A (en) 2023-06-15 2023-06-15 Multi-browser testing methods, apparatus, equipment, media and program products

Country Status (1)

Country Link
CN (1) CN116756016A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312713A (en) * 2023-10-10 2023-12-29 中国电力科学研究院有限公司 Method and system for processing information creation environment based on browser automatic flow
CN119807077A (en) * 2025-03-12 2025-04-11 众合云科信息技术集团有限公司 An automated testing method for browser screen recording

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312713A (en) * 2023-10-10 2023-12-29 中国电力科学研究院有限公司 Method and system for processing information creation environment based on browser automatic flow
CN119807077A (en) * 2025-03-12 2025-04-11 众合云科信息技术集团有限公司 An automated testing method for browser screen recording
CN119807077B (en) * 2025-03-12 2025-06-10 众合云科信息技术集团有限公司 An automated testing method for browser screen recording

Similar Documents

Publication Publication Date Title
CN110858172B (en) A method and device for generating automatic test code
JP5225399B2 (en) Systems and methods for desktop application migration
CN113010827B (en) Page rendering method, device, electronic device and storage medium
CN113138757B (en) Front-end code automatic generation method, device, server, system and medium
CN116756016A (en) Multi-browser testing methods, apparatus, equipment, media and program products
US8849947B1 (en) IT discovery of virtualized environments by scanning VM files and images
JP2023107749A (en) Browser-based robotic process automation (RPA) robot design interface
CN112395027A (en) Widget interface generation method and device, storage medium and electronic equipment
CN111045653A (en) System generation method and device, computer readable medium and electronic equipment
CN114036439A (en) Website construction method, device, medium and electronic equipment
CN113495498B (en) Simulation method, simulator, device and medium for hardware device
CN112202598A (en) A log recording method and device
CN116737693A (en) Data migration method and device, electronic equipment and computer-readable storage medium
CN114253852A (en) Automatic testing method, device, equipment and medium
CN113656041A (en) Data processing method, apparatus, equipment and storage medium
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN118444926A (en) Cloud native code engineering template generation method, device, equipment, medium and product
CN115033634B (en) Data collection method, device, electronic device and medium
CN113282285B (en) Code writing method, device, electronic equipment and storage medium
CN113535590B (en) Program testing method and device
CN113064987A (en) Data processing method, apparatus, electronic device, medium, and program product
CN114416781A (en) Data searching method and device, electronic equipment and storage medium
CN112860543A (en) Method and electronic equipment for detecting page operation
US11868382B1 (en) Software utility toolbox for client devices
CN113360417B (en) Test method, session modifier, electronic device and medium

Legal Events

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