CN114676067B - Parameterization processing method and device for test script - Google Patents

Parameterization processing method and device for test script Download PDF

Info

Publication number
CN114676067B
CN114676067B CN202210579027.5A CN202210579027A CN114676067B CN 114676067 B CN114676067 B CN 114676067B CN 202210579027 A CN202210579027 A CN 202210579027A CN 114676067 B CN114676067 B CN 114676067B
Authority
CN
China
Prior art keywords
test
target
parameterized
login
request
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.)
Active
Application number
CN202210579027.5A
Other languages
Chinese (zh)
Other versions
CN114676067A (en
Inventor
梁俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Wind Gather Intelligence Technology Co ltd
Original Assignee
Wuhan Wind Gather Intelligence Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Wind Gather Intelligence Technology Co ltd filed Critical Wuhan Wind Gather Intelligence Technology Co ltd
Priority to CN202210579027.5A priority Critical patent/CN114676067B/en
Publication of CN114676067A publication Critical patent/CN114676067A/en
Application granted granted Critical
Publication of CN114676067B publication Critical patent/CN114676067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/107License processing; Key processing
    • G06F21/1078Logging; Metering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a parameterization processing method and a parameterization processing device for a test script, which are used for aiming at a target processing request of a tested system which cannot respond to repeated request contents, and enabling the target processing request to execute normal system test and the system test to have the characteristic of dynamic change through parameterization processing. The method comprises the following steps: the test equipment detects whether a target processing request that the target system cannot respond to the repeated request content exists in the test script; if the target processing requests exist, the test equipment takes the target processing requests as parameterized objects, and parameterizes the target processing requests, so that request contents carried in the requests are different data with dynamic change characteristics when the target processing requests are sent to a target system to execute system test; monitoring response results of a target system to different processing requests by the test equipment in a test process; and the test equipment determines the function and performance test result of the target system based on the response result of the target system to different processing requests.

Description

Parameterization processing method and device for test script
Technical Field
The application relates to the field of testing, in particular to a parameterization processing method and device for a test script.
Background
Before being marketed and sold to users, the related application services need to be tested inside the company to test whether they can provide normal application functions and reflected specific functional effects.
In a specific operation, if the application program related to the application service belongs to a network service type, the application program is generally configured on a server, which may also be referred to as a system, for the user equipment to access. In the process of testing the relevant application service, the corresponding system test can be understood as being initiated to the system.
In the existing research process of the related art, the inventor finds that when the automatic test of the system is performed through the test script, test exception exists on some functional nodes, so that the test efficiency and the test quality are influenced.
Disclosure of Invention
The application provides a parameterization processing method and device of a test script, which are used for aiming at a target processing request that a target system cannot respond to repeated request contents, and enabling the target processing request to execute normal system test and the system test to have the characteristic of dynamic change through parameterization processing, so that the test efficiency and the test quality are guaranteed.
In a first aspect, the present application provides a parameterization processing method for a test script, including:
after determining a test task for a target system, the test equipment acquires a test script of the test task, wherein the test script is used for initiating a test to the target system according to a preset test rule;
the test equipment detects whether a target processing request that the target system cannot respond to the repeated request content exists in the test script;
if the target processing request exists, the test equipment takes the target processing request as a parameterization object, and parameterizes the target processing request, so that request contents carried in the request are different data with dynamic change characteristics when the target processing requests are sent to a target system to execute system test, and the same processing request with repeated contents is prevented from being sent to the target system;
in the testing process, the testing equipment initiates different processing requests including target processing requests to a target system based on the testing script and monitors the response results of the target system to the different processing requests;
and the test equipment determines the function and performance test result of the target system based on the response result of the target system to different processing requests.
With reference to the first aspect of the present application, in a first possible implementation manner of the first aspect of the present application, the target processing request is specifically a preset user login request carrying a login account and a login password.
With reference to the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner of the first aspect of the present application, the performing, by the test device, parameterization on the target processing request by using the target processing request as a parameterization object includes:
the test equipment identifies interface data of the target processing request and generates a request list corresponding to the interface data;
the testing equipment takes a login account and a login password as parameterized objects in the request list, and allocates parameterized login accounts and login account passwords which are independent of each other to different virtual users;
the testing equipment configures the parameterized login account and the login password and the pairing relation between the interface data, so that when the script initiates a target processing request to a target system, the parameterized login account and the login password are called through the interface data to initiate the target processing request.
With reference to the second possible implementation manner of the first aspect of the present application, in a third possible implementation manner of the first aspect of the present application, the test device is presented in a visual interface in a process of configuring the test script, and the test device specifically uses a login account and a login password as parameterized objects in the request list, and allocates parameterized login accounts and login passwords that are independent of each other to different virtual users, including:
the test equipment specifically takes a login account and a login password as parameterized objects in the request list, generates and displays mutually independent parameterized login accounts and login passwords randomly generated by the test equipment for different virtual users to the users in a visualized operation mode in a visualized interface;
or the test equipment takes the login account and the login password as parameterized objects in the request list, and provides an input interface for a user in a visualized operation mode in a visualized interface, so that the user inputs the parameterized login account and the parameterized login password which are independent from each other for different virtual users;
after the user confirms, the testing equipment determines the parameterized login account number and the login password in the visual interface as finally adopted data.
With reference to the third possible implementation manner of the first aspect of the present application, in a fourth possible implementation manner of the first aspect of the present application, the method further includes:
after the test is finished, the test equipment records the parameterized login account and the parameterized login password, so that the parameterized login account and the parameterized login password are directly called for testing when a target processing request also exists in a test script used by the next test task.
In a second aspect, the present application provides a device for parameterizing a test script, the device comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a test script of a test task after the test task of a target system is determined, and the test script is used for initiating a test on the target system according to a preset test rule;
the detection unit is used for detecting whether a target processing request that the target system cannot respond to the repeated request content exists in the test script or not, and if so, the parameterization processing unit is triggered;
the parameterization processing unit is used for carrying out parameterization processing on the target processing request by taking the target processing request as a parameterization object, so that request contents carried in the requests are different data with dynamic change characteristics when the target processing requests are sent to a target system to execute system testing, and the same processing request with repeated contents is prevented from being sent to the target system;
the test unit is used for initiating different processing requests including target processing requests to the target system based on the test script and monitoring response results of the target system to the different processing requests in the test process;
and the determining unit is used for determining the function and performance test result of the target system based on the response result of the target system to different processing requests.
With reference to the second aspect of the present application, in a first possible implementation manner of the second aspect of the present application, the target processing request is specifically a preset user login request carrying a login account and a login password.
With reference to the first possible implementation manner of the second aspect of the present application, in a second possible implementation manner of the second aspect of the present application, the parameterization processing unit is specifically configured to:
identifying interface data of a target processing request and generating a request list corresponding to the interface data;
specifically, a login account and a login password are used as parameterized objects in the request list, and parameterized login accounts and login account passwords which are independent of each other are distributed for different virtual users;
and configuring a pairing relation between the parameterized login account and the login password and the interface data, so that when the script initiates a target processing request to the target system, the parameterized login account and the login password are called through the interface data to initiate the target processing request.
With reference to the second possible implementation manner of the second aspect of the present application, in a third possible implementation manner of the second aspect of the present application, the parameterization processing unit is specifically configured to:
specifically, a login account and a login password are used as parameterized objects in the request list, and the parameterized login account and the parameterized login password which are independent of each other and randomly generated for different virtual users are generated and displayed to the user in a visualized operation mode in a visualized interface;
or, the login account and the login password are specifically used as parameterized objects in the request list, and an input interface is provided for the user in a visualized operation mode in a visualized interface, so that the user inputs parameterized login accounts and login passwords which are independent of each other for different virtual users;
and after the confirmation of the user, determining the parameterized login account number and the login password in the visual interface as finally adopted data.
With reference to the third possible implementation manner of the second aspect of the present application, in a fourth possible implementation manner of the second aspect of the present application, the apparatus further includes a recording unit, configured to:
after the test is finished, recording the parameterized login account and the login password, so that when a target processing request also exists in a test script used by the next test task, the parameterized login account and the login password are directly called for testing.
In a third aspect, the present application provides a testing device, including a processor and a memory, where the memory stores a computer program, and the processor executes the method provided in the first aspect of the present application or any one of the possible implementation manners of the first aspect of the present application when calling the computer program in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the method provided in the first aspect of the present application or any one of the possible implementations of the first aspect of the present application.
From the above, the present application has the following advantageous effects:
in the process of executing the automated test on the target system through the test script, the method and the device have the advantages that whether the target processing request of which the target system cannot respond to the repeated request content exists in the test script or not is detected, if yes, the target processing request is used as a parameterized object to be parameterized, so that the request content carried in the request is different data with the characteristic of dynamic change when the target processing requests are sent to the target system to execute the system test, the same processing request of the repeated content is prevented from being sent to the target system, the interference caused by the target processing request can be avoided, the target processing request can execute normal system test, the system test also has the characteristic of dynamic change, and the test efficiency and the test quality of the whole system test process are guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a parameterization processing method for a test script according to the present application;
FIG. 2 is a schematic flow chart of the present application for configuring a test script;
FIG. 3 is a schematic diagram of a configuration of a parameterization processing device of the test script of the present application;
fig. 4 is a schematic structural diagram of the testing apparatus of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the 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 application.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on the technical purpose to be achieved, as long as the same or similar technical effects are achieved.
The division of the modules presented in this application is a logical division, and in practical applications, there may be another division, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not executed, and in addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the modules may be in an electrical or other similar form, which is not limited in this application. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
Before describing the parameterization processing method of the test script provided by the present application, first, the background content related to the present application is described.
The parameterization processing method and device for the test script and the computer readable storage medium can be applied to test equipment and are used for enabling a target processing request to be capable of executing normal system test and the system test to have the characteristic of dynamic change through parameterization processing aiming at the target processing request that a target system cannot respond to repeated request contents, and the test efficiency and the test quality are guaranteed.
In the parameterization processing method for the test script, an execution main body may be a parameterization processing device for the test script, or different types of test Equipment such as a server, a physical host, or User Equipment (UE) that integrates the parameterization processing device for the test script. The parameterization processing device of the test script can be implemented in a hardware or software manner, the UE can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, or a Personal Digital Assistant (PDA), and the test device can be set in a device cluster manner.
Next, a method for parameterizing a test script provided by the present application is described.
First, referring to fig. 1, fig. 1 shows a flowchart of a parameterization processing method for a test script according to the present application, and the parameterization processing method for a test script according to the present application may specifically include the following steps S101 to S105:
step S101, after determining a test task for a target system, a test device acquires a test script of the test task, wherein the test script is used for initiating a test for the target system according to a preset test rule;
it will be appreciated that in actual operation, testing of the system is initiated in the form of a specified test task.
The test task can be manually configured for a worker, and can also be automatically triggered and generated by the trigger conditions such as new contents appearing on the automatic monitoring system of the test equipment.
The test script is generally a general test script, and of course, a test script configured specifically may also be used for some special systems.
A test script may be understood as a series of instructions involved in system testing, which may be executed by an automated testing tool, that is, the test script may execute system testing by loading a test script configured in the testing tool (typically embodied in a separate application program).
It can be understood that, for the test mode executed by the test script, it is configured under the preset test rule, so that the system function and performance of the target system under the test rule can be measured.
For example, if the test rule indicates that the registered user of the test system can normally log in, the test script may configure a corresponding processing request under the rule, so as to measure the log-in test result of the registered user of the target system.
The specific test rule related to the test script may be specifically adjusted according to actual needs and corresponding standard test rules, which is not specifically limited herein.
Step S102, the test equipment detects whether a target processing request that the target system cannot respond to the repeated request content exists in the test script, and if yes, step S103 is triggered;
it is understood that the processing request configured in the test script may be a processing request directly written into the script, or a processing request configured with a corresponding interface to the script, that is, a processing request initiated by the test script during the execution of the system test may be invoked from other local storage addresses or even other devices.
And for a large number of processing requests related to the system testing task, the application detects whether a target processing request which cannot repeatedly request the content of the target system to be tested exists.
In general, for different systems, in the actual operation process of providing application services, based on the operation requirements of the system itself and possibly the operation requirements of related services, processing requests related to some detailed functional services cannot respond to the repeated requests.
However, the present application considers that such processing requests may cause a test exception, that is, one reason that the test efficiency and the test quality in the existing test tool are abnormal, the test executed by the test script generally has a repetitive characteristic, that is, if a large number of processing requests are involved, a large number of processing requests repeatedly requesting the content often exist in the processing requests, and for some specific application services of the system, such processing requests cannot or cannot normally respond.
In contrast, whether the processing request, i.e., the target processing request, exists in the test script can be detected by means of a preset processing request type, specific content of the processing request, even a real-time processing request response result, and the like.
Step S103, the test equipment takes the target processing request as a parameterization object, and conducts parameterization processing on the target processing request, so that request contents carried in the requests are different data with dynamic change characteristics when the target processing requests are sent to a target system to execute system test, and the same processing request with repeated contents is prevented from being sent to the target system;
it can be understood that, for a target processing request for which the target system cannot respond to the repeated request content, a parameterization mechanism is specifically introduced in the present application, and the parameterization mechanism can be understood as configuring the request content carried by different processing requests initiated at different times into different data, so that in the test process, the request content carried by a plurality of target processing requests is different data showing a dynamic change characteristic when the plurality of target processing requests are sent to the target system to execute a system test, and thus, the target system cannot respond to the target processing request with the same request content.
Step S104, the test device initiates different processing requests including a target processing request to the target system based on the test script in the test process, and monitors the response result of the target system to the different processing requests;
after the problem that the target system cannot normally respond to the target processing request is solved, normal system test can be initiated to the target system, namely, a large number of processing requests are sent to observe the response of the target system to the received processing requests.
In the test process, the response result fed back by the target system may be received from outside the system, or the response result of the target system may be obtained in an active manner through a monitoring program configured in the target system.
Step S105, the test equipment determines the function and performance test result of the target system based on the response result of the target system to different processing requests.
After the response results of the target system to the different processing requests sent to the test equipment locally are obtained, the response results can be processed into corresponding function and performance test results according to the data processing related to the data conversion processing, the data processing, the result presentation mode and the like of the preset function and performance test results based on the response results.
The final function and performance test result is embodied under the test rule related to the initial test task, and can be specifically presented in the modes of pictures, texts, reports and the like.
As can be seen from the embodiment shown in fig. 1, in the process of performing an automated test on a target system through a test script, the present application performs a parameterization process by detecting whether a target processing request that the target system cannot respond to a content of a repetitive request exists in the test script, and if the target processing request exists, the target processing request is taken as a parameterization object, so that request contents carried in the requests are different data presenting a dynamic change characteristic when the plurality of target processing requests are sent to the target system to perform the system test, so as to avoid initiating the same processing request of the repetitive content to the target system, so that interference caused by the target processing request can be avoided, the target processing request can perform a normal system test, the system test also has the characteristic of dynamic change, and the test efficiency and the test quality of the overall system test process are ensured.
The steps of the embodiment shown in fig. 1 and the possible implementation manner thereof in practical application will be described in detail.
As a practical implementation manner, for the target processing request addressed by the present application, the target processing request may specifically be a preset user login request carrying a login account and a login password.
It can be understood that in an application scenario of actual system testing, the application finds through test backtracking that the generated concurrent users often cannot use the same parameters to access the same request in the process of function and performance testing, for example, during test login operation, the concurrent users cannot use the same account number password to log in, and at this time, parameterization processing can be performed on the places related to the concurrent users in the test script through the application, so that each concurrent user can be allocated with independent parameter information, and thus, normal testing can be completed in the login operation testing link.
Further, in a specific arrangement, as another practical implementation manner, in the process of performing the parameterization processing on the target processing request, the following may be specifically included:
the test equipment identifies interface data of the target processing request and generates a request list corresponding to the interface data;
the test equipment specifically takes a login account and a login password as parameterized objects in the request list, and allocates parameterized login accounts and login account passwords which are independent of each other to different virtual users;
the testing equipment configures the parameterized login account and the login password and the pairing relation between the interface data, so that when the script initiates a target processing request to a target system, the parameterized login account and the login password are called through the interface data to initiate the target processing request.
It can be found that, as for the login account and the login password related to the target processing request, they are set in the form of a table, so that the data processing has the advantages of convenient reading and writing, and easy management.
The data calling method of the interface data format may be not only calling a login account and a login password that are already stored in the test script, but also calling a login account and a login password that are stored outside the test script.
Specifically, the content of the exemplary embodiment can also be understood by referring to a flow chart diagram of the configuration test script of the present application shown in fig. 2.
For the login account numbers and the login passwords, each login account number is provided with a matched login password, and a group of login account numbers and login passwords correspond to a virtual user, so that a large number of login operations of concurrent users are realized.
In addition, as another practical implementation manner, the configuration process related to the test script, or the test device during the process of configuring the test script, may be specifically presented in a visual interface.
Therefore, for a system test scene, the application uploads a data set in a visual operation mode, simulates interface parameters recorded by a script, and restores a real service scene, namely, the simulation of reporting requests to a server by multiple clients is similar to the reporting requests to the server by the real clients, and the simulation includes HTTP request concurrency quantity, concurrency time sequence, service types and the like.
Correspondingly, under the visualization mechanism, in the process that the test device allocates mutually independent parameterized login accounts and login passwords to different virtual users, the following contents can be included:
the test equipment specifically takes a login account and a login password as parameterized objects in the request list, generates and displays mutually independent parameterized login accounts and login passwords randomly generated by the test equipment for different virtual users to the users in a visualized operation mode in a visualized interface;
or the test equipment takes the login account and the login password as parameterized objects in the request list, and provides an input interface for a user in a visualized operation mode in a visualized interface, so that the user inputs the parameterized login account and the parameterized login password which are independent from each other for different virtual users;
and after the user confirms, testing the parameterized login account number and the login password in the visual interface of the equipment into finally adopted data.
It can be understood that, on one hand, the test device can autonomously complete the parameterization of the target processing request, and on the other hand, the parameterization of the target processing request can be completed by means of manual import.
Under the visual requirement, the final parameterization processing result can be confirmed and applied manually, and the processing precision and the processing effect of the parameterization processing are further guaranteed.
To further understand the above, including the contents of the exemplary implementations, an example of the configuration parameterization process under the visualization mechanism is described below.
Background: and (3) parameterization setting, wherein a user name and a password are required to be input when a system user logs in, if the system does not allow the same user name and the same password to log in at the same time, the user name and the password can be parameterized by testing, so that each virtual user can normally access by using different user names and passwords.
1. Selecting any script, the current interface will display all the request contents of the script, specifically:
firstly, selecting a request with data;
clicking a 'parameterization' button of an upper menu bar editing module;
thirdly, selecting an 'insert row' and an 'insert column' newly-added parameter list by clicking a right key;
and fourthly, inputting parameter contents into the table, or importing the parameter contents through xls, txt and csv files.
2. After the parameter contents are edited, the parameter access mode of each parameter needs to be selected from the list, for example, sequential or random access, and the parameterized user name and password configured in the form of a table can be referred to the following table 1:
TABLE 1 parameterized Table of usernames and passwords
Figure 389747DEST_PATH_IMAGE001
Taking table 1 as an example, if the username selects the order to take the parameter, the obtained parameter values are Admin1, Admin2, Admin3, Admin4 and Admin5 respectively; if the username chooses random access, the parameter values obtained may be Admin1, Admin5, Admin4, Admin1, Admin3, etc.
After the setting is finished, the user name column and password column data need to be bound to the corresponding parameters in the request, and then different concurrent users can obtain different account numbers and passwords.
In addition, as another practical implementation manner, after the parameterization setting of the target processing request is completed and the system test of the current target system is also completed, the parameterization setting of the target processing request can be used in a subsequent applicable system test scene, so that the effects of repeated use and operation cost saving are achieved.
After the test is finished, the test equipment records the parameterized login account and the login password, so that the parameterized login account and the login password are directly called for testing when a target processing request also exists in a test script used by the next test task.
The above is an introduction of the method for parameterization processing of the test script provided by the present application, and in order to better implement the method for parameterization processing of the test script provided by the present application, the present application further provides a device for parameterization processing of the test script from the perspective of functional modules.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a parameterization processing device for a test script according to the present application, in which the parameterization processing device 300 for a test script specifically includes the following structure:
an obtaining unit 301, configured to obtain a test script of a test task after determining the test task for a target system, where the test script is used to initiate a test on the target system according to a preset test rule;
a detecting unit 302, configured to detect whether a target processing request that cannot be responded by the target system to the content of the repeated request exists in the test script, and if so, trigger a parameterization processing unit 303;
the parameterization processing unit 303 is configured to perform parameterization processing on the target processing requests by using the target processing requests as a parameterization object, so that request contents carried in the requests are different data with a dynamic change characteristic when the plurality of target processing requests are sent to the target system to perform system testing, so as to avoid initiating the same processing request with repeated contents to the target system;
the test unit 304 is configured to initiate different processing requests including a target processing request to the target system based on the test script and monitor a response result of the target system to the different processing requests during the test process;
a determining unit 305, configured to determine a function and performance test result of the target system based on a response result of the target system to the different processing requests.
In an exemplary implementation manner, the target processing request is specifically a preset user login request carrying a login account and a login password.
In another exemplary implementation manner, the parameterization processing unit 303 is specifically configured to:
identifying interface data of a target processing request and generating a request list corresponding to the interface data;
specifically, a login account and a login password are used as parameterized objects in the request list, and parameterized login accounts and login account passwords which are independent of each other are distributed for different virtual users;
and configuring a pairing relation between the parameterized login account and the login password and the interface data, so that when the script initiates a target processing request to the target system, the parameterized login account and the login password are called through the interface data to initiate the target processing request.
In another exemplary implementation manner, the parameterization processing unit 303 is specifically configured to:
specifically, a login account and a login password are used as parameterized objects in the request list, and the parameterized login account and the parameterized login password which are independent of each other and randomly generated for different virtual users are generated and displayed to the user in a visualized operation mode in a visualized interface;
or the login account and the login password are specifically used as parameterized objects in the request list, and an input interface is provided for the user in a visualized operation mode in a visualized interface, so that the user inputs parameterized login accounts and login passwords which are independent of each other for different virtual users;
and after the confirmation of the user, determining the parameterized login account number and the login password in the visual interface as finally adopted data.
In yet another exemplary implementation, the apparatus further includes a recording unit 306 configured to:
and after the test is finished, recording the parameterized login account and the login password, so that the parameterized login account and the login password are directly called for testing when a target processing request also exists in a test script used by the next test task.
The present application further provides a testing device from a hardware structure perspective, referring to fig. 4, fig. 4 shows a schematic structural diagram of the testing device of the present application, specifically, the testing device of the present application may include a processor 401, a memory 402, and an input/output device 403, where the processor 401 is configured to implement the steps of the parameterization processing method of the test script in the corresponding embodiment of fig. 1 when executing the computer program stored in the memory 402; alternatively, the processor 401 is configured to implement the functions of the units in the corresponding embodiment shown in fig. 3 when executing the computer program stored in the memory 402, and the memory 402 is configured to store the computer program required by the processor 401 to execute the parameterization processing method for the test script in the corresponding embodiment shown in fig. 1.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in memory 402 and executed by processor 401 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computer device.
The test equipment may include, but is not limited to, a processor 401, a memory 402, and input-output devices 403. It will be appreciated by those skilled in the art that the illustration is merely an example of a test device and does not constitute a limitation of a test device and may include more or less components than those illustrated, or some components may be combined, or different components, e.g. the test device may also include a network access device, a bus, etc. through which the processor 401, the memory 402, the input output device 403, etc. are connected.
The Processor 401 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center for the test equipment and connecting the various parts of the overall equipment using various interfaces and lines.
The memory 402 may be used to store computer programs and/or modules, and the processor 401 may implement various functions of the computer device by operating or executing the computer programs and/or modules stored in the memory 402 and invoking data stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the test equipment, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The processor 401, when executing the computer program stored in the memory 402, may specifically implement the following functions:
after determining a test task for a target system, acquiring a test script of the test task, wherein the test script is used for initiating a test on the target system according to a preset test rule;
detecting whether a target processing request that the target system cannot respond to the repeated request content exists in the test script;
if the target processing request exists, the target processing request is taken as a parameterization object, and the parameterization processing is carried out on the target processing request, so that the request content carried in the requests is different data with the characteristic of dynamic change when the target processing requests are sent to a target system to execute the system test, and the same processing request with repeated content is prevented from being sent to the target system;
in the testing process, different processing requests including target processing requests are sent to a target system based on a testing script, and response results of the target system to the different processing requests are monitored;
and determining the function and performance test result of the target system based on the response result of the target system to different processing requests.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the above-described parameterization processing apparatus for a test script, the test and the specific working process of the corresponding unit thereof may refer to the description of the parameterization processing method for a test script in the embodiment corresponding to fig. 1, and are not described herein again in detail.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
For this reason, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of the parameterization processing method of the test script in the embodiment corresponding to fig. 1 in the present application, and specific operations may refer to the description of the parameterization processing method of the test script in the embodiment corresponding to fig. 1, which is not described herein again.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps of the parameterization processing method for the test script in the embodiment corresponding to fig. 1, the beneficial effects that can be achieved by the parameterization processing method for the test script in the embodiment corresponding to fig. 1 can be achieved, and the detailed description is given in detail in the foregoing description, and will not be repeated herein.
The parameterization processing method, device, test equipment and computer-readable storage medium of the test script provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A parameterization processing method for a test script is characterized by comprising the following steps:
after determining a test task for a target system, a test device acquires a test script of the test task, wherein the test script is used for initiating a test on the target system according to a preset test rule;
the test equipment detects whether a target processing request that the target system cannot respond to repeated request content exists in the test script;
if the target processing request exists, the test equipment takes the target processing request as a parameterization object, and parameterizes the target processing request, so that request contents carried in the requests are different data with dynamic change characteristics when the target processing requests are sent to the target system to execute system test, and the same processing request with repeated contents is prevented from being sent to the target system;
in the testing process, the testing equipment initiates different processing requests including the target processing request to the target system based on the testing script, and monitors the response result of the target system to the different processing requests;
the test equipment determines a function and performance test result of the target system based on a response result of the target system to the different processing requests;
the target processing request is specifically a preset user login request carrying a login account and a login password.
2. The method of claim 1, wherein the test equipment parameterizes the target processing request with the target processing request as a parameterization object, and comprises:
the test equipment identifies interface data of the target processing request and generates a request list corresponding to the interface data;
the test equipment specifically takes the login account and the login password as parameterized objects in the request list, and allocates the parameterized login account and the parameterized login account password which are independent to each other to different virtual users;
and the test equipment configures the parameterized login account and the login password and the pairing relation between the interface data, so that when the script initiates the target processing request to the target system, the parameterized login account and the login password are called by the interface data to initiate the target processing request.
3. The method according to claim 2, wherein the test device is presented in a visual interface during the process of configuring the test script, and the test device specifically uses the login account and the login password as parameterized objects in the request list to allocate parameterized login accounts and login passwords that are independent of each other to different virtual users, comprising:
the test equipment specifically uses the login account and the login password as parameterized objects in the request list, generates and displays the parameterized login account and the parameterized login password which are generated randomly by the test equipment for different virtual users independently in a visualized operation mode in the visualized interface;
or the test equipment takes the login account and the login password as parameterized objects in the request list, and provides an input interface for a user in a visualized operation mode in the visualized interface, so that the user inputs the parameterized login account and the parameterized login password which are independent from each other for different virtual users;
after the user confirms, the testing equipment determines the parameterized login account and the login password in the visual interface as finally adopted data.
4. The method of claim 3, further comprising:
after the test is finished, the test equipment records the parameterized login account and the parameterized login password, so that the parameterized login account and the parameterized login password are directly called for testing when a test script used by the next test task also has the target processing request.
5. A device for parameterizing a test script, the device comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a test script of a test task after the test task of a target system is determined, and the test script is used for initiating a test on the target system according to a preset test rule;
the detection unit is used for detecting whether a target processing request that the target system cannot respond to the repeated request content exists in the test script or not, and if so, the parameterization processing unit is triggered;
the parameterization processing unit is used for taking the target processing request as a parameterization object and carrying out parameterization processing on the target processing request, so that request contents carried in the requests are different data with dynamic change characteristics when the target processing requests are sent to the target system to execute system testing, and the same processing request with repeated contents is prevented from being sent to the target system;
the test unit is used for initiating different processing requests including the target processing request to the target system based on the test script in the test process and monitoring the response result of the target system to the different processing requests;
a determining unit, configured to determine a function and performance test result of the target system based on a response result of the target system to the different processing request;
the target processing request is specifically a preset user login request carrying a login account and a login password.
6. The apparatus according to claim 5, wherein the parameterization processing unit is specifically configured to:
identifying interface data of the target processing request and generating a request list corresponding to the interface data;
the login account and the login password are specifically used as parameterized objects in the request list, and the parameterized login account and the login account password which are independent of each other are distributed to different virtual users;
configuring a pairing relation between the parameterized login account and the login password and the interface data, so that when the script initiates the target processing request to the target system, the parameterized login account and the login password are called by the interface data to initiate the target processing request.
7. The apparatus according to claim 6, wherein the configuration of the test script is presented by a visual interface, and the parameterization processing unit is specifically configured to:
specifically, the login account and the login password are used as parameterized objects in the request list, and the parameterized login account and the parameterized login password which are generated randomly for different virtual users and are independent of each other are generated and displayed to the user in a visualized operation mode in the visualized interface;
or, the login account and the login password are specifically used as parameterized objects in the request list, and an input interface is provided for a user in a visualized operation form in the visualized interface, so that the user inputs the parameterized login account and the parameterized login password which are independent from each other for the different virtual users;
and after the user confirms, determining the parameterized login account and the login password in the visual interface as finally adopted data.
8. The apparatus according to claim 7, further comprising a recording unit configured to:
and after the test is finished, recording the parameterized login account and the login password, so that when the target processing request also exists in a test script used by the next test task, the parameterized login account and the login password are directly called for testing.
CN202210579027.5A 2022-05-26 2022-05-26 Parameterization processing method and device for test script Active CN114676067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210579027.5A CN114676067B (en) 2022-05-26 2022-05-26 Parameterization processing method and device for test script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210579027.5A CN114676067B (en) 2022-05-26 2022-05-26 Parameterization processing method and device for test script

Publications (2)

Publication Number Publication Date
CN114676067A CN114676067A (en) 2022-06-28
CN114676067B true CN114676067B (en) 2022-08-30

Family

ID=82079569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210579027.5A Active CN114676067B (en) 2022-05-26 2022-05-26 Parameterization processing method and device for test script

Country Status (1)

Country Link
CN (1) CN114676067B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020093214A1 (en) * 2018-11-05 2020-05-14 深圳市欢太科技有限公司 Application program login method, application program login device and mobile terminal
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
WO2021051876A1 (en) * 2019-09-18 2021-03-25 平安科技(深圳)有限公司 Batch authorization method and apparatus for emails, and computer device and storage medium
CN112559313A (en) * 2019-09-26 2021-03-26 北京国双科技有限公司 Test case setting method and device, storage medium and electronic equipment
WO2021218979A1 (en) * 2020-04-30 2021-11-04 华为技术有限公司 Login method and system based on cloud application instance, and related device
CN113806736A (en) * 2021-08-23 2021-12-17 北京天融信网络安全技术有限公司 Vulnerability detection method and system based on mimicry invasion and storage medium thereof
CN114003484A (en) * 2020-07-28 2022-02-01 深圳兆日科技股份有限公司 Log output method, device and equipment for interface test and storage medium
CN114020446A (en) * 2021-09-24 2022-02-08 百果园技术(新加坡)有限公司 Cross-multi-engine routing processing method, device, equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3007876B1 (en) * 2013-06-28 2016-09-16 Continental Automotive France METHOD FOR PROCESSING PRESENCE SIGNAL IN A FREE HAND ACCESS SYSTEM OF A CAPACITIVE SENSOR VEHICLE
CN105101196B (en) * 2014-05-06 2018-11-02 阿里巴巴集团控股有限公司 A kind of user account management method and device
US10305882B2 (en) * 2015-11-24 2019-05-28 International Business Machines Corporation Using a service-provider password to simulate F-SSO functionality
CN111104675A (en) * 2019-11-15 2020-05-05 泰康保险集团股份有限公司 Method and device for detecting system security vulnerability
CN111159000B (en) * 2019-12-30 2021-03-02 北京明朝万达科技股份有限公司 Server performance test method, device, equipment and storage medium
CN111258900A (en) * 2020-01-17 2020-06-09 深圳壹账通智能科技有限公司 Interface test script generation method, system, equipment and storage medium
CN111382080A (en) * 2020-03-16 2020-07-07 深圳市吉祥腾达科技有限公司 Stability test method for equipment cloud management platform system
CN111414303B (en) * 2020-03-17 2023-03-14 建信金融科技有限责任公司 Auxiliary system and method for script performance test
CN111949548B (en) * 2020-08-24 2022-08-26 福建国信立联科技集团有限公司 Automatic unauthorized penetration testing method and storage device
CN112506800B (en) * 2020-12-22 2023-08-18 北京百度网讯科技有限公司 Method, apparatus, device, medium and program product for testing code
CN114153743A (en) * 2021-12-13 2022-03-08 江苏方哲检测技术有限公司 Automatic testing method based on interface

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020093214A1 (en) * 2018-11-05 2020-05-14 深圳市欢太科技有限公司 Application program login method, application program login device and mobile terminal
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
WO2021051876A1 (en) * 2019-09-18 2021-03-25 平安科技(深圳)有限公司 Batch authorization method and apparatus for emails, and computer device and storage medium
CN112559313A (en) * 2019-09-26 2021-03-26 北京国双科技有限公司 Test case setting method and device, storage medium and electronic equipment
WO2021218979A1 (en) * 2020-04-30 2021-11-04 华为技术有限公司 Login method and system based on cloud application instance, and related device
CN114003484A (en) * 2020-07-28 2022-02-01 深圳兆日科技股份有限公司 Log output method, device and equipment for interface test and storage medium
CN113806736A (en) * 2021-08-23 2021-12-17 北京天融信网络安全技术有限公司 Vulnerability detection method and system based on mimicry invasion and storage medium thereof
CN114020446A (en) * 2021-09-24 2022-02-08 百果园技术(新加坡)有限公司 Cross-multi-engine routing processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114676067A (en) 2022-06-28

Similar Documents

Publication Publication Date Title
CN107402880B (en) Test method and electronic equipment
CN108153670B (en) Interface testing method and device and electronic equipment
US8660833B2 (en) Method, computer program product and apparatus for providing an interactive network simulator
CN111045879B (en) Method, device and storage medium for generating pressure test report
CN111198797B (en) Operation monitoring method and device and operation analysis method and device
CN114546738A (en) Server general test method, system, terminal and storage medium
CN111176918A (en) Server testing method, system, equipment and computer readable storage medium
CN113505027B (en) Business system backup method, device, equipment and storage medium
CN111949545A (en) Automatic testing method, system, server and storage medium
CN107733710A (en) Construction method, device, computer equipment and the storage medium of link call relation
CN110677307B (en) Service monitoring method, device, equipment and storage medium
CN116204438A (en) Test case generation method, automatic test method and related device
CN108733545B (en) Pressure testing method and device
CN114911706A (en) Use case recommendation method, device, equipment and storage medium
CN116644250B (en) Page detection method, page detection device, computer equipment and storage medium
CN114676067B (en) Parameterization processing method and device for test script
CN110457202B (en) TPC-E testing method for quickly establishing ODBC connection and driver equipment
CN112380094A (en) RPA service flow processing method and device
CN114050990B (en) Method and device for testing network isolation equipment, storage medium and electronic equipment
JP3987333B2 (en) Performance measuring device, performance measuring system, recording medium and program
CN113127369A (en) Processing method and device for execution script
CN112269682A (en) Animation video backup method
CN111880996A (en) Bare computer data acquisition method, device, equipment and readable storage medium
CN114741325B (en) Recording method and device of test script for application system test
JP4113106B2 (en) Performance measuring apparatus and performance measuring method

Legal Events

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