Automatic testing method, device and equipment and storage medium

By creating and configuring test machine nodes on the automation server, and starting and configuring test tasks, the system incompatibility problem in the localization transformation of enterprise UI automation testing was solved, realizing a seamless migration from Windows system to domestic operating system, simplifying operation steps and improving operability.

CN119807050APending Publication Date: 2025-04-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411867847.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

During the process of automated testing of enterprise UI, system incompatibility issues exist between different operating systems in the localization process, resulting in data that cannot be effectively interconnected, shared and circulated, making the operation cumbersome and difficult to operate.

Method used

Create and configure the target test machine node on the automation server, start the test machine node, and create an automated test task after successful detection. Configure the task according to the information of the test project to be migrated and the browser configuration information of the target test machine, run the target test task, and obtain the automated test results.

Benefits of technology

It enables seamless migration of enterprise UI automation test scripts from Windows systems to domestic operating systems, resolving system incompatibility issues, simplifying operation steps, and enhancing operability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807050A_ABST
    Figure CN119807050A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic testing method, device and equipment and a storage medium, and belongs to the technical field of artificial intelligence and the field of distributed technologies, and the method comprises the steps: creating and configuring a testing machine node corresponding to a target testing machine on an automatic server; starting the test machine node, and after it is detected that the test machine node is successfully started, creating an automatic test task corresponding to the test machine node on the automatic server; according to the item information of the to-be-migrated test item and target browser configuration information corresponding to the target test machine, configuring the automatic test task to obtain a target test task; and running the target test task to obtain an automatic test result. According to the method, the problem of system incompatibility in the enterprise UI automatic test localization transformation process is solved, the operation steps of enterprise UI automatic test localization transformation are simplified, and the operability of enterprise UI automatic test localization transformation is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence technology and distributed technology, and in particular to an automated testing method, device, equipment and storage medium. Background Art

[0002] In today's globalized economic landscape, localization is gradually becoming the focus of attention in various fields. With the increasing demand for domestic operating system replacement, replacing the Windows system with a domestic operating system without affecting the business operation of the original system has been mentioned and applied in many market projects.

[0003] However, the work of localizing the enterprise UI (User Interface) automated testing is not smooth. Due to the differences in technology and standards of different operating systems, data between different types of operating systems cannot be effectively interconnected, shared and circulated, resulting in system incompatibility. This requires a lot of technical adaptation work during the localization process, which is cumbersome and difficult to operate. Summary of the invention

[0004] The present invention provides an automated testing method, device, equipment and storage medium to solve the system incompatibility problem in the process of localization transformation of enterprise UI automated testing, simplify the operation steps of the localization transformation of enterprise UI automated testing, and enhance the operability of the localization transformation of enterprise UI automated testing.

[0005] According to one aspect of the present invention, there is provided an automated testing method, the method comprising:

[0006] Create and configure the test machine node corresponding to the target test machine on the automation server;

[0007] Start the test machine node, and after detecting that the test machine node is successfully started, create an automated test task corresponding to the test machine node on the automation server;

[0008] According to the project information of the test project to be migrated and the browser configuration information of the browser on the target test machine, the automated test task is configured to obtain the target test task;

[0009] Run the target test task to obtain the automated test results.

[0010] According to another aspect of the present invention, there is provided an automated testing device, the device comprising:

[0011] A test machine node creation module is used to create and configure a test machine node corresponding to a target test machine on an automation server;

[0012] A test task creation module is used to start the test machine node and, after detecting that the test machine node has been successfully started, create an automated test task corresponding to the test machine node on the automation server;

[0013] A target test task determination module is used to configure the automated test task according to the project information of the test project to be migrated and the browser configuration information of the browser on the target test machine to obtain the target test task;

[0014] The test result determination module is used to run the target test task and obtain the automated test result.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the automated testing method of any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the automated testing method of any embodiment of the present invention when executed.

[0020] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the automated testing method of any embodiment of the present invention.

