CN113395360A - Windows system user operation simulation method, system, terminal and storage medium - Google Patents

Windows system user operation simulation method, system, terminal and storage medium Download PDF

Info

Publication number
CN113395360A
CN113395360A CN202110940101.7A CN202110940101A CN113395360A CN 113395360 A CN113395360 A CN 113395360A CN 202110940101 A CN202110940101 A CN 202110940101A CN 113395360 A CN113395360 A CN 113395360A
Authority
CN
China
Prior art keywords
program
windows system
control
target
key values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110940101.7A
Other languages
Chinese (zh)
Inventor
刘小雪
吴亚男
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110940101.7A priority Critical patent/CN113395360A/en
Publication of CN113395360A publication Critical patent/CN113395360A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a Windows system user operation simulation method, a system, a terminal and a storage medium, comprising: connecting a target Windows system server through a remote management service; initializing an application object for a program for acquiring data according to a data acquisition requirement of a target Windows system server, starting the program by using the application object and acquiring a basic code of the program after the program is started; positioning a program control from the code basic information; performing behavior analysis on the program, matching behavior key values for all program controls, and packaging all program controls matched with the behavior key values into control programs through method packaging; and executing the control program to automatically acquire the demand data of the target Windows system server. The invention realizes the simulation of the manual operation program by splitting the program needing manual operation into the controls and matching the controls with the operation key values, and can realize the automatic acquisition of the basic data or the test data of the Windows system server.

Description

