CN114461529A - Automatic testing method and device for password control, electronic equipment and storage medium - Google Patents

Automatic testing method and device for password control, electronic equipment and storage medium Download PDF

Info

Publication number
CN114461529A
CN114461529A CN202210121530.6A CN202210121530A CN114461529A CN 114461529 A CN114461529 A CN 114461529A CN 202210121530 A CN202210121530 A CN 202210121530A CN 114461529 A CN114461529 A CN 114461529A
Authority
CN
China
Prior art keywords
current
test step
control
atomic test
password
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
CN202210121530.6A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202210121530.6A priority Critical patent/CN114461529A/en
Publication of CN114461529A publication Critical patent/CN114461529A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/72Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in cryptographic circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The embodiment of the invention discloses an automatic testing method and device of a password control, electronic equipment and a storage medium. The method comprises the following steps: determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step; if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test; and inquiring the state of the current atomic test step and determining whether to start the next atomic test step. According to the technical scheme of the embodiment of the invention, when the password control is processed, the password control and other control types are unified and standardized, and the system automatically implements different assignment modes on different controls according to factors such as the frame type, the object positioning information and the like, so that the problem of automatic test of the password control is solved, and the workload of a tester for maintaining cases is reduced to a greater extent.

Description

Automatic testing method and device for password control, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of automatic testing, in particular to a method and a device for automatically testing a password control, electronic equipment and a storage medium.
Background
With the rapid development and wide application of the internet, the problem of network information security is increasingly prominent, and in order to improve the security protection level of an application system, a plurality of financial systems use ActiveX to package password controls. For the password control, common assignment operation usually fails, assignment still cannot be effective after the readonly attribute of the control is forcibly changed, and common keyboard simulating methods (such as Type, SendKeys and the like) can be discovered and intercepted by ActiveX, so that automatic tests related to the control are difficult to develop smoothly.
Therefore, how to solve the problem of automated testing of ActiveX-packaged password controls is a technical problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides an automatic testing method and device of a password control, electronic equipment and a storage medium, which automatically implement different assignment modes on different control types, solve the problem of automatic testing of the password control and greatly reduce the workload of a tester for maintaining cases.
In a first aspect, an embodiment of the present invention provides an automated testing method for a password control, including:
determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step;
if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test;
and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
In a second aspect, an embodiment of the present invention further provides an automatic testing apparatus for a password control, including:
the control type determining module of the current atomic test step is used for determining the control type of the current atomic test step according to the positioning information of the atomic test step;
the current password control assignment operation module is used for assigning the current password control by adopting password control execution logic to realize automatic test if the control type of the current atomic test step is the password control;
and the next atomic test step starting module is used for inquiring the state of the current atomic test step and determining whether to start the next atomic test step.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method for automated testing of cryptographic controls according to any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for automatically testing a password control according to any embodiment of the present invention.
The embodiment of the invention provides an automatic testing method, device, electronic equipment and storage medium of a password control, wherein the type of the control to which the current atomic testing step belongs is determined according to the positioning information of the atomic testing step; if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test; and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step. According to the technical scheme of the embodiment of the invention, when the password control is processed, the password control and other control types are unified and standardized, and the system automatically implements different assignment modes on different controls according to factors such as the frame type, the object positioning information and the like, so that the problem of automatic test of the password control is solved, and the workload of a tester for maintaining cases is reduced to a greater extent.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1A is a flowchart of an automated testing method for a password control according to an embodiment of the present invention;
FIG. 1B is a schematic diagram of an automated test case structure provided in an embodiment of the present invention;
FIG. 1C is a flowchart of a method for handling password controls for different automated test tools, according to an embodiment of the present invention;
fig. 2A is a flowchart of an automated testing method for a password control according to a second embodiment of the present invention;
fig. 2B is a flowchart of a method for determining whether an atomic test procedure is a password control according to an embodiment of the present invention;
FIG. 2C is a diagram illustrating automated test object positioning information provided in an embodiment of the present invention;
fig. 3A is a flowchart of an automated testing method for a password control according to a third embodiment of the present invention;
fig. 3B is a flowchart of a processing method for automated testing of password controls according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an automatic testing apparatus for password controls according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations (or steps) can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
With the deep advance of digital transformation, the iteration speed of products is continuously improved, and the use scenes of the interface automatic test are continuously enriched. At present, many financial customer systems adopt security measures of password controls, so that the security protection level of the system is effectively improved, meanwhile, the assignment operation of an automatic testing tool on the password controls is also prevented, a common keyboard simulating method is invalid, and if the password controls are annotated in the testing process, the risk that the testing is normal and the production is abnormal after the password controls are added exists. For the interface-level test case password control execution method, the currently existing technical solutions mainly include the following two methods:
bypassing, allowing developers to annotate the password control when packaging the application, or replacing the password control with an unencrypted control. However, the method needs to change codes, so that the risk of abnormal production after the password control is added when the test is normal exists, and the risk of releasing the test version to the production due to human misoperation also exists.
Forced assignment, for the password control shielding assignment operation of the automatic test tool, the generally adopted forced assignment method comprises the following steps:
(1) and inputting the password at other places where the input is allowed, and copying the password into the password control by using the copying function. If the password control is developed and the paste function is forbidden, the method cannot be effective.
(2) And (4) positioning the focus in the password control, and inputting the password by using a common simulated keyboard method. The password control is intercepted after being packaged by ActiveX and cannot take effect.
Therefore, the embodiment of the invention provides an automatic testing method of a password control.
Example one
Fig. 1A is a flowchart of an automated testing method for a password control according to an embodiment of the present invention, where the present embodiment is applicable to a situation of performing an automated test on a password control, and the method of the present embodiment may be executed by an automated testing apparatus for a password control, and the apparatus may be implemented in a hardware and/or software manner. The device can be configured in a server for the automated testing of the password control. The method specifically comprises the following steps:
and S110, determining the control type of the current atomic test step according to the positioning information of the atomic test step.
The atomic test step may refer to a minimum operation step in the test case, and the test case is split into at least two atomic test steps. The atomic test procedure components include, but are not limited to, atomic objects, modes of operation, and input data. Fig. 1B is a schematic structural diagram of an automated test case provided in an embodiment of the present invention, and referring to fig. 1B, an atomic test step 1 and an atomic test step 2 form a test case, and a user name and a password are input in the test case to complete login of a user.
The positioning information may refer to attribute information according to an atomic test procedure, such as element attribute information of an atomic object, a frame structure, and the like. And determining the positioning information of the atomic test step according to the atomic object information subjected to the automatic test at the current moment, matching the positioning information of the atomic test step with the packaging format of the atomic object, and determining the control type of the current atomic test step.
The system realizes a unified packaging method for different automatic testing tools such as QTP, Selenium and the like, and when a testing case executes an atomic testing step, whether an object of the current atomic testing step is a password control is judged. Fig. 1C is a flowchart of a password control processing method for different automated testing tools according to an embodiment of the present invention, and referring to fig. 1C, if an object of the current atomic testing step is a password control, the password control is executed according to a password control execution method, and if the object is a control of another type, case steps are executed on the automated testing tools by respectively calling different control execution methods.
And S120, if the type of the control to which the current atomic test step belongs is a password control, assigning the current password control by using a password control execution logic so as to realize automatic test.
The password control can be a program which is written by each website according to needs, the password control plays a role when the user logs in the website, the account password is prevented from being stolen by a Trojan program or a virus by encrypting key data, and the Trojan can be effectively prevented from intercepting keyboard records. For example, the internet bank and the internet transaction platform of each bank are easy to be enjoyed by lawless persons, so that most banks use the password control to protect the information such as the account password of the customer in the website where the customer suffers economic loss.
The password control execution logic may refer to that the password control is subjected to assignment operation by using a corresponding password control execution method. For example, if the current atomic test step is a password control, splitting the test input password of the current atomic test step into at least two single characters, and matching the at least two single characters with corresponding keyboard scanning codes; and calling a keyboard interface according to the keyboard scanning code to perform assignment operation so as to realize automatic testing.
S130, inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
The querying of the state of the current atomic test step may refer to querying whether the current atomic test step is executed completely, and if the current atomic test step is executed completely, starting the next atomic test step, determining whether the next atomic test step is a password control, and querying the state of the next atomic test step.
The embodiment of the invention provides an automatic testing method of a password control, which determines the type of the control to which the current atomic testing step belongs according to the positioning information of the atomic testing step; if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test; and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step. By adopting the technical scheme of the embodiment of the invention, whether the current atomic test step is the password control is judged according to the positioning information of the atomic test step, and when the password control is processed, the system automatically carries out a corresponding assignment mode on the password control according to factors such as the frame type, the positioning information of the atomic object and the like; and starting the next atomic test step after the current atomic test step is completed, so that the problem of automatic test of the password control is solved, and the workload of a tester for maintaining cases is reduced to a greater extent.
Example two
Fig. 2A is a flowchart of an automated testing method for a password control according to a second embodiment of the present invention. Embodiments of the present invention are further optimized on the basis of the above-mentioned embodiments, and the embodiments of the present invention may be combined with various alternatives in one or more of the above-mentioned embodiments. As shown in fig. 2A, the automated testing method for a password control provided in the embodiment of the present invention may include the following steps:
s210, according to the atom object information of the automatic test at the current moment, determining the positioning information of the current atom test step.
Fig. 2B is a flowchart of a method for determining whether an atomic test step is a password control according to an embodiment of the present invention, and referring to fig. 2B, when a test case is executed, the case step is analyzed into at least two atomic test steps, a single atomic test step is polled, and whether the current atomic test step is a password control is determined; judging whether the current atomic test step is a password control or not, and carrying out assignment operation on the atomic test step of the password control by adopting a password control execution method; assigning values to other types of password controls by adopting other types of control operation methods; until the last atomic test step completes the assignment operation.
Optionally, when the test case is executed, the atomic test steps are sequentially analyzed, and the execution method of the current atomic test step is determined according to factors such as different frame types and object positioning information of the atomic test steps. For example, in the current atomic test step, uniform packaging is performed by using ActiveX, and automatic testing is performed by using a QTP automatic testing tool, which refers to step 2 (POB/login. password + input + ×) in fig. 1B, QTP positioning information of the object is regularly matched. Fig. 2C is a schematic diagram of automatic test object location information according to an embodiment of the present invention, and referring to fig. 2C, it is checked whether QTP location information of a current atomic test step is ActiveX (·). Wherein, the positioning information displayed by different packaging formats and different automatic testing tools is different.
And S220, matching the positioning information of the current atomic test step with the current packaging format, and determining the control type of the current atomic test step.
Wherein the control type includes, but is not limited to, password controls and other types of controls.
Optionally, the matching the positioning information of the current atomic test step with the current packaging format to determine the control type to which the current atomic test step belongs includes:
if the positioning information of the current atomic test step is successfully matched with the current packaging format, determining that the type of the control to which the current atomic test step belongs is a password control;
and if the positioning information of the current atomic test step is unsuccessfully matched with the current packaging format, determining that the control type of the current atomic test step is other types of controls.
Referring to step 2 (POB/login. password + input +. star) of fig. 1B, password information of the user is input, and the positioning information of the object is regularly matched. Referring to fig. 2C, it is checked whether the positioning information of the current atomic test step is ActiveX (·.). WinEditor (·), and if matching is successful, it is determined that the current atomic test step is a password control, and a password control execution logic is called to assign a value; if the matching is not successful, judging that the current atomic test step is the control of other types.
According to the technical scheme of the embodiment of the invention, a tester can call the password control execution method to assign the control only by changing the positioning information of the control into the ActiveX control without modifying the step information of the case, so that the coupling degree of case design is reduced to the maximum extent, and the maintenance cost of the case is reduced.
And S230, if the type of the control to which the current atomic test step belongs is a password control, assigning the current password control by using password control execution logic so as to realize automatic test.
S240, inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
The embodiment of the invention provides an automatic test method of a password control, which comprises the steps of determining positioning information of a current atomic test step according to atomic object information subjected to automatic test at the current moment; matching the positioning information of the current atomic test step with the current packaging format, and determining the control type of the current atomic test step; if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test; and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step. By adopting the technical scheme of the embodiment of the invention, the test case step is analyzed into at least two atom test steps, a single atom test step is polled, and whether the current atom test step is a password control or not is judged; and judging whether the current atomic test step is a password control, and performing assignment operation on the atomic test step of the password control by adopting a password control execution method. A tester can call the password control execution method to assign the control only by changing the positioning information of the control into an ActiveX control without modifying the step information of the case, so that the coupling degree of case design is reduced to the maximum extent, and the maintenance cost of the case is reduced.
EXAMPLE III
Fig. 3A is a flowchart of an automated testing method for a password control according to a third embodiment of the present invention. Embodiments of the present invention are further optimized on the basis of the above-mentioned embodiments, and the embodiments of the present invention may be combined with various alternatives in one or more of the above-mentioned embodiments. As shown in fig. 3A, the automated testing method for password controls provided in the embodiment of the present invention may include the following steps:
s310, uniformly packaging different automatic test tools.
And S320, determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step.
S330, if the type of the control to which the current atomic test step belongs is a password control, assigning the current password control by using password control execution logic so as to realize automatic test.
Optionally, the performing, by using the password control execution logic, an assignment operation on the current password control to implement an automated test includes:
changing the current automatic test system into a test mode;
splitting a test input password into at least two single characters, and matching the at least two single characters with corresponding keyboard scanning codes;
and calling a keyboard interface according to the keyboard scanning code to perform assignment operation so as to realize automatic testing.
Optionally, the invoking a keyboard interface according to the keyboard scan code to perform assignment operation to implement an automated test includes:
matching the single character with a corresponding virtual key code, and mapping the virtual key code into a keyboard scanning code according to an operating system file;
calling a keyboard interface, and writing the keyboard scanning code for assignment operation;
and inquiring the current single character state, and determining whether to perform assignment operation for the next single character.
Referring to fig. 3B, when a password control is executed, firstly converting a system into a test mode, automatically splitting the password into single characters by a background, matching virtual key codes of the characters, then mapping the virtual key codes into keyboard scan codes according to a user32.dll file in a Windows operating system, calling a keyboard interface, and writing the keyboard scan codes corresponding to the characters; until the last single character call is completed. The input method of the password control in the execution process is invisible to the user.
S340, inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
The embodiment of the invention provides an automatic test method of a password control, which uniformly packages different automatic test tools; determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step; if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test; and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step. By adopting the technical scheme of the embodiment of the invention, the atomic test step of the password control is divided into at least two single characters, the single characters are polled, the virtual key codes of the characters are matched, the virtual key codes are mapped into the keyboard scanning codes according to the operating system file, the keyboard interface is called, the keyboard scanning codes are written in until the last character is written into the keyboard scanning codes to finish the execution of the password control. When the tester uses the device, the tester can directly use the recording tool to generate the password without distinguishing whether the input box is a password control. The method and the device enable testers to conveniently and efficiently carry out case design, do not need manual case compiling steps and manual object positioning information acquisition, and greatly reduce workload. The password control automatic testing method based on the operating system event response provided by the embodiment of the invention can be normally executed for controls which cannot be assigned, cannot be input by a keyboard simulating method, are forbidden to be pasted and the like.
Example four
Fig. 4 is a schematic structural diagram of an automatic testing apparatus for a password control according to a fourth embodiment of the present invention, where the apparatus includes: a current atomic test step control type determination module 410, a current password control assignment operation module 420, and a next atomic test step initiation module 430. Wherein:
a control type determining module 410 for determining the control type of the current atomic test step according to the positioning information of the atomic test step;
a current password control assignment operation module 420, configured to perform assignment operation on a current password control by using a password control execution logic if the control type of the current atomic test step is a password control, so as to implement an automated test;
the next atomic test step starting module 430 is configured to query the current atomic test step status and determine whether to start the next atomic test step.
On the basis of the foregoing embodiment, optionally, the control type determining module in the current atomic test step includes:
according to the atom object information of the automatic test at the current moment, determining the positioning information of the current atom test step;
and matching the positioning information of the current atomic test step with the current packaging format, and determining the control type of the current atomic test step.
On the basis of the foregoing embodiment, optionally, the control type determining module in the current atomic test step further includes:
if the positioning information of the current atomic test step is successfully matched with the current packaging format, determining that the type of the control to which the current atomic test step belongs is a password control;
and if the positioning information of the current atomic test step is unsuccessfully matched with the current packaging format, determining that the control type of the current atomic test step is other types of controls.
On the basis of the foregoing embodiment, optionally, the current password control assignment operation module includes:
changing the current automatic test system into a test mode;
splitting a test input password into at least two single characters, and matching the at least two single characters with corresponding keyboard scanning codes;
and calling a keyboard interface according to the keyboard scanning code to perform assignment operation so as to realize automatic testing.
On the basis of the foregoing embodiment, optionally, the current password control assignment operation module includes:
matching the single character with a corresponding virtual key code, and mapping the virtual key code into a keyboard scanning code according to an operating system file;
calling a keyboard interface, and writing the keyboard scanning code for assignment operation;
and inquiring the current single character state, and determining whether to perform assignment operation for the next single character.
On the basis of the foregoing embodiment, optionally, the apparatus further includes:
and the unified packaging module is used for uniformly packaging different automatic test tools.
The device can execute the automatic test method of the password control provided by any embodiment of the invention, and has the corresponding functional module and the beneficial effect of executing the automatic test method of the password control.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application. The embodiment of the application provides electronic equipment, and an interaction device for automatic testing of password controls provided by the embodiment of the application can be integrated in the electronic equipment. As shown in fig. 5, the present embodiment provides an electronic device 500, which includes: one or more processors 520; the storage 510 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the method for automatically testing a password control provided in an embodiment of the present application, the method includes:
determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step;
if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test;
and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
Of course, those skilled in the art can understand that the processor 520 also implements the technical solution of the method for automatically testing a password control provided in any embodiment of the present application.
The electronic device 500 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the electronic device 500 includes a processor 520, a storage 510, an input 530, and an output 540; the number of the processors 520 in the electronic device may be one or more, and one processor 520 is taken as an example in fig. 5; the processor 520, the storage 510, the input device 530, and the output device 540 in the electronic apparatus may be connected by a bus or other means, and are exemplified by a bus 550 in fig. 5.
The storage device 510 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and module units, such as program instructions corresponding to the automated testing method for password controls in the embodiments of the present application.
The storage device 510 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 510 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 510 may further include memory located remotely from processor 520, which may be connected via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numbers, character information, or voice information, and to generate key signal inputs related to user settings and function control of the electronic apparatus. Output device 540 may include a display screen, speakers, and other electronic equipment.
The electronic equipment provided by the embodiment of the application can effectively solve the problem of automatic testing of the password control and greatly reduce the workload of the tester for maintaining the cases.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for automated testing of a password control, the method including:
determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step;
if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test;
and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in some detail by the above embodiments, the invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the invention, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. An automated testing method for a password control, the method comprising:
determining the type of the control to which the current atomic test step belongs according to the positioning information of the atomic test step;
if the type of the control to which the current atomic test step belongs is a password control, performing assignment operation on the current password control by adopting password control execution logic to realize automatic test;
and inquiring the state of the current atomic test step, and determining whether to start the next atomic test step.
2. The method of claim 1, wherein determining the control type to which the current atomic test procedure belongs according to the positioning information of the atomic test procedure comprises:
according to the atom object information of the automatic test at the current moment, determining the positioning information of the current atom test step;
and matching the positioning information of the current atomic test step with the current packaging format, and determining the control type of the current atomic test step.
3. The method according to claim 2, wherein the matching the current atomic test step positioning information with the current packaging format to determine the control type to which the current atomic test step belongs comprises:
if the positioning information of the current atomic test step is successfully matched with the current packaging format, determining that the type of the control to which the current atomic test step belongs is a password control;
and if the positioning information of the current atomic test step is unsuccessfully matched with the current packaging format, determining that the control type of the current atomic test step is other types of controls.
4. The method of claim 1, wherein the performing, with the password control execution logic, an assignment operation on the current password control to implement an automated test comprises:
changing the current automatic test system into a test mode;
splitting a test input password into at least two single characters, and matching the at least two single characters with corresponding keyboard scanning codes;
and calling a keyboard interface according to the keyboard scanning code to perform assignment operation so as to realize automatic testing.
5. The method of claim 4, wherein invoking a keyboard interface to perform assignment operations according to the keyboard scan code to implement automated testing comprises:
matching the single character with a corresponding virtual key code, and mapping the virtual key code into a keyboard scanning code according to an operating system file;
calling a keyboard interface, and writing the keyboard scanning code for assignment operation;
and inquiring the current single character state, and determining whether to perform assignment operation for the next single character.
6. The method of claim 1, before determining the control type to which the current atomic test procedure belongs according to the positioning information of the atomic test procedure, further comprising: and uniformly packaging different automatic test tools.
7. An apparatus for automated testing of cryptographic controls, the apparatus comprising:
the control type determining module of the current atomic test step is used for determining the control type of the current atomic test step according to the positioning information of the atomic test step;
the current password control assignment operation module is used for assigning the current password control by adopting password control execution logic to realize automatic test if the control type of the current atomic test step is the password control;
and the next atomic test step starting module is used for inquiring the state of the current atomic test step and determining whether to start the next atomic test step.
8. The apparatus of claim 7, wherein the current atomic test step control type determination module comprises:
according to the atom object information of the automatic test at the current moment, determining the positioning information of the current atom test step;
and matching the positioning information of the current atomic test step with the current packaging format, and determining the control type of the current atomic test step.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the automated testing method for cryptographic controls of any of claims 1-6.
10. A storage medium containing computer-executable instructions for performing a method for automated testing of a cryptographic control according to any of claims 1-6 when executed by a computer processor.
CN202210121530.6A 2022-02-09 2022-02-09 Automatic testing method and device for password control, electronic equipment and storage medium Pending CN114461529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210121530.6A CN114461529A (en) 2022-02-09 2022-02-09 Automatic testing method and device for password control, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210121530.6A CN114461529A (en) 2022-02-09 2022-02-09 Automatic testing method and device for password control, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114461529A true CN114461529A (en) 2022-05-10