[0021] The technical solution of the embodiment of the present invention is to create and configure a test machine node corresponding to the target test machine on the automation server; start the test machine node, and after detecting that the test machine node has been successfully started, create an automated test task corresponding to the test machine node on the automation server; configure the automated test task according to the project information of the test project to be migrated and the browser configuration information of the browser on the target test machine to obtain the target test task; run the target test task to obtain the automated test result. The above technical solution adjusts the project information of the test project to be migrated according to the target browser configuration information to make it compatible with the domestic operating system, realizes the seamless migration of the enterprise UI automated test script on the Windows system to the domestic operating system (for example, Kylin system), solves the system incompatibility problem in the process of localization transformation of enterprise UI automated testing, does not need to perform a large amount of technical adaptation work in the process of localization transformation, simplifies the operation steps of the localization transformation of enterprise UI automated testing, and enhances the operability of the localization transformation of enterprise UI automated testing.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 is a flow chart of an automated testing method provided according to Embodiment 1 of the present invention;

[0025] Figure 2 is a flow chart of an automated testing method provided according to Embodiment 2 of the present invention;

[0026] Figure 3 is a structural schematic diagram of an automated testing device provided according to Embodiment 3 of the present invention;

[0027] Figure 4 It is a structural schematic diagram of an electronic device for implementing the automated testing method of an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the term "target" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] In addition, it should be noted that in the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of project information of the test projects to be migrated and the target browser configuration information, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0031] Embodiment 1

[0032] Figure 1 This is a flowchart of an automated testing method provided in the first embodiment of the present invention. This embodiment is applicable to the case of domestic transformation of enterprise UI automated testing, especially to the case of migrating enterprise UI automated testing scripts on Windows systems to domestic operating systems (such as Kylin systems). This method can be executed by an automated testing device, which can be implemented in the form of hardware and / or software and can be configured in electronic devices. Figure 1 As shown, the method includes:

[0033] S101. Create and configure a test machine node corresponding to a target test machine on an automation server.

[0034] Among them, the automation server refers to a server that can provide services such as automated creation, testing and deployment; optionally, the automation server can be Jenkins. Jenkins is an open source continuous integration server written in Java, designed to automate various software development tasks, from creation, testing to deployment. It should be noted that in order to better realize enterprise UI automation testing, it is necessary to integrate Selenium, TestNG and Maven on the automation server. Among them, Selenium, also known as the browser automation testing framework, is an open source tool for Web application testing. It drives the interaction between pages through a set of Javascript libraries to realize web automation testing. TestNG is an open source automation testing framework for organizing and managing test cases. Maven is an open source project in the Apache organization, which mainly serves project building, dependency management and project information management based on the Java platform.

[0035] Among them, the target test machine refers to a digital computer with a domestic operating system as the operating system pre-specified by the demander. The demander refers to the party that needs to carry out domestic transformation of the enterprise UI automation test; optionally, the demander can be the tester responsible for carrying out domestic transformation of the enterprise UI automation test. The domestic operating system refers to the operating system independently developed by a Chinese software company; optionally, the domestic operating system can be the Kylin operating system. The test machine node refers to the node corresponding to the target test machine on the automation server.

[0036] Specifically, in response to the demander's node creation operation in the node management page of the automation server, a test machine node corresponding to the target test machine can be created on the automation server; and after detecting that the test machine node is successfully created, the node automatically jumps to the node configuration page corresponding to the test machine node; according to actual testing requirements, the test machine node is configured in the node configuration page; thereafter, in response to the demander's save operation on the node configuration interface, the configuration of the test machine node is completed.

[0037] The node creation operation refers to an operation for creating a test machine node corresponding to the target test machine on the automation server; optionally, the node creation operation may be a click operation of clicking "New Node". The save operation refers to an operation for saving the configuration information of the test machine node; optionally, the save operation may be a click operation of clicking a "Save" button.

[0038] Optionally, the configuration information of the test machine node includes the node name, node type, remote working directory and node startup mode. Among them, the node name refers to the name of the test machine node; the node type refers to the type of the test machine node; the remote working directory refers to the directory used by the test machine node to store automated test scripts and test results; the node startup mode refers to the method used to start the test machine node.

[0039] It can be understood that when configuring the test machine node corresponding to the target test machine on the automation server, the node name of the test machine node is configured so that the test machine node can be quickly located among the many nodes of the automation server based on the node name of the test machine node; the node type of the test machine node is configured to make the test machine node more adaptable to the test environment; the remote working directory of the test machine node is configured to store and manage the files generated by the test machine node during the automated testing process; and the node startup mode of the test machine node is configured to ensure that the test machine node can be stably and securely connected to the automation server.