Windows system user operation simulation method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of Windows system server testing, in particular to a method, a system, a terminal and a storage medium for simulating Windows system user operation.
Background
In computers, the operating system is the fundamental system software of which the most basic and most important are. From the perspective of a computer user, the computer operating system embodies the services provided for it; from the programmer's perspective, it mainly refers to the interface or interface that the user logs in; if from the perspective of the designer, this refers to the connections between the various modules and elements. In fact, the key task of designing and improving a new operating system is the design of an architecture, and after decades of development, a computer operating system has been developed into a more complex distributed operating system through an initial simple control loop, and in addition to the increasing diversification of computer user requirements, the computer operating system has become one of complex and huge computer software systems. Common operating systems include a Windows operating system and a linux system, and the Windows operating system and the linux system are different in that: windows software is supported abundantly, Windows is easy to use highly, Linux operating system has certain threshold, Linux uses the character mode of the order row as the main operating mode, Windows uses the window, icon, mouse to click the visualization way as the main operating mode, if do not understand the order row, basically use Linux is difficult to be sufficient. The inux market is mainly responsible for the server market, the Windows system is mainly responsible for the desktop market, Linux is mainly applied to the network, and the Windows operating system is initially applied to print services. Linux security is higher than Windows security, and it is required to be more reliable. Linux has powerful command line function, so that the automatic program can be executed through various command lines without manual operation.
In the fields of server production industry or data centers and the like, a large number of servers need to be subjected to basic test to obtain some basic parameters. At present, in the test and maintenance of a server, when an operating system is Windows, server information is acquired and the server is pressed, the server information is acquired by a third-party tool, and the required parameters cannot be acquired by executing a system command like operating a linux server. Conventionally, when a tester (or a maintenance person) obtains some indexes of the Windows server in batch, the tester (or the maintenance person) needs to use the indexes by using a test tool in many cases. Each time an operation is performed, the tool may be invoked by manually entering certain information and manually executing the tool. The client information is manually input for connection each time, so that time is consumed; and the client can only be processed once, so that the efficiency is low. And the executed operation content cannot be recorded, which is not beneficial to unified management.
Disclosure of Invention
Aiming at the technical problems of low efficiency and incapability of recording in the prior art, the invention provides a method, a system, a terminal and a storage medium for automatically acquiring Windows system data, so as to solve the technical problems.
In a first aspect, the present invention provides a method for automatically acquiring Windows system data, including:
connecting a target Windows system server through a remote management service;
initializing an application object for a program for acquiring data according to a data acquisition requirement of a target Windows system server, starting the program by using the application object and acquiring a basic code of the program after the program is started;
positioning a program control from the code basic information;
performing behavior analysis on the program, matching behavior key values for all program controls, and packaging all program controls matched with the behavior key values into control programs through method packaging;
and executing the control program to automatically acquire the demand data of the target Windows system server.
Further, connecting the target Windows system server through the remote management service includes:
connecting a plurality of target Windows system servers in batch;
and setting a plurality of target Windows system servers to start remote management services, wherein the target Windows system servers are all secret-free login.
Further, connecting a plurality of target Windows system servers in batch comprises:
and creating a plurality of threads and simultaneously connecting a plurality of target Windows system servers.
Further, according to the data acquisition requirement of the target Windows system server, initializing an application object for a program for acquiring data, starting the program by using the application object, and acquiring a basic code of the program after the program is started, the method comprises the following steps:
writing the program name and the program storage address of the program into the application object;
calling an application object to start the program according to the program name and the program storage address;
and establishing a desktop object, and exporting the basic code of the program by using the desktop object.
Further, positioning a program control from the code basic information includes:
analyzing the coding type of the basic code of the program;
determining a target control mark of the program according to preset control mark rules corresponding to different coding types and the coding type of the basic code of the program;
and positioning the program control from the basic code of the program according to the target control mark.
Further, performing behavior analysis on the program, matching behavior key values for the program controls, and packaging all the program controls matched with the behavior key values into control programs by method packaging, including:
classifying the program components according to the operation behaviors of executing various program controls in the Windows system, and uniformly matching behavior key values for various program controls;
and packaging all the program controls matched with the behavior key values into a control program according to the execution logic of each program control in the program.
Further, the method further comprises:
collecting system logs from an event manager of a Windows system through a remote management service, and performing exception screening on the system logs;
and if the equipment information of the target Windows system server is obtained, acquiring the target equipment information through a remote management service object supported by the Windows system.
In a second aspect, the present invention provides an automatic data acquisition system for a Windows system, including:
the remote management unit is used for connecting a target Windows system server through a remote management service;
the code acquisition unit is used for initializing an application object for a program for acquiring data according to the data acquisition requirement of a target Windows system server, starting the program by using the application object and acquiring a basic code of the program after the program is started;
the control positioning unit is used for positioning the program control from the code basic information;
the key value matching unit is used for performing behavior analysis on the program, matching behavior key values for all program controls and packaging all program controls matched with the behavior key values into control programs through method packaging;
and the data acquisition unit is used for executing the control program to automatically acquire the required data of the target Windows system server.
Further, the remote management unit is configured to:
connecting a plurality of target Windows system servers in batch;
and setting a plurality of target Windows system servers to start remote management services, wherein the target Windows system servers are all secret-free login.
Further, the remote management unit is further configured to:
and creating a plurality of threads and simultaneously connecting a plurality of target Windows system servers.
Further, the code obtaining unit is configured to:
writing the program name and the program storage address of the program into the application object;
calling an application object to start the program according to the program name and the program storage address;
and establishing a desktop object, and exporting the basic code of the program by using the desktop object.
Further, the control positioning unit is configured to:
analyzing the coding type of the basic code of the program;
determining a target control mark of the program according to preset control mark rules corresponding to different coding types and the coding type of the basic code of the program;
and positioning the program control from the basic code of the program according to the target control mark.
Further, the key value matching unit is configured to:
classifying the program components according to the operation behaviors of executing various program controls in the Windows system, and uniformly matching behavior key values for various program controls;
and packaging all the program controls matched with the behavior key values into a control program according to the execution logic of each program control in the program.
Further, the system further comprises:
the system comprises a log acquisition unit, a log processing unit and a log processing unit, wherein the log acquisition unit is used for acquiring a system log from an event manager of a Windows system through a remote management service and performing exception screening on the system log;
and the equipment acquisition unit is used for acquiring the target equipment information through the remote management service object supported by the Windows system if the equipment information of the target Windows system server is acquired.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the method for automatically acquiring the Windows system data provided by the invention is characterized in that a target Windows system server is connected through a remote management service; then, starting a data acquisition program by initializing the application object and exporting the data acquisition program after the program is started; then analyzing the code to position the program control from the code basic information; performing behavior analysis on the program, matching behavior key values for all program controls, and packaging all the program controls matched with the behavior key values into control programs through method packaging; the control program is executed to automatically acquire the required data of the target Windows system server. The invention realizes the simulation of the manual operation program by splitting the program which needs to be manually operated into the controls and matching the controls with the operation key values, can realize the automatic acquisition of the basic data or the test data of the Windows system server, can test the Windows system server in batches and greatly improves the test and maintenance efficiency of the Windows system server.
The automatic Windows system data acquisition system provided by the invention utilizes a remote management service to connect a target Windows system server through a remote management unit; then the code acquisition unit starts a data acquisition program by initializing the application object and exports the data acquisition program after the program is started; then the control positioning unit analyzes the codes and positions the program control from the code basic information; the key value matching unit matches behavior key values for all program controls by performing behavior analysis on the programs, and encapsulates all the program controls matched with the behavior key values into control programs by method encapsulation; the data acquisition unit executes the control program to automatically acquire the required data of the target Windows system server. The invention realizes the simulation of the manual operation program by splitting the program which needs to be manually operated into the controls and matching the controls with the operation key values, can realize the automatic acquisition of the basic data or the test data of the Windows system server, can test the Windows system server in batches and greatly improves the test and maintenance efficiency of the Windows system server.
The invention provides a terminal which comprises a processor running the Windows system data automatic acquisition method, realizes the simulation of a manual operation program by splitting a program needing manual operation into controls and matching operation key values for the controls, can realize the automatic acquisition of basic data or test data of a Windows system server, can test the Windows system server in batches, and greatly improves the test and maintenance efficiency of the Windows system server.
The storage medium provided by the invention stores a program for executing the automatic Windows system data acquisition method, the simulation of a manual operation program is realized by splitting the program needing manual operation into the control and matching the control with the operation key value, the automatic acquisition of basic data or test data of the Windows system server can be realized, the Windows system server can be tested in batches, and the test and maintenance efficiency of the Windows system server is greatly improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
The event manager is integrated in the operating system with Windows system as kernel and is the Microsoft Windows operating system tool. The event manager is important system management software.
A device manager is a management tool that may be used to manage devices on a computer. A "device manager" may be used to view and change device properties, update device drivers, configure device settings, and uninstall devices. The device manager provides a graphical view of the hardware installed on the computer. All devices communicate with Windows through a piece of software called a "device driver". Using the device manager, drivers for hardware devices may be installed and updated, hardware settings for these devices modified, and problems resolved.
BIOS is an abbreviation of English "Basic Input Output System", and the name of Chinese after translation is "Basic Input Output System". It is a standard firmware interface in the industry for IBM PC compatible systems. It is a set of programs solidified on a ROM chip on the internal mainboard of computer, it stores the most important basic input and output program of computer, self-checking program after starting up and system self-starting program, it can read and write the specific information set by system from CMOS. Its primary function is to provide the lowest level, most direct hardware setup and control for the computer. In addition, the BIOS provides some system parameters to the operating system. The change of system hardware is hidden by BIOS, and programs use BIOS functions rather than directly control the hardware. Modern operating systems ignore the abstraction layer provided by the BIOS and directly control the hardware components.
The main function of the Application object is to store and retrieve information that can be shared among all users, with collections, methods and events, but without attributes.
The DeskTop object (DeskTop object) may access the DeskTop top object of the windows through the deskotop object. The Desktop class is a java Desktop class, can start programs, is issued when jdk is 1.6 and is located under a java. Several functions can be supported, open file; edit the file by the edit; print printing a file; sending the mail by the mail; the browse browser opens the web site.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be an automatic data acquisition system of a Windows system.
As shown in fig. 1, the method includes:
step 110, connecting a target Windows system server through a remote management service;
step 120, initializing an application object for a program for acquiring data according to a data acquisition requirement of a target Windows system server, starting the program by using the application object and acquiring a basic code of the program after the program is started;
step 130, positioning a program control from the code basic information;
step 140, performing behavior analysis on the program, matching behavior key values for the program controls, and packaging all the program controls matched with the behavior key values into control programs through method packaging;
and 150, executing the control program to automatically acquire the required data of the target Windows system server.
In order to facilitate understanding of the present invention, the automatic Windows system data acquisition method provided by the present invention is further described below with reference to the principle of the automatic Windows system data acquisition method of the present invention and the process of automatically acquiring Windows system data in the embodiments.
Specifically, the method for automatically acquiring the Windows system data comprises the following steps:
and S1, connecting the target Windows system server through the remote management service.
Connecting a plurality of target Windows system servers in batch; and setting a plurality of target Windows system servers to start remote management services, wherein the target Windows system servers are all secret-free login. And a plurality of threads are created to simultaneously connect with a plurality of target Windows system servers.
The Linux server is connected with the Linux server through SSH service generally, and the Linux server starts the SSH service by default; however, the ssh service of the windows server is not turned on by default, so that one of the remote connection modes needs to be selected.
In the embodiment, a target windows server is connected (remotely managed) through a WinRM service, WinRM session configuration is started on a machine to be tested, and an execution machine is connected through the WinRM.
In order to further provide the test efficiency and obtain the total login information of the servers, each windows server object inherits the server class, inherits the Thread class (a run method for rewriting the Thread class), opens a plurality of Thread objects to connect a plurality of servers, and performs batch connection on the windows servers to be tested, wherein the batch connection method comprises the following steps:
(1) and (3) starting a server winrm operation:
a. performing basic configuration aiming at the winrm service: winrm quick config
b. View the winrm service holder, winrm e winrm/config/holder
c. Configuring auth for the wirm service, i.e. wirm set with/config/service/auth @ { Basic = 'true' }
Description of the execution flow:
d. configuring the encryption mode for the winrm service as allowing non-encryption: winrm set winrm/config/service @ { allowUnnecyperted = "true" }
(2) Creating multiple threads, connecting servers
Defining a server basic class, initializing according to a user name, a password and an IP of each server, creating a plurality of threads, and connecting through winrm to obtain a plurality of server connection handles.
S2, according to the data acquisition requirement of the target Windows system server, initializing an application object for the program for acquiring data, starting the program by using the application object and acquiring the basic code of the program after the program is started.
Writing the program name and the program storage address of the program into the application object; calling an application object to start the program according to the program name and the program storage address; and establishing a desktop object, and exporting the basic code of the program by using the desktop object.
An Application object is initialized in the code, a program path and a program name of an Application program for acquiring server data are transmitted, and the Application program is automatically started by utilizing the Application object. And establishing a DeskTop object, and after an application program is started, exporting the DeskTop object by using a print _ control _ identifiers method of the object to acquire a basic code of the program. After the Application program is opened through the Application object, code export is carried out according to the name of the program process.
And S3, positioning the program control from the code basic information.
Analyzing the coding type of the basic code of the program; determining a target control mark of the program according to preset control mark rules corresponding to different coding types and the coding type of the basic code of the program; and positioning the program control from the basic code of the program according to the target control mark.
When the control in the tool is accurately controlled, the unique mark of the control element in the program needs to be obtained. When positioning a control in a Windows executable exe program, firstly, the encoding language of the executable exe program needs to be known, and the corresponding analysis modes of different encoded programs are inconsistent.
Specifically, the exported code data includes visible and hidden controls of the currently opened page and information of the whole current page of the program, where each control includes a class ID, a class attribute, a class relative coordinate, a static name, a relationship between a parent class and a subclass, and a TREE-level directory of the program. When the information file in the program is obtained and the control is positioned, the positioning can be carried out through the window name, the parent ID and the control ID.
And S4, performing behavior analysis on the program, matching behavior key values for the program controls, and packaging all the program controls matched with the behavior key values into control programs through method packaging.
Classifying the program components according to the operation behaviors of executing various program controls in the Windows system, and uniformly matching behavior key values for various program controls; and packaging all the program controls matched with the behavior key values into a control program according to the execution logic of each program control in the program.
The commonly used tool controls are first classified: buttons (Button), output boxes (Input), list boxes (ListBox), check boxes (CheckBox), menus (Memu), and the like. And analyzing the manual operation behaviors of the program, and encapsulating the method aiming at each behavior. For example, if a control belongs to a button and needs to be clicked, the matching action key value of the control is click.
The specific process is as follows:
(1) and acquiring a key value corresponding table, and automatically inputting the key value by a program when a user inputs the key value on a keyboard in the control.
BACKSPACE { BACKSPACE }, { BS }, or { BKSP }
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL or DELETE { DELETE } or { DEL }
END {END}
ENTER { ENTER } or ~
ESC {ESC}
LEFT ARROW { LEFT }
RIGHT ARROW (Right ARROW) { RIGHT }
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW (Up ARROW) { UP }
(2) And embedding the matching behavior key values into corresponding program controls, and still packaging the program controls embedded with the matching behavior key values into a method program according to the execution logic (execution sequence) of each program control in the program.
Taking the control simulation with button control and input output box control as examples:
analyzing the operation of the user on the button control, wherein the main operation behaviors are as follows: single click, double click,
Left click, right click, taking right click event as an example, the implementation code is as follows (besides implementing click event, also need to implement down-shift and enter)
def right_click(self, window_name, controller, order):
"""
Right click of mouse and down shift for menu selection
Window _ name window name
A controller: name of area
order: number, the first order
"""
self.app[window_name][controller].RightClick()
for down in range(order):
SendKeys.SendKeys('{DOWN}')
time.sleep(0.5)
SendKeys.SendKeys('{ENTER}')
time.sleep(1)
Input box: when the Input inputs content, firstly, a mouse is required to be positioned to a current Input box, the current content is emptied, and then the Input is carried out.
self.app[window_name][controller].type_keys('{END}')
self.app[window_name][controller].type_keys('{BACKSPACE}' * 50)
self.app[window_name][controller].type_keys(content)
And S5, executing the control program to automatically acquire the demand data of the target Windows system server.
(1) And collecting a system log from an event manager of the Windows system through a remote management service, and performing exception screening on the system log.
And traversing each log in the event manager through the remote management service cycle, acquiring information such as the level _ value, the timestamp, the content and the like of the log, and printing the information. And when the server index is monitored to be abnormal, information is acquired and monitored.
(2) And if the equipment information of the target Windows system server is obtained, acquiring the target equipment information through a remote management service object supported by the Windows system.
The Windows device information is information provided in the Windows device manager, and since the device manager has many linkage controls, it is not beneficial to control. Therefore, the acquisition can be performed through a wmi () object supported by Windows, for example, acquiring BIOS information.
Date of use Win32_ BIOS (). Description
Motherboard model number Win32_ BIOS (). SerialNumber
Current language Win32_ BIOS (). CurrentLanguge
As shown in fig. 2, the system 200 includes:
a remote management unit 210 for connecting a target Windows system server through a remote management service;
a code obtaining unit 220, configured to initialize an application object for a program for acquiring data according to a data obtaining requirement for a target Windows system server, start the program using the application object, and obtain a basic code of the program after the program is started;
a control positioning unit 230, configured to position a program control from the code basic information;
a key value matching unit 240, configured to perform behavior analysis on the program, match behavior key values for the program controls, and encapsulate all the program controls that match the behavior key values as control programs by means of method encapsulation;
and the data acquisition unit 250 is used for executing the control program to automatically acquire the demand data of the target Windows system server.
Optionally, as an embodiment of the present invention, the remote management unit is configured to:
connecting a plurality of target Windows system servers in batch;
and setting a plurality of target Windows system servers to start remote management services, wherein the target Windows system servers are all secret-free login.
Optionally, as an embodiment of the present invention, the remote management unit is further configured to:
and creating a plurality of threads and simultaneously connecting a plurality of target Windows system servers.
Optionally, as an embodiment of the present invention, the code obtaining unit is configured to:
writing the program name and the program storage address of the program into the application object;
calling an application object to start the program according to the program name and the program storage address;
and establishing a desktop object, and exporting the basic code of the program by using the desktop object.
Optionally, as an embodiment of the present invention, the control positioning unit is configured to:
analyzing the coding type of the basic code of the program;
determining a target control mark of the program according to preset control mark rules corresponding to different coding types and the coding type of the basic code of the program;
and positioning the program control from the basic code of the program according to the target control mark.
Optionally, as an embodiment of the present invention, the key value matching unit is configured to:
classifying the program components according to the operation behaviors of executing various program controls in the Windows system, and uniformly matching behavior key values for various program controls;
and packaging all the program controls matched with the behavior key values into a control program according to the execution logic of each program control in the program.
Optionally, as an embodiment of the present invention, the system further includes:
the system comprises a log acquisition unit, a log processing unit and a log processing unit, wherein the log acquisition unit is used for acquiring a system log from an event manager of a Windows system through a remote management service and performing exception screening on the system log;
and the equipment acquisition unit is used for acquiring the target equipment information through the remote management service object supported by the Windows system if the equipment information of the target Windows system server is acquired.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the method for automatically acquiring Windows system data according to the embodiment of the present invention.
Among them, the terminal 300 may include: a processor 310, a memory 320, and a communication unit 330. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 320 may be used for storing instructions executed by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 310 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 330, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention connects the target Windows system server through the remote management service; then, starting a data acquisition program by initializing the application object and exporting the data acquisition program after the program is started; then analyzing the code to position the program control from the code basic information; performing behavior analysis on the program, matching behavior key values for all program controls, and packaging all the program controls matched with the behavior key values into control programs through method packaging; the control program is executed to automatically acquire the required data of the target Windows system server. The method and the device realize the simulation of the manual operation program by splitting the program needing manual operation into the controls and matching the controls with the operation key values, can realize the automatic acquisition of basic data or test data of the Windows system server, can test the Windows system servers in batches, and greatly improve the test and maintenance efficiency of the Windows system server.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A Windows system user operation simulation method is characterized by comprising the following steps:
connecting a target Windows system server through a remote management service;
initializing an application object for a program for acquiring data according to a data acquisition requirement of a target Windows system server, starting the program by using the application object and acquiring a basic code of the program after the program is started;
positioning a program control from the code basic information;
performing behavior analysis on the program, matching behavior key values for all program controls, and packaging all program controls matched with the behavior key values into control programs through method packaging;
and executing the control program to automatically acquire the demand data of the target Windows system server.
2. The method of claim 1, wherein connecting to the target Windows system server via the remote management service comprises:
connecting a plurality of target Windows system servers in batch;
and setting a plurality of target Windows system servers to start remote management services, wherein the target Windows system servers are all secret-free login.
3. The method of claim 2, wherein connecting multiple target Windows system servers in bulk comprises:
and creating a plurality of threads and simultaneously connecting a plurality of target Windows system servers.
4. The method of claim 1, wherein initializing an application object for a program for collecting data according to a data acquisition requirement of a target Windows system server, starting the program using the application object and acquiring a basic code of the program after the program is started comprises:
writing the program name and the program storage address of the program into the application object;
calling an application object to start the program according to the program name and the program storage address;
and establishing a desktop object, and exporting the basic code of the program by using the desktop object.
5. The method of claim 1, wherein locating a program control from the code base information comprises:
analyzing the coding type of the basic code of the program;
determining a target control mark of the program according to preset control mark rules corresponding to different coding types and the coding type of the basic code of the program;
and positioning the program control from the basic code of the program according to the target control mark.
6. The method of claim 1, wherein performing behavior analysis on the program, matching behavior key values for each program control, and encapsulating all program controls matching behavior key values into control programs by method encapsulation, comprises:
classifying the program components according to the operation behaviors of executing various program controls in the Windows system, and uniformly matching behavior key values for various program controls;
and packaging all the program controls matched with the behavior key values into a control program according to the execution logic of each program control in the program.
7. The method of claim 1, further comprising:
collecting system logs from an event manager of a Windows system through a remote management service, and performing exception screening on the system logs;
and if the equipment information of the target Windows system server is obtained, acquiring the target equipment information through a remote management service object supported by the Windows system.
8. A Windows system user operation simulation system, comprising:
the remote management unit is used for connecting a target Windows system server through a remote management service;
the code acquisition unit is used for initializing an application object for a program for acquiring data according to the data acquisition requirement of a target Windows system server, starting the program by using the application object and acquiring a basic code of the program after the program is started;
the control positioning unit is used for positioning the program control from the code basic information;
the key value matching unit is used for performing behavior analysis on the program, matching behavior key values for all program controls and packaging all program controls matched with the behavior key values into control programs through method packaging;
and the data acquisition unit is used for executing the control program to automatically acquire the required data of the target Windows system server.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110940101.7A 2021-08-17 2021-08-17 Windows system user operation simulation method, system, terminal and storage medium Pending CN113395360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110940101.7A CN113395360A (en) 2021-08-17 2021-08-17 Windows system user operation simulation method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110940101.7A CN113395360A (en) 2021-08-17 2021-08-17 Windows system user operation simulation method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113395360A true CN113395360A (en) 2021-09-14

