CN107341109B - Test data generation method and system - Google Patents

Test data generation method and system Download PDF

Info

Publication number
CN107341109B
CN107341109B CN201710549256.1A CN201710549256A CN107341109B CN 107341109 B CN107341109 B CN 107341109B CN 201710549256 A CN201710549256 A CN 201710549256A CN 107341109 B CN107341109 B CN 107341109B
Authority
CN
China
Prior art keywords
test
user
preset
related information
information
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
CN201710549256.1A
Other languages
Chinese (zh)
Other versions
CN107341109A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201710549256.1A priority Critical patent/CN107341109B/en
Publication of CN107341109A publication Critical patent/CN107341109A/en
Application granted granted Critical
Publication of CN107341109B publication Critical patent/CN107341109B/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
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a system for generating test data, wherein the method responds to the operation of a user on a first preset control of office software and logs in a test server for executing functional test; receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and the related information of the open accounts; responding to the operation of a user on a second preset control of office software, automatically generating test data packets with the number matched with the number according to the number of the open accounts and the related information of the open accounts, and sending the test data packets to the test server to enable the test server to establish test data. Because the plurality of test preorders can be automatically acquired without manual operation of staff across systems, the efficiency of establishing test data is greatly improved, and the progress and the efficiency of upgrading and transforming functions are improved.

Description