[0040] S102: Start the test machine node, and after detecting that the test machine node is successfully started, create an automated test task corresponding to the test machine node on the automated server.

[0041] Specifically, the test machine node can be started through the console of the automation server according to the node startup method of the test machine node, so as to simplify the test machine node startup process while ensuring that the test machine node can be stably and securely connected to the automation server; then, after detecting that the test machine node is successfully started, jump to the task creation page of the automation server; in response to the task creation operation of the demander on the task creation page, create an automated test task corresponding to the test machine node on the automation server. Among them, the task creation operation refers to the operation used to create an automated test task corresponding to the test machine node on the automation server; optionally, the task creation operation can be a click operation of clicking "New Task".

[0042] Optionally, after starting the test machine node, it is also possible to determine whether the test machine node is started successfully by detecting the node status of the test machine node, so as to timely discover problems in the test environment and ensure the correctness of the test environment.

[0043] Specifically, after starting the test machine node, if it is detected that the node status of the test machine node is online, it is determined that the test machine node is started successfully; otherwise, it is determined that the test machine node fails to start.

[0044] S103 . According to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine, the automated test task is configured to obtain the target test task.

[0045] Among them, the test project to be migrated refers to the automated test project to be migrated on the test machine with Windows system as the operating system. Optionally, the project information of the test project to be migrated includes but is not limited to the project storage address, project configuration file and user credentials corresponding to the test project to be migrated. Among them, the project storage address refers to the address used to store the test project to be migrated. The project configuration file refers to a file used to set and store the configuration information of the test project to be migrated. User credentials refer to a set of data used to verify the user identity and authorize access to the system, network or service. It should be noted that the user credentials corresponding to the test project to be migrated are generally stored in the C:\Users\username*\.ssh directory of the test machine to which the test project to be migrated belongs.

[0046] The target browser configuration information refers to the configuration information of the browser on the target test machine; optionally, the target browser configuration information includes but is not limited to browser security setting information, browser type, browser driver, browser privacy setting information and browser compatibility setting information. The target test task refers to the configured automated test task.

[0047] Specifically, the task configuration page corresponding to the automated test task can be used to configure the automated test task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine to obtain the target test task.

[0048] S104: Run the target test task to obtain the automated test result.

[0049] Among them, the automated test results refer to the test results obtained by running the target test tasks.

[0050] Specifically, the target test task can be run through the console of the automation server to obtain the automation test result.

[0051] Optionally, after obtaining the automated test results, the automated test results can be visualized through a visualization tool so that the demander can understand the automated test results more intuitively and clearly.

[0052] The technical solution of the embodiment of the present invention is to create and configure a test machine node corresponding to the target test machine on the automation server; start the test machine node, and after detecting that the test machine node has been successfully started, create an automated test task corresponding to the test machine node on the automation server; configure the automated test task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine, and obtain the target test task; run the target test task to obtain the automated test result. The above technical solution adjusts the project information of the test project to be migrated according to the target browser configuration information to make it compatible with the domestic operating system, realizes the seamless migration of the enterprise UI automated test script on the Windows system to the domestic operating system (for example, Kylin system), solves the system incompatibility problem in the process of localization transformation of enterprise UI automated testing, does not need to perform a large amount of technical adaptation work in the process of localization transformation, simplifies the operation steps of the localization transformation of enterprise UI automated testing, and enhances the operability of the localization transformation of enterprise UI automated testing.

[0053] Embodiment 2

[0054] Figure 2 This is a flowchart of an automated testing method provided in Example 2 of the present invention. Based on the above example, this example further optimizes "configuring the automated testing task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine", and provides an optional implementation plan. It should be noted that for the parts not described in detail in the example of the present invention, reference can be made to the relevant descriptions of other examples. Figure 2 As shown, the method includes:

[0055] S201. Create and configure a test machine node corresponding to a target test machine on an automation server.

[0056] S202: Start the test machine node, and after detecting that the test machine node is successfully started, create an automated test task corresponding to the test machine node on the automated server.

[0057] S203. According to the project information of the test project to be migrated, configure the source code information of the automated test task; wherein the project information includes a project configuration file.

