CN113225223A - Automatic testing method for WEB authentication process of PC terminal - Google Patents

Automatic testing method for WEB authentication process of PC terminal Download PDF

Info

Publication number
CN113225223A
CN113225223A CN202110429207.0A CN202110429207A CN113225223A CN 113225223 A CN113225223 A CN 113225223A CN 202110429207 A CN202110429207 A CN 202110429207A CN 113225223 A CN113225223 A CN 113225223A
Authority
CN
China
Prior art keywords
terminal
grid service
service
selenium
selenium grid
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.)
Granted
Application number
CN202110429207.0A
Other languages
Chinese (zh)
Other versions
CN113225223B (en
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.)
Wuhan Sipuling Technology Co Ltd
Original Assignee
Wuhan Sipuling 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 Wuhan Sipuling Technology Co Ltd filed Critical Wuhan Sipuling Technology Co Ltd
Priority to CN202110429207.0A priority Critical patent/CN113225223B/en
Publication of CN113225223A publication Critical patent/CN113225223A/en
Application granted granted Critical
Publication of CN113225223B publication Critical patent/CN113225223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention relates to an automatic test method for a WEB authentication process of a PC terminal, which comprises the following steps: starting a selenium grid service on the test execution machine, and remotely opening the selenium grid service on the intranet side PC terminal in a node role through the winrm service so as to establish a channel between the test execution machine and the intranet side PC terminal hub-nodes; remotely driving a browser on the PC terminal on the intranet side through hub-nodes channels to finish the login process of a WEB authentication user on the PC terminal on the intranet side; and after the user finishes login authentication, closing the selenium grid service of the internal network side PC terminal through the winrm service, and then closing the selenium grid service on the test execution machine. The invention solves the problem that the PC terminal equipment at the intranet side of the firewall equipment can not realize the automatic test of user authentication at present.

Description