Test data generation method and system
Technical Field
The invention relates to the technical field of software development, in particular to a method and a system for generating test data.
Background
The existing banking system supports various business functions, such as internet banking, account transfer, deposit and the like. When the business function is modified, a large amount of test data needs to be prepared at the early stage for data base in order to test the modified function. For example, when a function after a deposit, such as a contract, is improved, a large number of accounts having a deposit record need to be opened in advance as test data.
The existing method for preparing test data is mainly to use a manual mode to open data. The tester logs in the bank system with effective user name and password in the teller machine, opens data according to the data opening process, and establishes a plurality of test data, for example, an account with deposit records is established according to the process of opening a new account and depositing.
However, because of numerous test products and large test task amount, the number of the required test data is huge, the mode of manually establishing the test data is time-consuming and labor-consuming, the period of test data preparation is long, and therefore the function test cannot be performed in time, the function upgrading and modifying progress of the bank system is slow, and the efficiency is low.
Disclosure of Invention
In view of this, the present invention provides a method and a system for generating test data, so as to solve the problems of slow progress and low efficiency of function upgrade and modification of a bank system in the prior art.
The invention provides a method for generating test data, which comprises the following steps:
running a preset program set and outputting a display interface of office software, wherein the program set is used for adding a first preset control and a second preset control in the display interface;
responding to the operation of a user on the first preset control, and logging in a test server for executing the function test;
receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and the related information of the open accounts;
responding to the operation of the user on the second preset control, generating test data packets with the number matched with the number according to the number of the open accounts and the related information of the open accounts, and sending the test data packets to the test server to enable the test server to establish test data.
Preferably, the logging in to the test server in response to the operation of the first preset control by the user includes:
responding to the selection operation of the user on the first preset control, and popping up a configuration window;
receiving configuration data input by a user in the configuration window, wherein the configuration data is used for configuring login information and testing server addresses;
and responding to the click operation of the user on the determined button in the first preset control, and logging in the test server according to the login information.
Preferably, the receiving test information input by the user in the input unit of the display interface includes:
receiving the number of opened accounts input in the input unit by a user;
responding to the click operation of a user on a preset program plug-in the display interface, and calling a preset input rule corresponding to the preset program plug-in;
and automatically inputting the related information of the opened account in the input unit according to the preset input rule.
Preferably, the generating, in response to the operation of the user on the second preset control, the test data packets of the number matched with the number of the account opening numbers according to the number of the account opening numbers and the related information of the account opening numbers includes:
responding to the selection operation of the user on the second preset control, and analyzing a message in a pre-stored transaction data packet to obtain transaction related information;
replacing the transaction related information with related information of the open account;
recombining the message containing the related information of the open account to obtain a test data packet;
and repeating the step of replacing the transaction related information with the related information of the open account number until the test data packets with the number matched with the number are generated.
Preferably, the method further comprises the following steps:
receiving an opening account data packet returned by the test server, and analyzing the opening account data packet to obtain relevant information of opening data;
screening the related information by using a preset script;
and displaying the screened information at a preset position of the display interface by using a preset format.
In another aspect, the present invention provides a system for generating test data, including:
the system comprises a program module, a display module and a control module, wherein the program module is used for running a preset program set and outputting a display interface of office software, and the program set is used for adding a first preset control and a second preset control in the display interface;
the first execution module is used for responding to the operation of a user on the first preset control and logging in a test server for executing the functional test;
the first input module is used for receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and relevant information of the open accounts;
and the second execution module is used for responding to the operation of the user on the second preset control, generating test data packets with the number matched with the number according to the number of the open accounts and the related information of the open accounts, and sending the test data packets to the test server to enable the test server to establish test data.
Preferably, the first execution module includes:
the first selection unit is used for responding to the selection operation of the user on the first preset control and popping up a configuration window;
the configuration unit is used for receiving configuration data input by a user in the configuration window, and the configuration data is used for configuring login information and testing server addresses;
and the execution unit is used for responding to the click operation of the user on the determined button in the first preset control and logging in the test server according to the login information.
Preferably, the first input module includes:
the account configuration unit is used for receiving the number of the opened accounts input in the input unit by the user;
the first response unit is used for responding to the click operation of a preset program plug-in the display interface by a user and calling a preset input rule corresponding to the preset program plug-in;
and the account entry unit is used for automatically entering the related information of the opened account in the input unit according to the preset input rule.
Preferably, the second execution module includes:
the second response unit is used for responding to the selection operation of the user on the second preset control, analyzing the message in the pre-stored transaction data packet and obtaining transaction related information;
the replacing unit is used for replacing the transaction related information with the related information of the open account;
the recombination unit is used for recombining the message containing the related information of the open account to obtain a test data packet;
and repeating the step of replacing the transaction related information with the related information of the open account number until the test data packets with the number matched with the number are generated.
Preferably, the display device further comprises a display module:
the display module is specifically used for receiving the opening account data packet returned by the test server, analyzing the opening account data packet and obtaining relevant information of opening data; screening the related information by using a preset script; and displaying the screened information at a preset position of the display interface by using a preset format.
According to the technical scheme, compared with the prior art, the invention discloses a test data generation method and a test data generation system, wherein the method responds to the operation of a user on a first preset control of office software and logs in a test server for executing functional test; receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and the related information of the open accounts; responding to the operation of a user on a second preset control of office software, automatically generating test data packets with the number matched with the number according to the number of the open accounts and the related information of the open accounts, and sending the test data packets to the test server to enable the test server to establish test data. Because the plurality of test preorders can be automatically acquired without manual operation of staff across systems, the efficiency of establishing test data is greatly improved, and the progress and the efficiency of upgrading and transforming functions are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is obvious that the drawings in the following description are only embodiments of the invention, and that for a person skilled in the art, other drawings can be obtained from the provided drawings without inventive effort.
Fig. 1 is a schematic flow chart of a test data generation method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating a process of logging in a test server in a test data generation method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a process of inputting relevant information into an input unit in a test data generating method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a process of generating a test data packet in a test data generation method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a test data generation system in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a test data generating method according to an embodiment of the present invention. As shown in fig. 1, the present invention discloses a method for generating test data.
In the method, a transaction data packet is captured and stored in advance, wherein the transaction data packet comprises a message generated when a user accesses a server at a teller machine during actual transaction.
Specifically, a message capture tool is prepared first, and in the embodiment of the present invention, a holder tool is preferentially used. The tool is a mature technology in the prior art, and the software is not described in detail here. After that, the teller machine logs into a server in the banking system according to the environment of use. It should be noted that the logged-in server is related to a specific environment, such as: http://192.168.0.1:8080/index. aspx, the first half is a server path, and the second half is fixed as server. It should be noted that, a storage path of the message, for example, \\ DateRunnerTool \ Source, is set in the software. Used for storing the captured messages.
The method for capturing the message is specifically that after logging in the front-end interface, the user opens the holder tool first, then submits any transaction at the front end, such as opening a client number, opening an account, depositing money and the like, and then uses the packet capturing tool to capture the message and store the message in a preset position.
Before the scheme of the invention is executed, a plurality of messages are stored in a preset storage position in advance, and each message pair has respective transaction.
The method for generating the test data comprises the following specific steps:
s101, running a preset program set and outputting a display interface of office software, wherein the program set is used for adding a first preset control and a second preset control in the display interface;
in the embodiment of the invention, a mechanism for sending messages by a front-end teller machine is simulated, and test data is automatically generated.
In the embodiment of the invention, a program set is preset, the preset program set is constructed by adopting a Visual Studio tool and is stored by adopting a format of sln. In actual use, the user opens the file in the sln format, and responds to the operation of opening the preset program set by the user, the preset program set is operated, and the first preset control and the second preset control are automatically added to the office software.
In the embodiment of the invention, Excel is preferably adopted as office software, but Wps and other office software with similar functions can realize similar functions, and corresponding modification can be carried out in bottom layer codes. And will not be described in detail herein.
And after running the preset program set, automatically popping up a display interface of office software, reserving the display interface, responding to the operation of selecting the template by a user, opening the template needing to generate the test data, and outputting the display interface corresponding to the template. It should be noted that, in the embodiment of the present invention, various types of templates, such as deposit, loan, online banking, and the like, are preset.
It should be noted that the program set implementation in the embodiment of the present invention includes the following functions.
1. Transaction parameter configuration: for receiving and setting dynamic and static parameters in transactions
2. Message processing: mainly comprises the processing functions of input and output messages
3. HTML file matching: and matching the received transaction code with the local HTML file to complete the process of matching the manually input Chinese character elements with the XML file label.
4. And (4) reporting in groups: and replacing the corresponding transaction information data in the XML file by using the parameters and the manually input values.
5. Analyzing a return message: and analyzing the key information in the received return message according to the format.
6. And (3) processing by a common mechanism: and specially processing the information such as the identity card number, the mobile phone number and the like in the message.
7. Server interaction: the messages are sent and received by interacting with a BOCTS-D-APP (Bank core) server.
8. Error processing: and processing errors in the execution process, including returning error information to the EXCEL and allowing the interruption and continuation mechanism.
S102, responding to the operation of a user on the first preset control, and logging in a test server for executing a function test;
according to the embodiment of the invention, the test server for executing the function test is logged in according to the operation of the user on the first preset control.
S103, receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and relevant information of the open accounts;
after the login is successful, the user inputs the number of opened accounts and the related information of the account to be opened, such as the input number 100, the identification number and the address in the related information of the account, and the like, in the display interface.
And S104, responding to the operation of the user on the second preset control, generating test data packets with the number matched with the number according to the number of the opening accounts and the related information of the opening accounts, and sending the test data packets to the test server to enable the test server to establish test data.
And then responding to the operation of the user on the second preset control, finding the message corresponding to the template, replacing the information of the corresponding position in the message by the related information, and generating a test data packet comprising the related information of the account opened by the user. When the number of the test data packets is multiple, the user also needs to fill multiple lines correspondingly, or related information of different marks is automatically added according to data filled by the user, and then the marks are recorded line by line for replacement, so that multiple test data packets are generated.
It should be noted that the process of filling in the relevant information can be completed in a macro control mode, and the relevant information is automatically added according to a preset rule, so as to save the time of manual entry.
After the test data packet is generated, the test data packet is sent to the test server by using the address of the server input by the user in the input interface. If the test server successfully establishes the test data, for example, successfully opens the client number, the prompt information such as ok and the like and the message containing the client number are returned.
It should be noted that each test data establishment process includes multiple steps, and the corresponding package is used in actual use, for example, a complete deposit process includes multiple steps of opening a client number, opening an account, depositing to a public/private account, and the like, and each step between the steps performs data interaction with the server, and returns necessary data required to be called in subsequent steps.
In the embodiment of the invention, each template is provided with a plurality of corresponding sub-interfaces according to different processes, for example, in an Excel table, and the implementation is realized by adopting a plurality of Sheet modes. And the necessary data returned each time can be automatically transferred between sheets, and is specifically executed by adopting Visual Studio plug-in or macro control. The method mainly realizes the data interaction function between the functional component and the EXCEL component, and the calling function of the parameters and the functional component.
In actual use, the operation flow corresponding to the package and the macros that can be used may include those shown in table 1.
Figure BDA0001343959580000081
Figure BDA0001343959580000091
TABLE 1
According to the technical scheme, the core transaction is automatically executed by adopting a C # technology through an interactive mechanism of a Visual Studio front end and a front end server, and the data is input, collected, sorted and output through EXCEL by a VBA technology, so that high-speed and large-batch data generation is realized.
According to the technical scheme, compared with the prior art, the method for generating the test data responds to the operation of a user on the first preset control of the office software, and logs in the test server for executing the function test; receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and the related information of the open accounts; responding to the operation of a user on a second preset control of office software, automatically generating test data packets with the number matched with the number according to the number of the open accounts and the related information of the open accounts, and sending the test data packets to the test server to enable the test server to establish test data. Because the plurality of test preorders can be automatically acquired without manual operation of staff across systems, the efficiency of establishing test data is greatly improved, and the progress and the efficiency of upgrading and transforming functions are improved.
In the above embodiment, the process of logging in to the test server in response to the user operating the first preset control is mentioned, and the step S102 is described in detail below. Fig. 2 is a schematic flowchart illustrating a process of logging in a test server in a test data generation method according to an embodiment of the present invention.
The responding to the operation of the user on the first preset control, and the logging in the test server comprises the following steps:
s201, responding to the selection operation of the user on the first preset control, and popping up a configuration window;
s202, receiving configuration data input by a user in the configuration window, wherein the configuration data is used for configuring login information and testing a server address;
in the embodiment of the invention, a configuration window pops up in response to the click operation of the user on the first preset control. The configuration window includes a plurality of input units and a plurality of buttons, such as confirmation, application, cancellation, etc., wherein the input units are used to receive user input, and the buttons are used to implement corresponding preset functions.
In practical use, the first preset control is configured as a "configure" button, and when the configure button is clicked, a configure window pops up, and the configure window may include necessary information for logging in the server, such as a message path, a server address, a page path, a teller number, an authorized teller, an organization number, an authorized password, a terminal, a system date, and the like.
S203, responding to the click operation of the user on the determined button in the first preset control, and logging in the test server according to the login information.
In the embodiment of the invention, after the confirm button is pressed, the test server is logged in response to the operation based on the information input by the user in the input unit.
And after the login is successful, the test server will return the information of successful login, at this time, the information for prompting the successful login is popped up, such as "successful login", "ok", etc., so as to prompt the user about the login situation. It will be appreciated that when an error occurs, an error prompt will also pop up.
And after logging in the test server, receiving test information input by a user in an input unit of the display interface. Fig. 3 is a schematic flow chart illustrating a process of inputting relevant information in an input unit in the test data generating method according to the embodiment of the present invention.
Step S103 specifically includes:
s301, receiving the number of opened accounts input in the input unit by a user;
it should be noted that the display interface also includes a plurality of input units, and the input units are displayed in the form of cells or in the form of text boxes.
After the user successfully logs in, the user needs to input the number of accounts to be opened, for example, 3.
S302, responding to the click operation of a preset program plug-in the display interface by a user, and calling a preset input rule corresponding to the preset program plug-in;
and S303, automatically inputting the related information of the opened account in the input unit according to the preset input rule.
In order to improve the working efficiency, the related information of the open account can be input by adopting an automatic data input mode. Such as clicking on a preset program plug-in. At this time, a predetermined input rule corresponding to the template, such as random data, a predetermined address, a predetermined identification number, etc., is called, and the relevant information is automatically added to the input unit according to the predetermined input rule.
It should be noted that, what is described here is only a preferred embodiment of a page, and other sub-interfaces, such as Sheet, correspond to their own macro keys, and a user may execute a corresponding preset program plug-in according to actual needs.
In practical use, the preset program plug-in may be a plurality of controls, and the names and functions of the respective controls refer to table 2 below.
Figure BDA0001343959580000111
TABLE 2
And after the relevant information is recorded, performing a process of sending the group report to the server. Fig. 4 is a schematic flowchart of generating a test data packet in a test data generating method according to an embodiment of the present invention.
Step S104 will be described in detail below.
The step of responding to the operation of the user on the second preset control, and generating test data packets with the number matched with the number according to the number of the account opening number and the related information of the account opening number, comprises:
s401, responding to the selection operation of the user on the second preset control, and analyzing a message in a pre-stored transaction data packet to obtain transaction related information;
s402, replacing the transaction related information with related information of the open account;
s403, recombining the message containing the relevant information of the open account to obtain a test data packet;
s404, repeating the step of replacing the transaction related information with the related information of the open account number until test data packets with the number matched with the number are generated.
In the embodiment of the invention, before the test data packet is sent to the test server, the message needs to be reassembled so as to form a new message.
In actual use, the second preset control is configured as a 'generate data' button, when the user clicks the second preset control, the clicking operation of the user is responded, the message of the transaction data packet corresponding to the template is searched, the transaction related information is obtained, the related information input by the user is replaced by the transaction information, and then the message is recombined, so that the test data packet is obtained. The test data packet includes the related information. Therefore, a new transaction data packet is generated, and the process of communication between the front end and the background is simulated.
It should be noted that the process of creating test data is executed according to the operation flow in table 1, and it is the test data created by the server when the process is executed to the last step. The process in which the transaction data packet is created in each step may refer to the aforementioned steps S401 to S404.
It should be noted that, since all fields in the message are english fields and have no chinese fields, and the fields in EXCEL generally adopt chinese fields, the method further includes, before parsing the pre-stored recorded message: and matching the Chinese field in the EXCEL with the English field in the message. The specific method is to match the Chinese field with the HTML file automatically stored in the local when the environment is loaded.
In the embodiment of the present invention, after the server establishes the test data, the method further includes:
s501, receiving an opening account data packet returned by the test server, and analyzing the opening account data packet to obtain related information of opening data;
s502, screening the related information by using a preset script;
and S503, displaying the screened information at the preset position of the display interface by using a preset format.
In the embodiment of the invention, after the test server returns the open account data packet, the open account data packet is analyzed, the preset script is used for screening, the format understood and used by the tester is arranged, and the format is displayed according to the format.
The preset script can be used as a macro control in an interface of office software. When the execution of S501 is completed, a prompt message, for example, "ok" is displayed, and then the returned related information is filtered by using the macro control and displayed by using a preset format.
It should be noted that, in the embodiment of the present invention, the life cycle may also be controlled. And after the functional test is finished, deleting related test data, specifically using the database to realize the life cycle management of the account data.
According to the scheme, the invention can realize the following beneficial effects:
the Visual Studio is applied to the function test for the first time, so that the method is suitable for quick batch response of big data and reflects the high efficiency of the tool;
replacing conventional automation tools in a simulated manual form with a simulated server interactive form;
the independent client end for simulating the operation of the front-end system is provided, transaction-level scripts do not need to be stored, and the local storage space and the script management consumption are saved;
the field attribute is adaptively adjusted according to the test environment version file, and the environment version does not need to be manually updated;
using a database to carry out full life cycle management on account data;
instead of discrete account requirements, packages of customizable integrated account data can be defined parametrically to cover product types, quantities, and data granularity. Manual script analysis is replaced, account requirements are directly defined through task requirements, and flexibility of the tool is reflected;
automatic opening of the debit card can be realized.
And also has the following characteristics:
the product coverage is high: the product is widely applied to various systems in middle lines, and comprises 67 core products and 14 peripheral products. And abstracting the service elements, and meeting the data calling requirement of each product line by using combined transaction. The method has the applicable feasibility for other bank systems;
the execution efficiency is high: the repeated labor of manpower is greatly reduced, and testers can directly apply for data to use instead of spending a large amount of time on account opening and attribute establishment. For a data tool for deploying a system, the single-time server interaction time is about 1S, and the execution efficiency is about 10 times of that of manual execution;
the execution flexibility is high: the method can be applied to general test data development, and can also be applied to special scenes and special data, such as data partition verification, interface verification and the like.
On the basis of the above test data generation method, correspondingly, the invention also provides a test data generation system.
FIG. 5 is a schematic structural diagram of a test data generation system according to an embodiment of the present invention; the system comprises:
the system comprises a program module 1, a display module and a control module, wherein the program module is used for running a preset program set and outputting a display interface of office software, and the program set is used for adding a first preset control and a second preset control in the display interface;
the first execution module 2 is used for responding to the operation of the user on the first preset control and logging in a test server for executing the functional test;
the first input module 3 is used for receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and relevant information of the open accounts;
and the second execution module 4 is configured to respond to an operation of the second preset control by the user, generate test data packets of a number matched with the number of the open accounts according to the number of the open accounts and the related information of the open accounts, and send the test data packets to the test server, so that the test server establishes test data.
Preferably, the first execution module includes:
the first selection unit is used for responding to the selection operation of the user on the first preset control and popping up a configuration window;
the configuration unit is used for receiving configuration data input by a user in the configuration window, and the configuration data is used for configuring login information and testing server addresses;
and the execution unit is used for responding to the click operation of the user on the determined button in the first preset control and logging in the test server according to the login information.
Preferably, the first input module includes:
the account configuration unit is used for receiving the number of the opened accounts input in the input unit by the user;
the first response unit is used for responding to the click operation of a preset program plug-in the display interface by a user and calling a preset input rule corresponding to the preset program plug-in;
and the account entry unit is used for automatically entering the related information of the opened account in the input unit according to the preset input rule.
Preferably, the second execution module includes:
the second response unit is used for responding to the selection operation of the user on the second preset control, analyzing the message in the transaction data packet and obtaining transaction related information;
the replacing unit is used for replacing the transaction related information with the related information of the open account;
the recombination unit is used for recombining the message containing the related information of the open account to obtain a test data packet;
and repeating the step of replacing the transaction related information with the related information of the open account number until the test data packets with the number matched with the number are generated.
Preferably, the display device further comprises a display module:
the display module is specifically used for receiving the opening account data packet returned by the test server, analyzing the opening account data packet and obtaining relevant information of opening data; screening the related information by using a preset script; and displaying the screened information at a preset position of the display interface by using a preset format.
It should be noted that, the test data generation system provided in the present invention may adopt one test data generation method in the foregoing embodiments to implement each step in the method embodiments, and reference may be made to each step in correspondence, which is not described herein again.
According to the technical scheme, compared with the prior art, the test data generation system disclosed by the invention responds to the operation of a user on the first preset control of office software, and logs in a test server for executing the functional test; receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and the related information of the open accounts; responding to the operation of a user on a second preset control of office software, automatically generating test data packets with the number matched with the number according to the number of the open accounts and the related information of the open accounts, and sending the test data packets to the test server to enable the test server to establish test data. Because the plurality of test preorders can be automatically acquired without manual operation of staff across systems, the efficiency of establishing test data is greatly improved, and the progress and the efficiency of upgrading and transforming functions are improved.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in an article or device that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A method for generating test data, comprising:
running a preset program set and outputting a display interface of office software, wherein the program set is used for adding a first preset control and a second preset control in the display interface;
responding to the operation of a user on the first preset control, and logging in a test server for executing the function test;
receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and the related information of the open accounts;
responding to the operation of a user on the second preset control, finding a message corresponding to a template, replacing information of a corresponding position in the message according to the number of the opened accounts and the related information of the opened accounts, generating test data packets with the number matched with the number, and sending the test data packets to the test server to enable the test server to establish test data;
the response user operates the second preset control, a message corresponding to a template is found, information of a corresponding position in the message is replaced according to the number of the open accounts and the related information of the open accounts, test data packets with the number matched with the number are generated and sent to the test server, and the test server establishes test data, wherein the test data comprises the following steps:
responding to the selection operation of the user on the second preset control, and analyzing a message in a pre-stored transaction data packet corresponding to the template to obtain transaction related information;
replacing the transaction related information with the related information of the opened account;
recombining the message containing the related information of the open account to obtain a test data packet;
according to the number of the open accounts, the step of replacing the transaction related information with the related information of the open accounts is repeated until test data packets with the number matched with the number are generated;
sending the test data packet to the test server to enable the test server to establish test data;
the responding to the operation of the user on the first preset control, and the logging in the test server comprises the following steps:
responding to the selection operation of the user on the first preset control, and popping up a configuration window;
receiving configuration data input by a user in the configuration window, wherein the configuration data is used for configuring login information and testing server addresses;
and responding to the click operation of the user on the determined button in the first preset control, and logging in the test server according to the login information.
2. The generation method according to claim 1, wherein the receiving test information input by a user in an input unit of the display interface comprises:
receiving the number of the opened accounts input in the input unit by a user;
responding to the click operation of a user on a preset program plug-in the display interface, and calling a preset input rule corresponding to the preset program plug-in;
and automatically inputting the related information of the opened account in the input unit according to the preset input rule.
3. The generation method according to any one of claims 1 to 2, characterized by further comprising:
receiving an opening account data packet returned by the test server, and analyzing the opening account data packet to obtain relevant information of opening data;
screening the related information by using a preset script;
and displaying the screened information at a preset position of the display interface by using a preset format.
4. A system for generating test data, comprising:
the system comprises a program module, a display module and a control module, wherein the program module is used for running a preset program set and outputting a display interface of office software, and the program set is used for adding a first preset control and a second preset control in the display interface;
the first execution module is used for responding to the operation of a user on the first preset control and logging in a test server for executing the functional test;
the first input module is used for receiving test information input by a user in an input unit of the display interface, wherein the test information at least comprises the number of open accounts and relevant information of the open accounts;
the second execution module is used for responding to the operation of a user on the second preset control, finding a message corresponding to a template, replacing information of a corresponding position in the message according to the number of the open accounts and the related information of the open accounts, generating test data packets with the number matched with the number, and sending the test data packets to the test server to enable the test server to establish test data;
wherein the second execution module comprises:
the second response unit is used for responding to the selection operation of the user on the second preset control, and analyzing the message in the pre-stored transaction data packet corresponding to the template to obtain transaction related information;
the replacing unit is used for replacing the transaction related information with the related information of the opened account;
the recombination unit is used for recombining the message containing the related information of the open account to obtain a test data packet;
according to the number of the open accounts, the step of replacing the transaction related information with the related information of the open accounts is repeated until test data packets with the number matched with the number are generated, and the test data packets are sent to the test server, so that the test server establishes test data;
the first execution module includes:
the first selection unit is used for responding to the selection operation of the user on the first preset control and popping up a configuration window;
the configuration unit is used for receiving configuration data input by a user in the configuration window, and the configuration data is used for configuring login information and testing server addresses;
and the execution unit is used for responding to the click operation of the user on the determined button in the first preset control and logging in the test server according to the login information.
5. The generation system of claim 4, wherein the first input module comprises:
the account configuration unit is used for receiving the number of the opened accounts input in the input unit by the user;
the first response unit is used for responding to the click operation of a preset program plug-in the display interface by a user and calling a preset input rule corresponding to the preset program plug-in;
and the account entry unit is used for automatically entering the related information of the opened account in the input unit according to the preset input rule.
6. The generation system according to any one of claims 4 to 5, further comprising a display module:
the display module is specifically used for receiving the opening account data packet returned by the test server, analyzing the opening account data packet and obtaining relevant information of opening data; screening the related information by using a preset script; and displaying the screened information at a preset position of the display interface by using a preset format.
CN201710549256.1A 2017-07-07 2017-07-07 Test data generation method and system Active CN107341109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710549256.1A CN107341109B (en) 2017-07-07 2017-07-07 Test data generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710549256.1A CN107341109B (en) 2017-07-07 2017-07-07 Test data generation method and system