[0058] The project configuration file refers to a file used to set and store configuration information of the test project to be migrated. Optionally, the project information of the test project to be migrated also includes a project storage address and user credentials corresponding to the test project to be migrated.

[0059] The source code information refers to the relevant information of the source code of the automated test task; optionally, the source code information includes but is not limited to the source code pull address, test framework, test environment information and test case definition information. The source code pull address refers to the download address of the source code.

[0060] Specifically, the project information of the test project to be migrated can be obtained from the test machine to which the test project to be migrated belongs through the project management tool; and after obtaining the project information of the project to be migrated, according to the project storage address in the project information and the user credentials corresponding to the test project to be migrated, the source code pulling address of the automated testing task is configured in the source code management page corresponding to the automated testing task, that is, the project storage address of the project to be migrated is used as the source code pulling address of the automated testing task, and the user credentials of the automated testing task are configured, that is, the user credentials corresponding to the test project to be migrated are used as the user credentials of the automated testing task.

[0061] S204: Configure a target configuration file corresponding to the automated test task according to the project configuration file and the target browser configuration information corresponding to the target test machine.

[0062] The target browser configuration information refers to the configuration information of the browser on the target test machine; optionally, the target browser configuration information includes but is not limited to browser security setting information, browser type, browser driver, browser privacy setting information and browser compatibility setting information. The target configuration file refers to the configuration file of the test project corresponding to the automated test task.

[0063] Specifically, the project building tool can be determined and the environment information of the project building tool can be configured; the target test project corresponding to the automated test task can be built through the project building tool; the project configuration file of the target test project can be modified according to the project configuration file and the target browser configuration information corresponding to the target test machine to obtain the target configuration file corresponding to the automated test task. Among them, the project building tool refers to a tool used to automatically build a project; optionally, the project framework tool can be Maven.

[0064] More specifically, the project building tool is determined according to the actual project requirements; then, the environment information of the project building tool is configured by operating the .bashrc file of the target test machine. For example, the following content is written to the .bashrc file of the target test machine:

[0065] MAVEN_HOME=~ / wwx_app / apache-maven-3.6.2

[0066] export PATH=$MAVEN_HOME / bin:$PATH

[0067] After that, execute the .bashrc file of the target test machine through the source command, for example, source ~ / .bashrc, to complete the configuration of the environment information of the project build tool.

[0068] Afterwards, the target test project corresponding to the automated test task is built through the project building tool. It should be noted that the project configuration file of the target test project obtained at this time is empty. Afterwards, the content of the project configuration file of the test project to be migrated is loaded into the project configuration file of the target test project; afterward, through the project configuration file editing instructions, according to the browser type and browser driver in the target browser configuration information, the parameter setting class and driver class methods in the project configuration file of the target test project are modified to obtain the target configuration file corresponding to the automated test task.

[0069] Among them, through the project configuration file editing instruction, the parameter setting class and driver class method in the project configuration file of the target test project are modified according to the browser type and browser driver in the target browser configuration information, so as to obtain the target configuration file corresponding to the automated test task, which can be: through the project configuration file editing instruction, in the parameter setting class in the project configuration file of the target test project, the definition of the browser type and browser driver in the target browser configuration information is added, and the browser type in the target browser configuration information is added to the browser type method in the parameter setting class; at the same time, in the driver class method in the project configuration file of the target test project, a sub-method for starting the browser driver in the target browser configuration information is added.

[0070] For example, if the project configuration file of the target test project is env.properties, the browser type in the target browser configuration information is QiAnXin, and the browser driver is chromedriver_90.0.4430.24, then through the project configuration file editing instruction, add the following definition of QiAnXin and chromedriver_90.0.4430.24 to the parameter setting class in env.properties:

[0071] BrowserCoreType=qianxin;

[0072] QiAnXinBinaryPath= / usr / bin / qaxbrowser-safe-stable;

[0073] QiAnXinDriverPath=res / chromedriver_90.0.4430.24;

[0074] Among them, BrowserCoreType indicates the browser type; QiAnXinBinaryPath indicates the address of the QiAnXin browser's startup program; QiAnXinDriverPath indicates the address of the QiAnXin browser's driver.

[0075] After that, add the browser type in the target browser configuration information to the browser type method getBrowserCoreType() in the parameter setting class, that is:

[0076]

[0077]

[0078] At the same time, in the driver class method getWatchmanDriver() in the project configuration file of the target test project, add a submethod to start the browser driver in the target browser configuration information, that is:

[0079]

[0080] It can be understood that, based on the project configuration file of the test project to be migrated, it is only necessary to modify the browser parameters in the project configuration file of the test project to be migrated according to the browser type and browser driver in the target browser configuration information to complete the configuration of the target configuration file. There is no need to modify all the automated test case classes in the project configuration file of the test project to be migrated, which greatly reduces the maintenance cost of the enterprise UI automated testing, simplifies the operational steps of the localization transformation of the enterprise UI automated testing, and enhances the operability of the localization transformation of the enterprise UI automated testing.

[0081] S205: Get the target test task.

[0082] Specifically, based on S203 and S204, the automated test task is configured to obtain a target test task.

[0083] Optionally, in addition to configuring the automated test task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine, the automated test task can also be configured as follows: configure the running node of the automated test task; build and configure the trigger that triggers the automated test task.

[0084] Specifically, the test machine node is used as the running node of the automated test task to ensure that the test machine node can smoothly process the automated test task; at the same time, in response to the trigger construction operation of the demander in the task configuration page corresponding to the automated test task, jump to the trigger construction page; configure the trigger conditions of the trigger in the trigger construction page, and save the configuration, thereby completing the construction and configuration of the trigger of the automated test task. Among them, the trigger construction operation refers to the operation used to build a trigger that triggers the automated test task; optionally, the trigger construction operation can be a click operation of clicking "Build Trigger".

[0085] It can be understood that building and configuring triggers for automated testing tasks can automatically execute automated testing tasks at a specific time or when a specific event occurs, without human intervention, thereby improving testing efficiency.

[0086] S206: Run the target test task to obtain the automated test result.

[0087] The technical solution of the embodiment of the present invention is to create and configure a test machine node corresponding to the target test machine on the automation server; start the test machine node, and after detecting that the test machine node has been successfully started, create an automated test task corresponding to the test machine node on the automation server; configure the source code information of the automated test task according to the project information of the test project to be migrated; wherein the project information includes a project configuration file; configure the target configuration file corresponding to the automated test task according to the project configuration file and the target browser configuration information corresponding to the target test machine; obtain the target test task; run the target test task to obtain the automated test result. The above technical solution adjusts the project information of the test project to be migrated according to the target browser configuration information to make it compatible with the domestic operating system, realizes the seamless migration of the enterprise UI automated test script on the Windows system to the domestic operating system (for example, Kylin system), solves the system incompatibility problem in the process of localization transformation of enterprise UI automated testing, does not need to perform a large amount of technical adaptation work in the process of localization transformation, simplifies the operation steps of the localization transformation of enterprise UI automated testing, and enhances the operability of the localization transformation of enterprise UI automated testing.

[0088] Embodiment 3

[0089] Figure 3 This is a schematic diagram of the structure of an automated testing device provided in the third embodiment of the present invention. This embodiment is applicable to the localization of enterprise UI automated testing, especially to the migration of enterprise UI automated testing scripts on Windows systems to domestic operating systems (such as Kylin systems). The device can be implemented in the form of hardware and / or software and can be configured in electronic devices. Figure 3As shown, the device comprises:

[0090] A test machine node creation module 301 is used to create and configure a test machine node corresponding to a target test machine on an automation server;

[0091] The test task creation module 302 is used to start the test machine node and, after detecting that the test machine node is successfully started, create an automated test task corresponding to the test machine node on the automation server;

[0092] The target test task determination module 303 is used to configure the automated test task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine to obtain the target test task;

[0093] The test result determination module 304 is used to run the target test task and obtain the automated test result.

[0094] The technical solution of the embodiment of the present invention is to create and configure a test machine node corresponding to the target test machine on the automation server; start the test machine node, and after detecting that the test machine node has been successfully started, create an automated test task corresponding to the test machine node on the automation server; configure the automated test task according to the project information of the test project to be migrated and the browser configuration information of the browser on the target test machine to obtain the target test task; run the target test task to obtain the automated test result. The above technical solution adjusts the project information of the test project to be migrated according to the target browser configuration information to make it compatible with the domestic operating system, realizes the seamless migration of the enterprise UI automated test script on the Windows system to the domestic operating system (for example, Kylin system), solves the system incompatibility problem in the process of localization transformation of enterprise UI automated testing, does not need to perform a large amount of technical adaptation work in the process of localization transformation, simplifies the operation steps of the localization transformation of enterprise UI automated testing, and enhances the operability of the localization transformation of enterprise UI automated testing.