Automatic testing method for WEB authentication process of PC terminal
Technical Field
The invention relates to the technical field of automatic testing, in particular to an automatic testing method, device, equipment and storage medium for a WEB authentication process of a PC terminal.
Background
The identity of the visitor is verified by the firewall equipment through user authentication, and the authentication modes of the firewall equipment comprise local WEB authentication, Pop3 authentication, portal authentication and the like. These authentication methods can be essentially classified as WEB authentication. When a terminal device on the intranet side of the firewall device, such as a Windows PC, tries to open a browser to access a network, the firewall device redirects an HTTP GET request sent by the terminal browser to a user authentication page provided by the firewall device according to a user authentication policy, and prompts a user to input a user name and a password to complete user authentication and access the network.
In the field of automatic testing of the current firewall equipment, user authentication of an intranet-side Windows PC terminal (hereinafter referred to as a PC terminal) has not been automated, mainly because an execution host running the automatic testing cannot directly control a browser of the intranet-side PC terminal equipment of the firewall equipment.
Therefore, a reasonable method needs to be found out to drive the browser of the PC terminal on the intranet side of the firewall device to complete a series of operations of accessing a web page, recognizing a redirection page, inputting a user name and a password, completing user authentication, and judging whether authentication is successful or not.
Disclosure of Invention
In view of the above, it is necessary to provide an automatic testing method for a WEB authentication process of a PC terminal, so as to solve the problem that the intranet PC terminal of the current firewall device cannot implement an automatic testing of the user authentication process.
In a first aspect, the present invention provides an automated testing method for a WEB authentication process of a PC terminal, comprising the following steps:
starting a selenium grid service on a test execution machine, and remotely opening the selenium grid service on an internal network side PC terminal through a winrm service to establish a hub-nodes channel;
remotely driving a login authentication interface of a browser on the PC terminal on the Internet side to display through a hub-nodes channel, and completing the login of a WEB authentication user on the PC terminal on the Internet side through preset test parameters;
and after the WEB authentication is finished, closing the selenium grid service of the PC terminal at the internal network side through the winrm service, and finally closing the selenium grid service on the test execution machine.
Preferably, in the automatic testing method for the PC terminal WEB authentication process, the role of the selenium grid service of the test execution machine is a central node, and the role of the selenium grid service on the intranet PC terminal is a proxy node.
Preferably, in the automatic testing method for the WEB authentication process of the PC terminal, the remotely opening the selenium grid service on the intranet PC terminal through the winrm service specifically includes:
establishing a connection from a test execution machine to an intranet side PC terminal by using a Protocol method contained in a winrm library in python language;
and executing a first batch of processing files preset on the PC terminal at the intranet side, and calling a second batch of processing files preset on the PC terminal at the intranet side through the first batch of processing files so as to start a selenium grid service running in a proxy node role on the PC terminal at the intranet side.
Preferably, in the method for automatically testing the WEB authentication process of the PC terminal, the remotely driving, through the hub-nodes channel, a login authentication interface display of a browser on the PC terminal on the intranet side, and completing the login of the WEB authentication user through preset test parameters specifically include:
acquiring test parameters stored on a test execution machine, wherein the test parameters at least comprise user authentication information and authentication page characteristics;
controlling a browser of the PC terminal on the intranet side to open a webpage by adopting a remote browser calling function of a selenium grid based on the hub-nodes channel, wherein the opened webpage corresponds to the authentication page characteristic;
and when the opened page jumps to a user authentication page, performing user login authentication on the user authentication page by using the user authentication information.
Preferably, in the automatic testing method for the PC terminal WEB authentication process, the user authentication information at least includes a login user name, a login password, and an access domain name.
Preferably, the closing the selenium grid service of the PC terminal on the intranet side by the winrm service, and finally closing the selenium grid service on the test execution machine specifically includes:
establishing a connection from a test execution machine to an intranet side PC terminal by a Protocol method contained in a winrm library in a python language;
then, executing a dos command in the windows by using a run _ command method contained in the winrm library to end the selenium grid service on the PC terminal at the intranet side;
and finally, closing the selenium grid service on the test execution machine by using a kill method contained in a supprocess library in the python language.
In a second aspect, the present invention further provides an automatic testing apparatus for a WEB authentication process of a PC terminal, including:
a selenium grid service opening module used for opening the selenium grid service of the test execution machine and remotely opening the selenium grid service on the internal network side PC terminal through the winrm service to establish a hub-nodes channel;
the login authentication module is used for remotely driving a login authentication interface of a browser on the PC terminal on the intranet side to display through a hub-nodes channel and completing WEB authentication user login on the PC terminal on the intranet side through preset test parameters;
and the selenium grid service closing module is used for closing the selenium grid service of the internal network side PC terminal through the winrm service and closing the selenium grid service of the test execution machine after the web authentication is finished.
Preferably, in the automatic testing apparatus for the PC terminal WEB authentication process, the role of the selenium grid service of the test execution machine is a central node, and the role of the selenium grid service on the intranet side PC terminal is a proxy node.
In a third aspect, the present invention further provides an automated testing method and apparatus for a WEB authentication process of a PC terminal, including: a processor and a memory;
the memory has stored thereon a computer readable program executable by the processor;
the processor implements the steps of the automatic testing method of the PC terminal WEB authentication process when executing the computer readable program.
In a fourth aspect, the present invention also provides a computer readable storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps in the method for automatically testing the WEB authentication process of a PC terminal as described above.
Compared with the prior art, the automatic testing method, the device, the equipment and the storage medium for the WEB authentication process of the PC terminal provided by the invention convert the original design concept of the multi-terminal parallel running script in the selenium grid into the automatic testing execution host (hub) which controls the PC terminal (nodes) on the inner network side of the firewall to carry out the WEB authentication user authentication automatic test through the hub-nodes channel, and the opening and closing of the selenium grid service running on the PC terminal by the automatic testing execution host is realized by using Winrm, so that the automatic test of the WEB authentication based on the PC terminal browser on the inner network side can be realized, a large amount of manpower is saved, and compared with manual test, the method, the device, the equipment and the storage medium are more objective and accurate, and the test coverage is more complete.
Drawings
Fig. 1 is a flowchart of an automated testing method for a WEB authentication process of a PC terminal according to a preferred embodiment of the present invention.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention and not to limit the scope of the invention.
S100, starting a selenium grid service on the test execution machine, and remotely opening the selenium grid service on the internal network side PC terminal through the winrm service to establish a hub-nodes channel.
In this embodiment, the selenium is a tool for UI automation testing. The selenium grid is part of a selenium suite that is used to run scripts in parallel on different browsers, operating systems, and machines. The selenium grid uses a distributed structure: comprising a hub node and a plurality of proxy nodes registered with the hub. The hub is used to manage registration information and status information of each node, and accepts invocation requests of remote client code, and then forwards the requested commands to the nodes for execution. In general, the design and use of the selenium grid are to implement execution of a set of scripts on different nodes devices through a set of hub-nodes networks. The embodiment of the invention converts the original design concept of the multi-terminal parallel running script in the selenium grid into the automatic test execution host (the role here is still hub) to control the firewall intranet PC terminal (the role here is nodes) through the hub-nodes network to carry out the automatic test of WEB authentication user login. The role of the selenium grid service of the test execution machine is a central node (hub), and the role of the selenium grid service on the intranet side PC terminal is a proxy node (node).
In other words, the topology of the automated test can also be understood as a hub-node structure. The automated test execution host can be used as a hub node, and the intranet PC terminal can be used as a node. All PC terminals are hung on the intranet side of the firewall device, and behaviors such as user authentication and internet surfing are all constrained by a user authentication strategy configured on the firewall device. The PC terminals are all provided with a special network card and a route which are connected with the test execution machine. Therefore, the test execution machine can control the user authentication login behavior of the PC terminal as long as the local execution machine and the intranet PC terminal are deployed with the selenium grid service and ensure the normal work of the selenium grid. In specific implementation, firstly, the selenium grid service is opened in the role of hub on the automated test execution host, then the selenium grid service is opened in the role of node on the internal network side PC terminal, the IP and the port of the hub node are specified in the input parameters, after the service is operated, the node is registered to the hub node, so that a hub-node channel is established, and after the node is registered to the hub, the hub node can drive the browser of a specific node through the IP and the port of the node, so that the user authentication automated test is realized.
Further, the steps of deploying the selenium on the automated test execution host and the intranet side PC terminal are as follows:
a. and j dk is downloaded and installed at the execution host and the PC terminal.
b. And downloading the selenium-server-standby-3.141.59. jar at the execution host and the PC terminal. 3.141.59 is the version number, only the test execution machine and the PC terminal need to be guaranteed to run the same version of file. The jar file of the execution host is stored in the directory of the automatic test suite, the jar file of the PC terminal is stored in the directory of C \ Users \ vm, and vm refers to the login name of the PC terminal and can be replaced by any valid value.
c. Entering a command line on the execution host, switching to jar peer directory, entering a command such as java-jar discovery-server-standby-3.141.59. jar-role hub-maxsission 2-port 4444, and opening the discovery-grid service in the hub role.
d. Entering a command line on a PC terminal (node), switching to a peer directory of jar, entering a command such as java-jar selenium-server-standby-3.141.59. jar-role node-port 6666-hub http://192.168.200.6:4444/grid/register-host 192.168.203.114-browser name ═ firmware, opening the selenium-grid service in the role of node, and designating which hub needs to be registered. Each different node uses a different port number. Taking a PC terminal with IP address 192.168.203.114 as an example, it is assigned port 6666.
e. At this time, the test execution unit (hub) can see that the intranet PC terminal (node) is successfully connected.
f. So far, the work of setting up the preset environment is completely finished.
Further, in the above process, the selenium grid service on the PC terminal (node) on the intranet side needs to be manually maintained. In an automated test system, the selenium grid service must be maintainable, i.e., needs to be turned on and off by code during script execution. Therefore, another technique winrm service is introduced in the embodiment of the invention to realize the point. Where the winrm service refers to Windows remote management service, it will listen 5985 to the port running commands on the remote target host with a trusted identity. In specific implementation, the remotely opening the selenium grid service on the intranet PC terminal through the winrm service specifically includes:
establishing a connection from a test execution machine to an intranet side PC terminal by using a Protocol method contained in a wirm library in a python language, then executing a first batch of processing files preset on the intranet side PC terminal, calling a second batch of processing files preset on the intranet side PC terminal through the first batch of processing files to start a selenium grid service running in a proxy node role on the intranet side PC terminal, wherein the content in the first batch of processing files is, for example, call java-jar-selenium-server-standby-3.141.59. jar-roll node-port 5555-hub http://192.168.200.6:4444/grid/register-host 192.168.203.113-browser name ═ firmware, and establishing a remote connection with the intranet side PC terminal through the wirm service.
In this embodiment, first, it is necessary to open the winnm on the execution host (hub) and the intranet PC terminal (nodes) and ensure that the winnm works normally. Wirm is a standard service on windows, and the opening process is not described in detail here. In case the winter service is already open and the selenium grid service is already able to work properly, the execution host may be made to control the selenium grid service on the PC terminal.
In specific implementation, because the run _ command method included in the winrm library can only execute a standard DOS command and cannot directly execute java, a secondary call batch file is required to be executed to run java. For example, the file to be directly called is start. And in the file named callback bat, the content is such as call java-jar selenium-server-standalone-3.141.59.jar-role node-port 5555-hub http://192.168.200.6:4444/grid/register-host 192.168.203.113-browser name ═ firefox. Bat is directly executed by winrm without secondary call batch processing, the execution result of java command is displayed in an interactive interface, the continuous waiting is entered, and the next testing task cannot be executed, so the control of the selenium grid service on the PC terminal is completed by establishing the secondary batch processing bat on the PC terminal. Specifically, two batch files are stored in the directory C of the PC terminal, \ Users \ vm (here vm is the user name for logging in the PC): bat, a first batch of files, and a second batch of files, wherein the specific task of the first batch of files is to invoke the additional second batch of files, and the task of the second batch of files is to initiate the selenium grid service in the role of the node, and the method of invoking the second batch of files by the first batch of files, can be used to continue the execution of the subsequent testing steps after the execution of the secondary call.
S200, remotely driving a login authentication interface of a browser on the PC terminal on the intranet side to display through a hub-nodes channel, and completing the login of a WEB authentication user on the PC terminal on the intranet side through preset test parameters.
Specifically, when the hub-nodes channel is established, browser control of the PC terminal on the Internet side can be started, and user authentication is realized. Specifically, the step S200 includes:
acquiring test parameters stored on a test execution machine, wherein the test parameters at least comprise user authentication information and authentication page characteristics;
controlling a browser of the PC terminal on the intranet side to open a webpage by adopting a remote browser calling function of a selenium grid based on the hub-nodes channel, wherein the opened webpage corresponds to the authentication page characteristic;
and when the opened page jumps to a user authentication page, performing user login authentication on the user authentication page by using the user authentication information.
Specifically, the test parameters are stored in the test execution machine in the form of a test suite code, and the user authentication information at least includes a login user name, a login password, and an access domain name. Firstly, a login user name and a password are received from a test suite, which domain name is accessed, then a browser of an intranet PC terminal is instantiated by using a remote method (such as browser ═ remote: (http:// remote _ ip: remote _ port/wd/hub), and capability) contained in a python language selenium library, wherein the name is browser, and then various operations can be performed on the browser object browser.
The browser object browser is enabled to open a page, and due to the existence of a user authentication strategy of the firewall equipment, the http request is redirected to the user authentication page;
judging whether redirection is successful or not according to whether a browser contained in a python language selenium library is equal to a title of a user authentication page (such as local WEB authentication), inputting a user name and a password, and submitting a login request;
judging whether the login is successful or not according to prompt information of a pop-up box after the login request is submitted;
if the authentication is successful, switching the Web page to a Web page reserved for access, and judging whether the Web page reserved for access is correctly opened after the authentication is successful according to the value of the browser in the python language selenium library;
and switching the Web page to a login success page, clicking to quit, closing the Web page, and completing the whole login-quit process. In the above processes, the browser operation is completed by using the selenium grid in the python language.
S300, after WEB authentication is completed, closing the selenium grid service of the internal network side PC terminal through the winrm service, and finally closing the selenium grid service on the test execution machine.
Specifically, after login authentication is completed, the hub-nodes channel can be removed, and the intranet PC terminal and the local terminal's selenium grid service are closed. Specifically, the closing of the selenium grid service of the intranet PC terminal through the winrm service specifically includes:
establishing a connection from a test execution machine to an intranet side PC terminal by a Protocol method contained in a winrm library in a python language;
then, executing a dos command in windows by using a run _ command method contained in the winrm library to end the selenium grid service on the PC terminal at the intranet side;
and finally, closing the selenium grid service on the test execution machine by using a kill method contained in a supprocess library in the python language.
In other words, the manner of closing the selenium grid service of the intranet side PC terminal is similar to the manner of opening the selenium grid service of the web PC terminal, and is completed by sending an Msdos command from the test execution machine to the intranet side PC terminal through a run _ command method contained in the winrm library in python language. Wherein the dos command specifically comprises: taskkill/F/IM java.
For better understanding of the present invention, the technical solution of the present invention is described in detail by referring to a specific embodiment:
the first step is to open a selenium grid service of the execution host:
all test scripts are run on the test execution machine, and the opening of the local selenium grid service of the test execution machine is completed in the following way:
a subprocess is created by using a Popen method contained in a supprocess library in the python language, and a command such as java-jar selenium-server-standalone-3.141.59.jar-role hub-maxSession2-port 4444' is executed to open the selenium grid service. Then leave the process and continue with the next step.
And step two, opening a selenium grid service of the PC terminal at the intranet side:
establishing a connection from a test execution machine to an intranet side PC terminal by using a Protocol method contained in a winrm library in python language, then executing an Msdos command from the test execution machine to the PC terminal by using a run _ command method contained in the winrm library, and opening a preset batch processing file on the PC terminal so as to open a selenium grid service of the PC terminal.
And thirdly, instantiating a browser of the intranet PC terminal by using a remote method contained in a python language selenium library, and driving the browser of the PC terminal to finish the user authentication login process.
Step four, closing the selenium grid service of the PC terminal:
and executing an Msdos command 'taskill/F/IM java.exe' from the test execution machine to the PC terminal by using a run _ command method contained in the winrm library to close the selenium grid service of the PC terminal.
Step five, closing the selenium grid service of the test execution machine:
and forcibly ending the sub-process created in the first step by using a kill method contained in a supprocess library in the python language to close the selenium grid service of the execution host.
Based on the automatic test method for the WEB authentication process of the PC terminal, the invention also correspondingly provides an automatic test method device for the WEB authentication process of the PC terminal, which comprises the following steps:
a selenium grid service opening module used for opening the selenium grid service of the test execution machine and remotely opening the selenium grid service on the internal network side PC terminal through the winrm service to establish a hub-nodes channel;
the login authentication module is used for remotely driving a login authentication interface of a browser on the PC terminal on the intranet side to display through a hub-nodes channel and completing WEB authentication user login on the PC terminal on the intranet side through preset test parameters;
and the selenium grid service closing module is used for closing the selenium grid service of the internal network side PC terminal through the winrm service and closing the selenium grid service of the test execution machine after the web authentication is finished.
Preferably, the role of the selenium grid service of the test execution machine is a central node, and the role of the selenium grid service on the intranet side PC terminal is a proxy node.
Since the above has described the automatic testing method of the PC terminal WEB authentication process in detail, the technical effect of the automatic testing method of the PC terminal WEB authentication process is achieved, and the automatic testing method device of the PC terminal WEB authentication process is also achieved, so that the detailed description is omitted here.
Based on the automatic test method for the WEB authentication process of the PC terminal, the invention also correspondingly provides an automatic test method device for the WEB authentication process of the PC terminal, which comprises the following steps: a processor and a memory;
the memory has stored thereon a computer readable program executable by the processor;
the processor, when executing the computer readable program, implements the steps in the method for automatically testing the WEB authentication process of the PC terminal according to the embodiment.
Since the above has described the automatic testing method of the PC terminal WEB authentication process in detail, the technical effect of the automatic testing method of the PC terminal WEB authentication process is achieved, and the automatic testing device of the PC terminal WEB authentication process is also achieved, so that the detailed description is omitted here.
Based on the above automatic testing method for the PC terminal WEB authentication process, the present invention further provides a computer readable storage medium, where one or more programs are stored in the computer readable storage medium, and the one or more programs can be executed by one or more processors to implement the steps in the automatic testing method for the PC terminal WEB authentication process according to the above embodiment.
Since the above has described the automatic testing method of the PC terminal WEB authentication process in detail, the technical effect of the automatic testing method of the PC terminal WEB authentication process is also possessed by the computer readable storage medium, and thus, no further description is given here.
In summary, the automatic testing method, device, equipment and storage medium for the PC terminal WEB authentication process provided by the present invention convert the original design concept of the multi-terminal parallel running script in the selenium grid into the automatic testing execution machine (hub) to control the firewall intranet PC terminal (nodes) via the hub-nodes channel to perform the WEB authentication user login automatic test, and use windm to realize the opening and closing of the selenium grid service on the intranet PC terminal by the automatic testing execution machine, so that all browsers based on the intranet PC terminal can perform the automatic test of the user authentication, thereby saving a lot of manpower, and compared with the manual test, the method, device, equipment and storage medium are more objective and accurate, and the testing coverage is more complete.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.

Claims (10)

1. An automatic test method for a WEB authentication process of a PC terminal is characterized by comprising the following steps:
starting a selenium grid service on a test execution machine, and remotely opening the selenium grid service on an internal network side PC terminal through a winrm service to establish a hub-nodes channel;
remotely driving a login authentication interface of a browser on the PC terminal on the Internet side to display through a hub-nodes channel, and completing the login of a WEB authentication user on the PC terminal on the Internet side through preset test parameters;
and after the WEB authentication is finished, closing the selenium grid service of the PC terminal at the internal network side through the winrm service, and finally closing the selenium grid service on the test execution machine.
2. The automatic testing method for the WEB authentication process of the PC terminal according to claim 1, wherein a role of a selenium grid service on the test execution machine is a central node, and a role of the selenium grid service on the intranet side PC terminal is a proxy node.
3. The automatic testing method for the WEB authentication process of the PC terminal according to claim 2, wherein the remote opening of the selenium grid service on the intranet PC terminal through the winrm service specifically comprises:
establishing a connection from a test execution machine to an intranet side PC terminal by using a Protocol method contained in a winrm library in python language;
and executing a first batch of processing files preset on the PC terminal at the intranet side, and calling a second batch of processing files preset on the PC terminal at the intranet side through the first batch of processing files so as to start a selenium grid service running in a proxy node role on the PC terminal at the intranet side.
4. The method for automatically testing the WEB authentication process of the PC terminal according to claim 1, wherein the remotely driving the login authentication interface display of the browser on the PC terminal on the intranet side through the hub-nodes channel, and completing the login of the WEB authentication user through the preset test parameters specifically comprises:
acquiring test parameters stored on a test execution machine, wherein the test parameters at least comprise user authentication information and authentication page characteristics;
controlling a browser of the PC terminal on the intranet side to open a webpage by adopting a remote browser calling function of a selenium grid based on the hub-nodes channel, wherein the opened webpage corresponds to the authentication page characteristic;
and when the opened page jumps to a user authentication page, performing user login authentication on the user authentication page by using the user authentication information.
5. The method for automatically testing the WEB authentication process of the PC terminal according to claim 4, wherein the user authentication information at least comprises a login user name, a login password and an access domain name.
6. The method for automatically testing the WEB authentication process of the PC terminal according to claim 1, wherein the step of closing the selenium grid service of the PC terminal on the intranet side through the winrm service, and the step of closing the selenium grid service on the test execution machine specifically includes:
establishing a connection from a test execution machine to an intranet side PC terminal by a Protocol method contained in a winrm library in a python language;
then, executing a dos command in the windows by using a run _ command method contained in the winrm library to end the selenium grid service on the PC terminal at the intranet side;
and finally, closing the selenium grid service on the test execution machine by using a kill method contained in a supprocess library in the python language.
7. An automatic test method device for a WEB authentication process of a PC terminal is characterized by comprising the following steps:
a selenium grid service opening module used for opening the selenium grid service of the test execution machine and remotely opening the selenium grid service on the internal network side PC terminal through the winrm service to establish a hub-nodes channel;
the login authentication module is used for remotely driving a login authentication interface of a browser on the PC terminal on the intranet side to display through a hub-nodes channel and completing WEB authentication user login on the PC terminal on the intranet side through preset test parameters;
and the selenium grid service closing module is used for closing the selenium grid service of the internal network side PC terminal through the winrm service and closing the selenium grid service of the test execution machine after the web authentication is finished.
8. The automatic testing method and device for the PC terminal WEB authentication process according to claim 7, wherein a role of a selenium grid service of the test execution machine is a central node, and a role of the selenium grid service on the intranet side PC terminal is a proxy node.
9. An automatic test method and equipment for a WEB authentication process of a PC terminal is characterized by comprising the following steps: a processor and a memory;
the memory has stored thereon a computer readable program executable by the processor;
the processor, when executing the computer readable program, implements the steps in the method for automated testing of a PC terminal WEB authentication process of any of claims 1-6.
10. A computer-readable storage medium storing one or more programs which are executable by one or more processors to implement the steps of the method for automated testing of PC terminal WEB authentication process as claimed in any one of claims 1 to 6.
CN202110429207.0A 2021-04-21 2021-04-21 Automatic testing method for WEB authentication process of PC terminal Active CN113225223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110429207.0A CN113225223B (en) 2021-04-21 2021-04-21 Automatic testing method for WEB authentication process of PC terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110429207.0A CN113225223B (en) 2021-04-21 2021-04-21 Automatic testing method for WEB authentication process of PC terminal

Publications (2)

Publication Number Publication Date
CN113225223A true CN113225223A (en) 2021-08-06
CN113225223B CN113225223B (en) 2022-08-02

Family

ID=77088163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110429207.0A Active CN113225223B (en) 2021-04-21 2021-04-21 Automatic testing method for WEB authentication process of PC terminal

Country Status (1)

Country Link
CN (1) CN113225223B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611046A (en) * 2023-06-05 2023-08-18 武汉思普崚技术有限公司 Method, device and system for processing weak password based on SOAR

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151599A (en) * 1998-07-17 2000-11-21 International Business Machines Corporation Web client scripting test architecture for web server-based authentication
CN101087187A (en) * 2007-05-22 2007-12-12 网御神州科技(北京)有限公司 A method and device for secure access control based on user
CN101789967A (en) * 2010-01-12 2010-07-28 重庆大学 Remote test service system based on electronic commerce and use method thereof
CN105471665A (en) * 2014-08-21 2016-04-06 北京奇虎科技有限公司 Website function testing method, website function testing system and website server
CN107943708A (en) * 2017-12-19 2018-04-20 郑州云海信息技术有限公司 It is a kind of based on the WEB automated testing methods performed parallel
CN108923997A (en) * 2018-05-24 2018-11-30 广东睿江云计算股份有限公司 A kind of cloud service node automatic test approach and device based on python
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN110442524A (en) * 2019-08-09 2019-11-12 中国建设银行股份有限公司 It is a kind of for have Certificate Authority web service interface test method and device
CN110505117A (en) * 2019-08-07 2019-11-26 深圳市吉祥腾达科技有限公司 TR069 test method, system and storage medium
CN112306851A (en) * 2019-08-01 2021-02-02 北京京东尚科信息技术有限公司 Automatic testing method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151599A (en) * 1998-07-17 2000-11-21 International Business Machines Corporation Web client scripting test architecture for web server-based authentication
CN101087187A (en) * 2007-05-22 2007-12-12 网御神州科技(北京)有限公司 A method and device for secure access control based on user
CN101789967A (en) * 2010-01-12 2010-07-28 重庆大学 Remote test service system based on electronic commerce and use method thereof
CN105471665A (en) * 2014-08-21 2016-04-06 北京奇虎科技有限公司 Website function testing method, website function testing system and website server
CN107943708A (en) * 2017-12-19 2018-04-20 郑州云海信息技术有限公司 It is a kind of based on the WEB automated testing methods performed parallel
CN108923997A (en) * 2018-05-24 2018-11-30 广东睿江云计算股份有限公司 A kind of cloud service node automatic test approach and device based on python
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN112306851A (en) * 2019-08-01 2021-02-02 北京京东尚科信息技术有限公司 Automatic testing method and device
CN110505117A (en) * 2019-08-07 2019-11-26 深圳市吉祥腾达科技有限公司 TR069 test method, system and storage medium
CN110442524A (en) * 2019-08-09 2019-11-12 中国建设银行股份有限公司 It is a kind of for have Certificate Authority web service interface test method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611046A (en) * 2023-06-05 2023-08-18 武汉思普崚技术有限公司 Method, device and system for processing weak password based on SOAR
CN116611046B (en) * 2023-06-05 2024-04-09 武汉思普崚技术有限公司 Method, device and system for processing weak password based on SOAR

Also Published As

Publication number Publication date
CN113225223B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
US7043537B1 (en) System and method for remote device management
US6567852B2 (en) Web user interface session and sharing of session environment information
JP4664977B2 (en) Device management method for device management system
CN107819874B (en) Method for remotely controlling firewall terminal
CN104346559B (en) Authority request response method and corresponding device
US20070192082A1 (en) System and method for generating and executing a platform emulation based on a selected application
US20110292942A1 (en) Router, information processing device and program
CN113225223B (en) Automatic testing method for WEB authentication process of PC terminal
CN111581095A (en) Self-starting USB debugging method and device based on barrier-free service and storage medium
US20090031011A1 (en) Device management system and method for setting configuration-valve therein
CN107294910B (en) Login method and server
CN110413308B (en) Software operation and maintenance method, device, equipment and computer storage medium
CN111177715A (en) Mobile App vulnerability detection method and device
CN116627595A (en) Virtual machine creation method and related components
CN114827133A (en) Application software management method and device and computer
CN107071040B (en) Authority control method and system based on file descriptor and session
US20070157158A1 (en) Software implementation of hardware platform interface
US6594689B1 (en) Multi-platform helper utilities
US20090054048A1 (en) Apparatus and Method for Configuration of Telecommunication Terminals
CN111162969A (en) RSU and OBU online debugging method, system and medium
CN117579695B (en) Vehicle remote operation and maintenance system and method for SSH terminal and relay service
GB2583904A (en) Commissioning a virtualised network function
CN116107875A (en) Software testing method, device, equipment and storage medium
CN109981640B (en) Connection establishment method and device
RU2738029C1 (en) Method, apparatus and device for implementing driver and computer-readable data 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
GR01 Patent grant
GR01 Patent grant