Publications (2)

Publication Number Publication Date
CN107341109A CN107341109A (en) 2017-11-10
CN107341109B true CN107341109B (en) 2021-07-16

Family

ID=60218484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710549256.1A Active CN107341109B (en) 2017-07-07 2017-07-07 Test data generation method and system

Country Status (1)

Country Link
CN (1) CN107341109B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108388515B (en) * 2018-03-06 2020-09-29 平安科技(深圳)有限公司 Test data generation method, device, equipment and computer readable storage medium
CN110297754A (en) * 2018-03-23 2019-10-01 优信拍(北京)信息科技有限公司 A kind of test information feedback method and system
CN108427614B (en) * 2018-05-11 2021-05-18 中国银行股份有限公司 Interface testing method and device based on adaptor tool
TWI689191B (en) * 2019-01-31 2020-03-21 遊戲橘子數位科技股份有限公司 Clone game account establishing method and system thereof
CN110263316A (en) * 2019-06-27 2019-09-20 深圳前海微众银行股份有限公司 A kind of document handling method, device and computer equipment
CN112463577A (en) * 2019-09-09 2021-03-09 北京达佳互联信息技术有限公司 Sample data processing method and device and electronic equipment
CN111177005B (en) * 2019-12-31 2024-04-16 中国银行股份有限公司 Service application testing method, device, server and storage medium
CN112328466A (en) * 2020-09-16 2021-02-05 长沙市到家悠享家政服务有限公司 Test order generation method, equipment and storage medium
CN112817858B (en) * 2021-02-05 2024-04-19 深圳市世强元件网络有限公司 Method and computer equipment for batch generation of test data based on Jmeter
CN113094279A (en) * 2021-04-25 2021-07-09 深圳前海微众银行股份有限公司 Test data construction method, device and system and computer readable storage medium
CN113535574B (en) * 2021-07-26 2022-07-19 工银科技有限公司 Automatic generation method, device, equipment and medium for test user data
CN114371676A (en) * 2022-01-04 2022-04-19 苏州华兴源创科技股份有限公司 Multi-station detection equipment control method and device, computer equipment and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414935B (en) * 2008-07-09 2011-06-22 北京星网锐捷网络技术有限公司 Method and system for generating test case
JP5767471B2 (en) * 2010-12-24 2015-08-19 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Apparatus and method for evaluating test completeness
CN103164323B (en) * 2011-12-09 2016-12-07 深圳市腾讯计算机系统有限公司 Data auto-generation method and data automatic creation system
CN103699478A (en) * 2012-09-27 2014-04-02 中国银联股份有限公司 Test case generation system and test case generation method
CN103870381B (en) * 2012-12-10 2018-01-05 百度在线网络技术(北京)有限公司 A kind of test data generating method and device
CN103902456B (en) * 2014-04-09 2017-03-15 中国工商银行股份有限公司 Test script processing meanss, system and method
KR101689795B1 (en) * 2015-10-28 2016-12-26 아주대학교산학협력단 Method and system for detecting vulnerabilities of communication protocol software
CN105488014B (en) * 2015-11-27 2018-11-09 中国民生银行股份有限公司 The generation method and device of the interface testing case message of XML format
CN106897205B (en) * 2015-12-18 2021-01-05 创新先进技术有限公司 Test data generation method and device
CN106293740A (en) * 2016-08-10 2017-01-04 桐乡华锐自控技术装备有限公司 A kind of report form developing method being applied to PLC, DCS device data