Family

ID=77622862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110940101.7A Pending CN113395360A (en) 2021-08-17 2021-08-17 Windows system user operation simulation method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113395360A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280026A (en) * 2018-01-23 2018-07-13 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN109144856A (en) * 2018-07-27 2019-01-04 北京皮尔布莱尼软件有限公司 A kind of UI automated testing method calculates equipment and storage medium
CN109783388A (en) * 2019-01-16 2019-05-21 北京金山云网络技术有限公司 UI automated testing method, device and electronic equipment
CN110297752A (en) * 2018-03-23 2019-10-01 华为软件技术有限公司 Acquisition methods and device, automatization test system, the storage medium of control element
WO2020006415A1 (en) * 2018-06-28 2020-01-02 Crowdstrike, Inc. Analysis of malware
CN112328488A (en) * 2020-11-09 2021-02-05 深圳证券通信有限公司 Control object identification method for UI (user interface) automatic test
CN112346946A (en) * 2020-11-13 2021-02-09 西安交通大学 User software operation behavior monitoring method and system based on control positioning
CN112732576A (en) * 2021-01-08 2021-04-30 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN113094028A (en) * 2021-04-29 2021-07-09 成都星云智联科技有限公司 Windows desktop program development framework, method and related components
CN113094248A (en) * 2021-04-28 2021-07-09 深圳市网旭科技有限公司 User behavior data analysis method and device, electronic equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280026A (en) * 2018-01-23 2018-07-13 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
US20200409830A1 (en) * 2018-01-23 2020-12-31 Netease (Hangzhou) Network Co.,Ltd. Automated testing method and apparatus, storage medium and electronic device
CN110297752A (en) * 2018-03-23 2019-10-01 华为软件技术有限公司 Acquisition methods and device, automatization test system, the storage medium of control element
WO2020006415A1 (en) * 2018-06-28 2020-01-02 Crowdstrike, Inc. Analysis of malware
CN109144856A (en) * 2018-07-27 2019-01-04 北京皮尔布莱尼软件有限公司 A kind of UI automated testing method calculates equipment and storage medium
CN109783388A (en) * 2019-01-16 2019-05-21 北京金山云网络技术有限公司 UI automated testing method, device and electronic equipment
CN112328488A (en) * 2020-11-09 2021-02-05 深圳证券通信有限公司 Control object identification method for UI (user interface) automatic test
CN112346946A (en) * 2020-11-13 2021-02-09 西安交通大学 User software operation behavior monitoring method and system based on control positioning
CN112732576A (en) * 2021-01-08 2021-04-30 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN113094248A (en) * 2021-04-28 2021-07-09 深圳市网旭科技有限公司 User behavior data analysis method and device, electronic equipment and medium
CN113094028A (en) * 2021-04-29 2021-07-09 成都星云智联科技有限公司 Windows desktop program development framework, method and related components

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
_JOHNNY_: "Python结合Pywinauto进行Windows UI自动化", 《CSDN》 *
翁省辉等: "Pywinauto在Windows Twain Driver自动化测试中的应用研究", 《微型机与应用》 *