[0095] Optionally, the target test task determination module 303 includes:

[0096] A source code information configuration unit, configured to configure source code information of the automated test task according to project information of the test project to be migrated; wherein the project information includes a project configuration file;

[0097] The target configuration file configuration unit is used to configure the target configuration file corresponding to the automated test task according to the project configuration file and the target browser configuration information corresponding to the target test machine.

[0098] Optional, target configuration file configuration unit, specifically used for:

[0099] Determine the project building tool and configure the environment information of the project building tool;

[0100] Build the target test project corresponding to the automated test task through the project building tool;

[0101] According to the project configuration file and the target browser configuration information corresponding to the target test machine, the project configuration file of the target test project is modified to obtain the target configuration file corresponding to the automated test task.

[0102] Optionally, the device further includes a task configuration module, wherein the task configuration module is specifically used to:

[0103] Configure the automated test task as follows:

[0104] Configure the running nodes of automated testing tasks;

[0105] Build and configure triggers that trigger automated testing tasks.

[0106] Optionally, the test task creation module 302 includes a node startup unit, and the node startup unit is specifically used to:

[0107] Start the test machine node through the console of the automation server according to the node startup method of the test machine node.

[0108] Optionally, the configuration information of the test machine node includes the node name, node type, remote working directory and node startup mode.

[0109] The automated testing device provided in the embodiment of the present invention can execute the automated testing method provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to executing each automated testing method.

[0110] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0111] Embodiment 4

[0112] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0113] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0114] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0115] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as an automated testing method.

[0116] In some embodiments, the automated testing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the automated testing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the automated testing method in any other appropriate manner (e.g., by means of firmware).

[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0119] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0121] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0122] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An automated testing method, characterized in that: include: Create and configure the test machine node corresponding to the target test machine on the automation server; Starting the test machine node, and after detecting that the test machine node is successfully started, creating an automated test task corresponding to the test machine node on the automated server; According to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine, the automated test task is configured to obtain the target test task; Run the target test task to obtain the automated test result.

2. The method according to claim 1, characterized in that The configuring the automated test task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine includes: According to the project information of the test project to be migrated, the source code information of the automated test task is configured; wherein the project information includes a project configuration file; The target configuration file corresponding to the automated test task is configured according to the project configuration file and the target browser configuration information corresponding to the target test machine.

3. The method according to claim 2, characterized in that The configuring the target configuration file corresponding to the automated test task according to the project configuration file and the target browser configuration information corresponding to the target test machine includes: Determine a project construction tool and configure environment information of the project construction tool; Constructing the target test project corresponding to the automated test task by using the project construction tool; According to the project configuration file and the target browser configuration information corresponding to the target test machine, the project configuration file of the target test project is modified to obtain the target configuration file corresponding to the automated test task.

4. The method according to claim 1, characterized in that: The method further comprises: The automated test task is configured as follows: Configuring the running nodes of the automated testing tasks; Build and configure triggers for triggering the automated testing tasks.

5. The method according to claim 1, characterized in that Starting the test machine node includes: According to the node startup mode of the test machine node, the test machine node is started through the console of the automation server.

6. The method according to claim 1, characterized in that The configuration information of the test machine node includes the node name, node type, remote working directory and node startup mode.

7. An automated testing device, characterized in that: include: A test machine node creation module is used to create and configure a test machine node corresponding to a target test machine on an automation server; A test task creation module, used to start the test machine node and, after detecting that the test machine node is successfully started, create an automated test task corresponding to the test machine node on the automation server; A target test task determination module is used to configure the automated test task according to the project information of the test project to be migrated and the target browser configuration information corresponding to the target test machine to obtain the target test task; The test result determination module is used to run the target test task and obtain the automated test result.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the automated testing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the automated testing method according to any one of claims 1 to 6 when executed.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the automated testing method according to any one of claims 1 to 6.