Also Published As

Publication number Publication date
CN107341109A (en) 2017-11-10

Similar Documents

Publication Publication Date Title
CN107341109B (en) Test data generation method and system
CN107402880B (en) Test method and electronic equipment
CN109828903A (en) Automated testing method, device, computer installation and storage medium
CN111506444A (en) Form approval method and device, storage medium and electronic equipment
CN108846657A (en) A kind of method and relevant apparatus of Electronic Transfer
CN110096496A (en) A kind of form validation method, relevant apparatus and equipment
CN102571403A (en) Realization method and device for general data quality control adapter
CN110020381A (en) Method of calibration, device, equipment and computer storage medium based on configuration file
CN103324470A (en) Web system generation method and device
CN111221739A (en) Service testing method, device and system
CN109902017A (en) A kind of method and terminal based on RobotFramework test Dubbo interface
CN109343980B (en) Cloud copying and cloud pasting method, device, system, equipment and storage medium
CN102819767A (en) Complaining and suggesting system and method based on intelligent mobile communication equipment
CN110309051A (en) Method, system, equipment and the storage medium of management of test cases
CN108845940A (en) A kind of enterprise information system automated function test method and system
CN107896244A (en) A kind of distribution method of version file, client and server
CN107943600A (en) A kind of method and apparatus of tradomation processing
CN110309099A (en) Interface managerial method, device, equipment and computer readable storage medium
CN103246606A (en) Method and system for testing performances of ESB (enterprises service bus) platform
CN103200022B (en) A kind of data download abnormality eliminating method, equipment and system
CN107423223A (en) Test and management system
CN109828840A (en) Resource method of combination, device, storage medium and electronic equipment
CN110457202A (en) Quickly establish the TPC-E test method and actuator device of ODBC connection
CN106095886A (en) A kind of data processing method and device thereof
US20150236927A1 (en) Unified communication service deployment system

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