Similar Documents

Publication Publication Date Title
US7398469B2 (en) Automated test system for testing an application running in a windows-based environment and related methods
US7398514B2 (en) Test automation stack layering
US9424154B2 (en) Method of and system for computer system state checks
US8719784B2 (en) Assigning runtime artifacts to software components
Carter et al. Curiousdroid: automated user interface interaction for android application analysis sandboxes
US5935251A (en) Method and apparatus expedited log-on to an application program
US8312417B2 (en) Using dynamic call graphs for creating state machines
WO2017040145A1 (en) Web-based programming environment for embedded devices
CN107678949B (en) Automatic testing method for realizing different communication modes of embedded equipment
EP1236108A1 (en) A system and method for testing and validating devices having an embedded operating system
WO2017020459A1 (en) Method and apparatus for configuring plugin package for host
CN109857520B (en) Semantic reconstruction improvement method and system in virtual machine introspection
CN115062309A (en) Vulnerability mining method based on equipment firmware simulation under novel power system and storage medium
CN116166525A (en) Method and device for generating test script
US20170041188A1 (en) Differential staging of devices in bulk enrollment
CN113190279A (en) Pre-boot function control method, system and medium
CN110597496B (en) Method and device for acquiring bytecode file of application program
CN113395360A (en) Windows system user operation simulation method, system, terminal and storage medium
US9201591B1 (en) Automated coverage monitoring of mobile applications
CN110007932A (en) A method of based on local area network big data processing system automatic deployment
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN102647419A (en) Security policy online detection system facing to terminal computers
CN113064640A (en) BIOS option verification method, system and medium
CN111858302A (en) Method and device for testing small program, electronic equipment and storage medium
CN109446014A (en) A kind of BMC test Information Authentication method, apparatus, terminal and storage 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210914

RJ01 Rejection of invention patent application after publication