Family

ID=81413285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210121530.6A Pending CN114461529A (en) 2022-02-09 2022-02-09 Automatic testing method and device for password control, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114461529A (en)

Similar Documents

Publication Publication Date Title
CN107122289A (en) The method of system regression test, apparatus and system
CN106649084A (en) Function call information obtaining method and apparatus, and test device
CN107092535B (en) Method and apparatus for data storage of test interface
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN112363753A (en) Data verification method and device, electronic equipment and storage medium
CN111666328A (en) Method and device for displaying visual chart in real time, computer equipment and storage medium
CN110888791A (en) Log processing method, device, equipment and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN114116078A (en) Application data processing method, device, equipment and medium based on micro front end
CN112445860B (en) Method and device for processing distributed transaction
CN110045952B (en) Code calling method and device
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
CN114461529A (en) Automatic testing method and device for password control, electronic equipment and storage medium
CN107451435B (en) Management and control method, management and control machine and management and control system of hardware encryption machine
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN114969175A (en) Method for butting insurance platform and external system and related equipment
CN112181816A (en) Interface testing method and device based on scene, computer equipment and medium
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN112783903A (en) Method and device for generating update log
CN114584616B (en) Message pushing method and device, electronic equipment and storage medium
CN113127051B (en) Application resource packaging process monitoring method, device, equipment and medium
CN113900895B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN111177097B (en) Log collection method, device and equipment and computer readable 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