CN107832230B - Test method, equipment and system based on data tuning - Google Patents

Test method, equipment and system based on data tuning Download PDF

Info

Publication number
CN107832230B
CN107832230B CN201711261972.6A CN201711261972A CN107832230B CN 107832230 B CN107832230 B CN 107832230B CN 201711261972 A CN201711261972 A CN 201711261972A CN 107832230 B CN107832230 B CN 107832230B
Authority
CN
China
Prior art keywords
test
data
tuning
test data
testing
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
CN201711261972.6A
Other languages
Chinese (zh)
Other versions
CN107832230A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201711261972.6A priority Critical patent/CN107832230B/en
Publication of CN107832230A publication Critical patent/CN107832230A/en
Application granted granted Critical
Publication of CN107832230B publication Critical patent/CN107832230B/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/3688Test management for test execution, e.g. scheduling of test suites

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 provides a test method, equipment and a system based on data tuning, and relates to the field of automatic test of computer systems. The method comprises the steps that a scheduling device sends a test tuning instruction to a testing device; the testing device receives the testing tuning instruction and sends testing data request information to the data pool device according to the testing tuning instruction; the data pool device receives the test data request information and outputs test data corresponding to the test data request information according to the test data request information; the test device is also used for receiving the test data output by the data pool device and executing the test data. The invention realizes the automatic operation task of the automatic case and the optimization capability of the test data of the non-case operation time, and ensures the timely use of the test environment, thereby achieving the aim of improving the success rate of the automatic test case and overcoming the defect that the test data of the existing automatic test environment can not ensure the test.

Description

Test method, equipment and system based on data tuning
Technical Field
The invention relates to the field of automatic testing of computer systems, in particular to a testing method based on data tuning, a testing system based on data tuning, computer equipment and a computer readable storage medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the innovation and the change of financial services, bank IT needs to respond to business requirements quickly, the research and development period of projects is shorter and shorter, and the phenomenon of version overlapping is more and more obvious. In order to meet frequent changes of the demand, the test efficiency needs to be improved through an automation strategy, but the success rate of automated test data is often low, mainly because the automated case cannot be smoothly executed according to a predicted scheme due to uncertainty and change randomness of a test environment (including hardware, software, network equipment, test data and the like necessary for completing software test work) on which the automated case depends.
The test data in the test environment can be classified into two categories, one is the environmental parameters of the test environment, and the other is the service log in the test environment. Environmental parameters and service logs can frequently change in a test environment due to human reasons and interference of various test cases. Environmental parameter adjustments often manifest as manual modifications to the unit test that occur in pursuit of efficient testing, and adjustments to the business log manifest as uncertainties due to changes in the transaction log lifecycle. If the test is manual test, the case success rate can be promoted after manual adjustment when the case reports errors, but for an automatic test script, if the environmental parameters and the service logs captured by the case do not meet the case requirements, the case fails, and the case success rate is reduced.
In order to improve the success rate of cases, especially for automated cases, some research and development institutions often use a test environment data backup and recovery mechanism to recover test data such as environment parameters and service logs in a test environment to an expected state before the cases are executed.
Therefore, how to provide a new solution, which can solve the above technical problems, is a technical problem to be solved in the art.
Disclosure of Invention
In view of the above, the present invention provides a test method based on data tuning, a test system based on data tuning, a computer device and a computer readable storage medium, which support test data detection, implement automatic case operation task and non-case operation time test data tuning capability, and ensure timely availability of a test environment, thereby achieving the goal of improving the success rate of automatic test cases and overcoming the defect that the test data of the existing automatic test environment cannot ensure testability.
In order to achieve the above object, the present invention provides a test method based on data tuning, the method comprising:
the scheduling device sends a test tuning instruction to the testing device, wherein the test tuning instruction is used for triggering a test data to trigger the test data to run;
the testing device receives the testing tuning instruction and sends testing data request information to the data pool device according to the testing tuning instruction;
the data pool device receives the test data request information and outputs test data corresponding to the test data request information according to the test data request information;
the test device is also used for receiving the test data output by the data pool device and executing the test data.
In a preferred embodiment of the present invention, the method further comprises: downloading codes by a scheduling device, compiling the full codes, updating the codes to a target execution environment after the codes are compiled, checking an application environment, an external connection environment and a working date of the target execution environment, and loading a corresponding test script list;
constructing a test tuning instruction;
and recording corresponding execution log information when the script is executed, and displaying an execution result.
In a preferred embodiment of the present invention, the data pool device receiving the test data request information and outputting the test data corresponding to the test data request information according to the test data request information includes: and the data pool device receives the test data request information, retrieves from the test cache database according to the test data request information, outputs the test data when the test data corresponding to the test data request information is retrieved, and triggers the test data generation module to enable the test data generation module to create corresponding test data if the test data corresponding to the test data request information is not retrieved.
In a preferred embodiment of the present invention, the method further comprises: the scheduling device outputs a guarantee tuning instruction, and the guarantee tuning instruction is used for triggering a data guarantee device.
In a preferred embodiment of the present invention, the method further comprises:
and the data security device receives the guarantee tuning instruction, detects the test data in the test cache database according to an inspection strategy, and performs tuning processing on the test data of which the state does not meet the test requirement, wherein the inspection strategy comprises the states of detecting the service data, detecting the environment parameters and cleaning occupied data, and the tuning processing comprises service data tuning, environment data tuning and cache cleaning tuning.
One of the objectives of the present invention is to provide a test system based on data tuning, which comprises a scheduling device, a test device and a data pool device,
the scheduling device is used for sending a test tuning instruction to the testing device, wherein the test tuning instruction is used for triggering test data;
the testing device is used for receiving the testing tuning instruction and sending testing data request information to the data pool device according to the testing tuning instruction;
the data pool device is used for receiving the test data request information and outputting test data corresponding to the test data request information according to the test data request information;
the test device is also used for receiving the test data output by the data pool device and executing the test data.
In a preferred embodiment of the present invention, the scheduling apparatus includes:
the system comprises a preprocessing module, a target execution environment and a test script list, wherein the preprocessing module is used for downloading codes, compiling full codes, updating the codes to the target execution environment after the codes are compiled, checking the application environment, the external connection environment and the working date of the target execution environment, and loading the corresponding test script list;
the task scheduling module is used for constructing a test tuning instruction;
and the log output module is used for recording corresponding execution log information when the script is executed and displaying an execution result.
In a preferred embodiment of the present invention, the data pool device includes a resource module, a test cache database, and a test data generation module;
the resource module is configured to receive the test data request information, retrieve from the test cache database according to the test data request information, output the test data when the test data corresponding to the test data request information is retrieved, and trigger the test data generation module if the test data corresponding to the test data request information is not retrieved, so that the test data generation module creates corresponding test data.
In a preferred embodiment of the present invention, the system further includes a data support device, and the scheduling device is further configured to output a guarantee tuning instruction, where the guarantee tuning instruction is used to trigger the data support device.
In a preferred embodiment of the present invention, the data security apparatus includes a detection module and an execution module, where the detection module is configured to receive the security tuning instruction, detect test data in the test cache database according to a checking policy, and deliver the test data whose state does not meet the test requirement to the execution module for tuning, where the checking policy includes a state of detecting service data, a detection environment parameter, and a clearing occupied data;
the execution module is used for receiving test data with a state not meeting the test requirement and carrying out tuning and optimizing treatment, wherein the tuning and optimizing treatment comprises service data tuning and optimizing, environment data tuning and cache cleaning tuning and optimizing.
One of the objects of the present invention is to provide a computer device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data-tuning-based testing method when executing the computer program.
One of the objects of the present invention is to provide a computer readable storage medium storing a program for executing the data tuning-based test method.
The invention has the advantages that the invention provides the test method based on data tuning, the test system based on data tuning, the computer equipment and the computer readable storage medium, realizes the automatic operation task of the automatic case and the tuning capability of the test data of the non-case operation time, and ensures the timely use of the test environment, thereby achieving the aim of improving the success rate of the automatic test case and overcoming the defect that the test data of the existing automatic test environment can not ensure the testability.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
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 some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a test system based on data tuning according to an embodiment of the present invention;
fig. 2 is a block diagram of a scheduling apparatus in a test system based on data tuning according to an embodiment of the present invention;
fig. 3 is a block diagram of a data pool device in a test system based on data tuning according to an embodiment of the present invention;
fig. 4 is a block diagram of a second embodiment of a test system based on data tuning according to an embodiment of the present invention;
fig. 5 is a flowchart of a first embodiment of a test method based on data tuning according to an embodiment of the present invention;
fig. 6 is a flowchart of a second implementation manner of a test method based on data tuning according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a data-based tuning test system in accordance with an embodiment of the present invention;
FIG. 8 is a data tuning view in accordance with an embodiment of the present invention;
FIG. 9 is an internal schematic diagram of an execution module in an embodiment of the present invention;
FIG. 10 is a flow chart illustrating operation of the data pool apparatus in an embodiment of the present invention;
FIG. 11 is a flowchart illustrating operation of a data assurance device 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.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, method or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
In the prior art, in order to meet frequent changes of requirements, the test efficiency needs to be improved through an automation strategy, but the success rate of automated test data is often low, mainly because the automated case cannot be smoothly executed according to a predicted scheme due to uncertainty and change randomness of a test environment (including hardware, software, network equipment, test data and the like required for completing software test work) on which the automated case depends. Undoubtedly, the efficiency and quality of the test work can be improved through a well-planned and technically guaranteed test environment. Under the condition of limited human resources, relevant technical test tools and methods are required to be used for further detecting and maintaining the stability of testable data in a test environment, and the case success rate of business tests and automatic tests is improved.
In view of the above, the present invention provides a test method based on data tuning, a test system based on data tuning, a computer device, and a computer readable storage medium, which achieve the tuning capability of test data for automatic case running tasks and non-case running times, and ensure that a test environment is timely available, thereby achieving the goal of improving the success rate of automatic test cases, and overcoming the defect that test data in the existing automatic test environment cannot ensure testability.
Fig. 1 is a schematic structural diagram of a test system based on data tuning according to an embodiment of the present invention, and referring to fig. 1, the test system according to the present invention includes:
the scheduling device 1 is configured to send a test tuning instruction to the testing device, where the test tuning instruction is used to trigger a test datum. Fig. 2 is a block diagram of a scheduling apparatus, referring to fig. 2, the scheduling apparatus is used for implementing a scheduling process of an automated test task, and includes:
the preprocessing module 10 is configured to download a code, perform full code compilation, update the code to a target execution environment after the compilation is passed, check an application environment, an external connection environment, and a working date of the target execution environment, and load a corresponding test script list.
Specifically, the functions of the preprocessing module 1 include script checking, environment pre-judging, and script transferring functions. The preprocessing program firstly downloads the latest code from a source code management tool (Git) and carries out full-amount code compilation, and the code is updated to a target execution environment after the compilation is passed. And then checking the application environment, the external connection environment and the working date of the target execution environment. And finally, loading a corresponding test script list through a batch processing program.
And the task scheduling module 11 is used for constructing a test tuning instruction.
Specifically, the task scheduling module 11 may use a timed task mode, and call a TestNG command in the target through an Ant construction tool, so as to implement scheduling of an automatic test task.
And the log output module 12 is configured to record corresponding execution log information when the script is executed, and display an execution result.
Specifically, the log output module 12 may use log4j as a log recording frame, record corresponding execution log information when the script is executed, and display the execution result by combining with a webtesttools result plug-in of Jenkins.
Referring to fig. 1, the test system further includes:
and the testing device 2 is used for receiving the testing tuning instruction and sending testing data request information to the data pool device according to the testing tuning instruction.
In one embodiment of the present invention, as shown in fig. 7, the test apparatus 2 comprises a test case module 21 and a test report module 22. The test case module 21 is used to store actual test data. The written test data should interact with the data pool device using a specified interface. The test report module 22 is used for displaying the test result of the case after the test is completed, so that the tester can analyze the reason for the case failure.
In a specific embodiment, when the test case module of the test apparatus does not store the test data corresponding to the test tuning instruction, the test data request information is sent to the data pool apparatus, so that the data pool apparatus provides the test data, and after receiving the test data, the test apparatus first stores the test data in the test case module. When the test case module of the test device stores the test data corresponding to the test tuning instruction, the test can be directly performed.
The data pool device 3 is configured to receive the test data request information, and output test data corresponding to the test data request information according to the test data request information;
the testing device 2 is further configured to receive the test data output by the data pool device, and execute the test data.
The automatic test system based on data tuning, provided by the invention, unifies all case data entries aiming at the requirements of automatic case test data, supports the automatic scheduling test data detection and tuning functions, and realizes the testability of test environment data. In specific implementation, an automation script accumulated by TestNG (an automation testing framework comprising functional components such as interface testing, batch testing, mobile phone testing and the like) is used for realizing software compiling and deploying by Ant (an execution tool for linking steps such as software compiling, testing, deploying and the like), and then Jenkins (an open-source continuous integration tool developed based on Java) is used as a scheduling module to realize the test data optimization capacity during automatic case scheduling.
Fig. 3 is a block diagram of a data pool device, referring to fig. 3, the data pool device 3 includes a resource module 31, a test buffer database 32, and a test data generating module 33,
the resource module 31 is configured to receive the test data request information, retrieve from the test cache database 32 according to the test data request information, output the test data when the test data corresponding to the test data request information is retrieved, and otherwise trigger the test data generation module 33, so that the test data generation module creates corresponding test data.
That is, during the automated testing operation, the test case module 21 requests the resource module 31 for test case data by means of service invocation, and after receiving the test data request information, the resource module 31 first retrieves the test data meeting the requirements from the test cache database 32, and then the test data is returned to the test case module 21 by the resource module 31. If the test data does not meet the test requirements, the test data generation module 33 is triggered to create corresponding test data, and then the newly created test data is stored in the test cache database 32 and returned to the test case module 21 through the resource module 31.
In one embodiment of the present invention, the resource module 31 may include:
and the test data entry module is used for providing a standard data interface, is called by all test cases and is used as a test data unified entry. When all cases are run, the module is triggered to run first, and case data structure requirements are sent backwards.
And the operation strategy scheduling module is used for adapting to different case operation conditions, and case operation is divided into two modes of batch operation at night and single debugging in the daytime. When the system runs in batch, the data timeliness is high, the conflict is few, the target test data can be locked, a small amount of test data meeting the conditions is brought into the cache to provide case scheduling, and the case running efficiency is improved. The method has the advantages that single case debugging is realized in the daytime, the initiating time is flexible, the repeated case debugging has a large destructive effect on the test data, the case is not suitable for locking target test data, the test data can be retrieved from a database or provided for the case through a data generation module, a data recovery strategy and the like according to the requirement of the daily test data, and the flexibility of the test data is improved.
And the test data processing strategy module is used for providing different types of test data for the test case according to the upstream test data requirement, such as teller numbers, account data required by each transaction and the like.
And the test data caching module stores the used test data and the related case information in a form of cached data after the test data is provided upstream, so that the test data is prevented from colliding with the test data of other test cases.
And the test data command module is used for sending the test data meeting the conditions to the test case.
Fig. 4 is a block diagram of a second embodiment of a test system based on data tuning according to an embodiment of the present invention, referring to fig. 4, where the system further includes a data guarantee device 4, and the scheduling device 1 is further configured to output a guarantee tuning instruction, where the guarantee tuning instruction is used to trigger the data guarantee device.
In one embodiment of the present invention, as shown in FIG. 7, the data assurance device 4 comprises a detection module 41 and an execution module 42.
The detection module 41 is configured to receive the guarantee tuning instruction, detect test data in the test cache database according to a check policy, and deliver the test data whose state does not meet the test requirement to the execution module 42 for tuning, where the check policy includes a state of detecting service data, a detection environment parameter, and an occupied data cleaning;
the execution module 42 is configured to receive test data whose state does not meet the test requirement, and perform tuning and optimization processing, where the tuning and optimization processing includes service data tuning, environment data tuning, and cache cleaning tuning and optimization.
In one embodiment of the present invention, the detection module 41 is configured to periodically detect the status of the account data in the test cache database 32 and various environmental parameters in the test environment. Over time, some of the data in the test cache database 32 has not met the test requirements, such as: the existing account data is used by manual testers, partial transactions are executed or some configuration parameters are manually modified; in the manual testing process, time parameters such as a foreign exchange transaction related table or a working calendar are changed in order to achieve a certain testing scene; and when the integrated operation is continuously carried out, a large amount of teller information and account information are occupied and not released in time. After manual testing or automatic testing, the changed account parameters, environment parameters or cached account and teller information are often not recovered, so that the subsequent automatic case operation fails. The invention triggers the detection module 41 to operate through the scheduling device 1, and the detection module 41 detects the test data of the types one by one and restores the data to a correct state. The checking policy of the detecting module 41 includes detecting the state of the service data, detecting the environmental parameter, and clearing the occupied data, specifically:
A. and detecting the service data of which the states do not meet the test requirements. Such as:
1. account numbers with longer duration (account number parameters are abnormal);
2. checking account availability through the posting transaction;
3. the parameter of account re-entering is wrong;
4. the account number is wrong in the last financial transaction day;
B. detecting various environmental parameters meeting the test requirements, such as:
1. maintaining an account opening parameter table;
2. maintaining a foreign exchange application table such as a foreign exchange purchase price difference point number table, a foreign exchange transaction price difference point number change register, a transaction currency cycle switch table and the like;
3. maintaining accounting-related tables such as a floating balance posting timetable, a work calendar table and the like;
C. cleaning occupied data, such as:
1. account information that is already occupied;
2. the teller information that is already occupied.
The tuning process flow of the execution module 42 is shown in fig. 9. The execution module 42 receives the tuning instruction of the detection module 41, and tunes the test case data in the test cache database 32. And executing one or more of the tuning instructions such as service data tuning, environment data tuning, cache cleaning and the like by reading the switch setting condition of the tuning function in the configuration file, and displaying and storing a tuning log according to the result of the executed tuning.
The automatic test system based on data tuning, provided by the invention, unifies all case data entries aiming at the requirements of automatic case test data, supports the automatic scheduling test data detection and tuning functions, and realizes the testability of test environment data. Specifically, an automation script accumulated by TestNG (an automation testing framework comprising functional components such as interface testing, batch testing, mobile phone testing and the like) is implemented, Ant (an execution tool for linking steps such as software compiling, testing and deploying) is used for realizing software compiling and deploying, and then Jenkins (an open source continuous integration tool developed based on Java) is used as a scheduling module, so that the test data optimization capability during automatic case scheduling and the test environment and test optimization capability during non-automatic case running are realized.
The method supports two scene data tuning functions of case operation and non-case operation. When the case runs, the scheduling module 1 schedules the testing device 2 to run automatic testing work, obtains case data necessary for the case from the data pool device 3, and supports normal running of the testing case. During non-case operation, the data guarantee device 4 is started through the scheduling module 1 to maintain the test data of the data pool device 3, so that the accuracy of the test data used during the subsequent case operation is guaranteed.
The scheduling device 1 is used for implementing scheduling processing of an automated test task. One embodiment may use TESTING as an automated testing framework, Jenkins as a persistent integration environment, Git (distributed version control System) as a test script management tool, Ant (execution tool that links software compilation, testing, deployment, etc.) scripts to automate a series of operational steps, and Windows as a platform environment for executing automated test cases. When the scheduling device 1 runs, firstly, a runtime environment is initialized, and then, a corresponding automatic test task or a data assurance task is triggered according to the task type. The specific working steps of the above 2 tasks are provided by Ant scripts. After the task is completed, relevant logs and result output are provided by the continuous integration framework jenkins.
Fig. 8 is a data tuning view in an embodiment of the present invention, and as shown in fig. 8, in the test cache database, the account table is responsible for caching account data required by the test case. The table can distinguish test databases corresponding to different versions, and according to parameter information in the test case, such as account currency and account types, account numbers of corresponding types are extracted and returned to the test case.
The environmental information detail table is responsible for registering the name of the parameter table designed by the environmental parameters and the key parameter information, and is scheduled by the detection module 41 and the execution module 42 in the data security device 4 at regular time to detect whether the data of the environmental parameters meet the design requirements, if not, the accumulated scripts are scheduled to increase, modify and recover the parameter table and the key parameter information related to the environmental information detail table.
The case execution cache data is used for registering test data such as teller numbers and account numbers used by the cases when each case runs, and test data conflicts when the cases are concurrent can be avoided through the management of the table. The table is regularly checked and cleaned by the data assurance device 4.
The tables take the version number, the area code and the data type in each table as main keys, provide required test data for different test cases, register the environmental parameters and case execution logs from the test data, realize the centralized mode storage of the test data, and have the following characteristics:
(1) identifying multiple versions and multiple regions: the software version and the test area can be maintained respectively, and the requirements of an automation case on switching the software version at any time and on testing data when switching the test area at any time are met; (2) the data types are rich: taking account data as an example, simple current account number, checking account number and stock hook account number test data can be maintained through product types, and various overdraft agreements, agreement amount transfer agreements and other agreements can be generated by calling agreement cases. (3) The maintenance time is flexible: the accumulated script can be called regularly in advance to be generated, and can also be generated when the detection data is missing during the operation of the case. (4) The buffer mechanism avoids test data conflict: through a caching mechanism, the situation that the automatic cases compete for the same test resources is avoided.
Furthermore, although in the above detailed description several unit modules of the system are mentioned, this division is not mandatory only. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Also, the features and functions of one unit described above may be further divided into embodiments by a plurality of units. The terms "module" and "unit" used above may be software and/or hardware that realizes a predetermined function. While the modules described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
Having described the data-tuning-based test system of an exemplary embodiment of the present invention, a method of an exemplary embodiment of the present invention will now be described with reference to the accompanying drawings. The implementation of the method can be referred to the above overall implementation, and repeated details are not repeated.
Fig. 5 is a flowchart of a first embodiment of a test method based on data tuning according to an embodiment of the present invention, please refer to fig. 5, where the method includes:
s101: and the dispatching device sends a test tuning instruction to the testing device, wherein the test tuning instruction is used for triggering a test data to trigger the test data to run.
In one embodiment of the invention, the scheduler first downloads the latest code from the source code management tool (Git) and performs full code compilation, which updates the code to the target execution environment after compilation has passed. And then checking the application environment, the external connection environment and the working date of the target execution environment. And finally, loading a corresponding test script list through a batch processing program. A timed task mode can be adopted, and a TestNG command is called in the target through an Ant construction tool, so that the dispatching of an automatic test task is realized. Log4j can be used as a log recording frame, corresponding execution log information is recorded when a script is executed, and an execution result is displayed by combining a WebTestTool Results plug-in of Jenkins.
S102: and the testing device receives the testing tuning instruction and sends testing data request information to the data pool device according to the testing tuning instruction. In a specific embodiment, when the test case module of the test apparatus does not store the test data corresponding to the test tuning instruction, the test data request information is sent to the data pool apparatus, so that the data pool apparatus provides the test data, and after receiving the test data, the test apparatus first stores the test data in the test case module. When the test case module of the test device stores the test data corresponding to the test tuning instruction, the test can be directly performed.
S103: and the data pool device receives the test data request information and outputs test data corresponding to the test data request information according to the test data request information.
During the automated testing operation, the test case module 21 requests the resource module 31 for test case data by means of service invocation, and after receiving the test data request information, the resource module 31 first retrieves the test data meeting the requirements from the test cache database 32, and then the test data is returned to the test case module 21 by the resource module 31. If the test data does not meet the test requirements, the test data generation module 33 is triggered to create corresponding test data, and then the newly created test data is stored in the test cache database 32 and returned to the test case module 21 through the resource module 31.
S104: and the testing device receives the testing data output by the data pool device and executes the testing data.
The automatic test method based on data tuning, provided by the invention, unifies all case data entries aiming at the requirements of automatic case test data, supports the automatic scheduling test data detection and tuning functions, and realizes the testability of test environment data. In specific implementation, an automation script accumulated by TestNG (an automation testing framework comprising functional components such as interface testing, batch testing, mobile phone testing and the like) is used for realizing software compiling and deploying by Ant (an execution tool for linking steps such as software compiling, testing, deploying and the like), and then Jenkins (an open-source continuous integration tool developed based on Java) is used as a scheduling module to realize the test data optimization capacity during automatic case scheduling.
Fig. 6 is a flowchart of a second implementation manner of a test method based on data tuning, provided by an embodiment of the present invention, where the method includes:
s201: the scheduling device sends a test tuning instruction to the testing device, wherein the test tuning instruction is used for triggering a test data to trigger the test data to run;
s202: the testing device receives the testing tuning instruction and sends testing data request information to the data pool device according to the testing tuning instruction;
s203: the data pool device receives the test data request information and outputs test data corresponding to the test data request information according to the test data request information;
s204: and the testing device receives the testing data output by the data pool device and executes the testing data.
S205: the scheduling device outputs a guarantee tuning instruction, and the guarantee tuning instruction is used for triggering a data guarantee device.
S206: and the data security device receives the guarantee tuning instruction, detects the test data in the test cache database according to an inspection strategy, and performs tuning processing on the test data of which the state does not meet the test requirement, wherein the inspection strategy comprises the states of detecting the service data, detecting the environment parameters and cleaning occupied data, and the tuning processing comprises service data tuning, environment data tuning and cache cleaning tuning.
In an embodiment of the present invention, the detection module 41 in the data assurance device is configured to periodically detect the status of the account data in the test cache database 32 and various environmental parameters in the test environment. Over time, some of the data in the test cache database 32 has not met the test requirements, such as: the existing account data is used by manual testers, partial transactions are executed or some configuration parameters are manually modified; in the manual testing process, time parameters such as a foreign exchange transaction related table or a working calendar are changed in order to achieve a certain testing scene; and when the integrated operation is continuously carried out, a large amount of teller information and account information are occupied and not released in time. After manual testing or automatic testing, the changed account parameters, environment parameters or cached account and teller information are often not recovered, so that the subsequent automatic case operation fails. The invention triggers the detection module 41 to operate through the scheduling device 1, and the detection module 41 detects the test data of the types one by one and restores the data to a correct state. The checking strategy of the detection module 41 includes detecting the state of the traffic data, detecting environmental parameters, cleaning up occupied data.
The automatic test system based on data tuning, provided by the invention, unifies all case data entries aiming at the requirements of automatic case test data, supports the automatic scheduling test data detection and tuning functions, and realizes the testability of test environment data. Specifically, an automation script accumulated by TestNG (an automation testing framework comprising functional components such as interface testing, batch testing, mobile phone testing and the like) is implemented, Ant (an execution tool for linking steps such as software compiling, testing and deploying) is used for realizing software compiling and deploying, and then Jenkins (an open source continuous integration tool developed based on Java) is used as a scheduling module, so that the test data optimization capability during automatic case scheduling and the test environment and test optimization capability during non-automatic case running are realized.
The method supports two scene data tuning functions of case operation and non-case operation. When the case runs, the scheduling module 1 schedules the testing device 2 to run automatic testing work, obtains case data necessary for the case from the data pool device 3, and supports normal running of the testing case. During non-case operation, the data guarantee device 4 is started through the scheduling module 1 to maintain the test data of the data pool device 3, so that the accuracy of the test data used during the subsequent case operation is guaranteed.
The invention also provides computer equipment which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the data tuning-based test method.
The invention also provides a computer readable storage medium, which stores a test method for executing the data tuning.
The following describes the technical solution of the present invention in detail through specific embodiments provided by the present invention, in conjunction with the accompanying drawings of the present invention. Fig. 10 is a flowchart illustrating a working procedure of a data pool device according to an embodiment of the present invention, referring to fig. 10, in which:
step 1: and completing test data preparation work. According to the business test requirement, before the execution of the automatic test case, the use side of the device should: 1. defining a test case data type; 2. and acquiring test data used for the test by using a uniform case data acquisition interface.
Step 2: the case formally starts to be started, and the automatic case operation is triggered in a case scheduling mode (batch operation) or a manual operation mode (non-batch operation).
And step 3: the case operation triggers the resource module 31 to operate, and the test case basic information (such as teller, region, test case name, operation time, etc.) is cached in the test cache database 32, and the resource module 31 interacts with the test cache database 32 according to the test data model parameters transmitted by the user in the interface.
And 4, step 4: and testing whether the cache data has the required test data, if so, skipping to the step 6, and if not, skipping to the step 5.
And 5: if the data meeting the conditions exist, the data are taken out from the test cache database 32 and sent to the test case, and the step 6 is skipped; otherwise, the test data generation module 33 is triggered to generate the required case data. The test data generation module 33 writes the new data into the test cache database 32 after generating the new test data, and simultaneously returns the new data to the test case; jumping to the step 3;
step 6: receiving test data and executing cases: and the test cache database returns correct test data to the test case to support the normal termination of the test case.
FIG. 11 is a flowchart illustrating the operation of a data assurance device in an embodiment of the present invention, including the following steps:
and 7: preparation work: before the data security device is started, a user of the device firstly designs corresponding parameter maintenance functions aiming at business data parameters, environment parameters, cache type information and the like.
And 8: the data security device can run according to preset time or requirements by configuring Jenkins operation and setting a timing trigger or manual trigger mode.
And step 9: the detection module 41 interacts with the test cache database 32 through the designed parameter maintenance script, searches for data meeting the conditions, and returns the detection result to the detection module 41.
Step 10: the detection module 41 receives the detection result and sends a parameter maintenance instruction, and the execution module 42 generates a corresponding parameter maintenance instruction according to the received detection result and sends the maintenance instruction to the test cache database 32, thereby achieving the purpose of test parameter maintenance.
Step 11: and (3) parameter maintenance result display: and after the parameter maintenance is finished, generating a parameter maintenance log, and informing the user of the device of the parameter maintenance result in a mail mode.
Through the steps 1 to 11, the automatic test data tuning method provided by the embodiment of the invention can automatically create various types of information, such as customer information and account data, required by a service test, realize automatic detection and cleaning, and ensure the effectiveness of the test data and the stability and integrity of frequently-changed environmental parameters depended on. The account data stored in the invention is relatively independent and convenient to manage, so that the test data from the automatic case is accurate and effective, and the success rate of the case is ensured.
The effects and advantages of the invention include:
by implementing the method and the device, the key parameter information in the test management database can be generated in advance and detected regularly, and the execution success rate of the subsequent automatic cases is improved.
By implementing the invention, the test data to be tuned is planted in the service test database, but the tuning target is clear through independent tracking and management of the independent test data management database.
By implementing the invention, partial test environment data can be maintained only according to the requirements of the test cases, and the whole optimization of the test environment inventory data is not needed, thereby improving the efficiency of environment maintenance.
By implementing the invention, the success rate of the test case can be automated, and the manual test can be assisted to improve the daily test efficiency.
By implementing the method, the environment preparation and detection before the implementation of the automatic case are met, and the method can be repeatedly called to carry out environment cleaning on the standard error report after the execution of the automatic case until the case succeeds.
By implementing the invention, the beneficial effects are not limited to the account data and the related environment parameters mentioned in the example, and the invention can be applied to different industry test data and environment preparations (files, directories, databases and tables).
Improvements to a technology can clearly be distinguished between hardware improvements (e.g. improvements to the circuit structure of diodes, transistors, switches, etc.) and software improvements (improvements to the process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardbyscript Description Language (vhr Description Language), and the like, which are currently used by Hardware compiler-software (Hardware Description Language-software). It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: the ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of software products, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer system (which may be a personal computer, a server, or a network system, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable systems, tablet-type systems, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics systems, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or systems, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing systems that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage systems.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (6)

1. A test system based on data tuning is characterized in that the system comprises a scheduling device, a test device and a data pool device,
the scheduling device is used for sending a test tuning instruction to the testing device, wherein the test tuning instruction is used for triggering test data;
the testing device is used for receiving the testing tuning instruction and sending testing data request information to the data pool device according to the testing tuning instruction;
the data pool device is used for receiving the test data request information and outputting test data corresponding to the test data request information according to the test data request information; the data pool device comprises: testing the cache database;
the test device is also used for receiving the test data output by the data pool device and executing the test data; wherein, the testing arrangement includes: the test case module and the test report module; the test case module interacts with the data pool device through a designated interface and is used for receiving and storing the test data; the test report module is used for displaying the test specific result of the case after the test data is executed;
the system also comprises a data guarantee device, the scheduling device is also used for outputting a guarantee tuning instruction, and the guarantee tuning instruction is used for triggering the data guarantee device;
the data security device comprises a detection module and an execution module,
the detection module is used for receiving the guarantee tuning instruction, detecting test data in the test cache database according to a check strategy, and delivering the test data of which the state does not meet the test requirement to the execution module for tuning, wherein the check strategy comprises the states of detecting service data, detecting environment parameters and clearing occupied data;
the execution module is used for receiving test data with a state not meeting the test requirement and carrying out tuning and optimizing treatment, wherein the tuning and optimizing treatment comprises service data tuning and optimizing, environment data tuning and cache cleaning tuning and optimizing.
2. The system of claim 1, wherein said scheduling means comprises:
the system comprises a preprocessing module, a target execution environment and a test script list, wherein the preprocessing module is used for downloading codes, compiling full codes, updating the codes to the target execution environment after the codes are compiled, checking the application environment, the external connection environment and the working date of the target execution environment, and loading the corresponding test script list;
the task scheduling module is used for constructing a test tuning instruction;
and the log output module is used for recording corresponding execution log information when the script is executed and displaying an execution result.
3. The system of claim 2, wherein the data pool device further comprises a resource module, a test data generation module,
the resource module is configured to receive the test data request information, retrieve from the test cache database according to the test data request information, output the test data when the test data corresponding to the test data request information is retrieved, and trigger the test data generation module if the test data corresponding to the test data request information is not retrieved, so that the test data generation module creates corresponding test data.
4. A method for performing data-based tuning testing in accordance with the system of any one of claims 1 to 3, the method comprising:
the scheduling device sends a test tuning instruction to the testing device, wherein the test tuning instruction is used for triggering a test data to trigger the test data to run;
the testing device receives the testing tuning instruction and sends testing data request information to the data pool device according to the testing tuning instruction;
the data pool device receives the test data request information and outputs test data corresponding to the test data request information according to the test data request information;
the test device receives the test data output by the data pool device and executes the test data; the test case module of the test device interacts with the data pool device through a designated interface, and receives and stores the test data; a test report module of the test device displays a test specific result of the case after the test data is executed;
the scheduling device outputs a guarantee tuning instruction, and the guarantee tuning instruction is used for triggering a data guarantee device;
the data security device receives the guarantee tuning instruction, detects test data in the test cache database according to an inspection strategy, and performs tuning processing on the test data of which the state does not meet the test requirement, wherein the inspection strategy comprises the states of detecting service data, detecting environment parameters and cleaning occupied data, and the tuning processing comprises service data tuning, environment data tuning and cache cleaning tuning.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of claim 4 when executing the computer program.
6. A computer-readable storage medium storing a computer program for executing the method of claim 4.
CN201711261972.6A 2017-12-04 2017-12-04 Test method, equipment and system based on data tuning Active CN107832230B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711261972.6A CN107832230B (en) 2017-12-04 2017-12-04 Test method, equipment and system based on data tuning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711261972.6A CN107832230B (en) 2017-12-04 2017-12-04 Test method, equipment and system based on data tuning

Publications (2)

Publication Number Publication Date
CN107832230A CN107832230A (en) 2018-03-23
CN107832230B true CN107832230B (en) 2021-01-01

Family

ID=61641365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711261972.6A Active CN107832230B (en) 2017-12-04 2017-12-04 Test method, equipment and system based on data tuning

Country Status (1)

Country Link
CN (1) CN107832230B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763093A (en) * 2018-06-01 2018-11-06 政采云有限公司 A kind of automated testing method and system
CN109828904A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 System Authentication method, device, electronic equipment and storage medium
CN111506490A (en) * 2019-01-31 2020-08-07 上海哔哩哔哩科技有限公司 Automatic test method and device for application service interface and storage medium
CN110399309B (en) * 2019-08-02 2023-11-03 中国工商银行股份有限公司 Test data generation method and device
CN111045928B (en) * 2019-11-14 2024-03-26 用友网络科技股份有限公司 Interface data testing method, device, terminal and storage medium
CN112181809B (en) * 2020-09-14 2024-06-11 麒麟软件有限公司 Graphic user interface automatic test method based on multiple positioning methods
CN112783773B (en) * 2021-01-25 2024-02-06 中国工商银行股份有限公司 Automatic software testing method and device
CN113407445B (en) * 2021-06-03 2022-11-22 拉扎斯网络科技(上海)有限公司 End-to-end automatic testing method and device and electronic equipment
CN113778887B (en) * 2021-09-16 2022-07-22 厦门理工学院 Software testing device and software testing method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118550A (en) * 2007-09-04 2008-02-06 山东浪潮齐鲁软件产业股份有限公司 Application data quality detecting method
CN102594607A (en) * 2012-03-13 2012-07-18 北京邮电大学 Telecommunication application service security test and evaluation universal platform system and method thereof
CN103605571A (en) * 2013-11-20 2014-02-26 国家电网公司 Control method of database connection pool
WO2014066798A3 (en) * 2012-10-26 2014-06-26 The Johns Hopkins University Method and system for treating a disease using combined radiopharmaceuticals
WO2016043764A1 (en) * 2014-09-19 2016-03-24 Boneta Sebastian Method for enhancing memory skills
CN106294128A (en) * 2016-07-25 2017-01-04 合网络技术(北京)有限公司 A kind of automated testing method deriving report data and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100451989C (en) * 2007-04-20 2009-01-14 北京航空航天大学 Software testing system and testing method
CN101576849A (en) * 2008-05-09 2009-11-11 北京世纪拓远软件科技发展有限公司 Method for generating test data
CA2775162C (en) * 2011-04-18 2016-12-13 Accenture Global Services Limited Test data supply chain manager for an integrated testing platform
US20150227452A1 (en) * 2014-02-12 2015-08-13 Wipro Limited System and method for testing software applications
CN103793530A (en) * 2014-02-26 2014-05-14 北京京东尚科信息技术有限公司 Method, device and system for cleaning up business data regularly
US10055340B2 (en) * 2015-06-10 2018-08-21 International Business Machines Corporation Dynamic test topology visualization
CN105224408A (en) * 2015-09-22 2016-01-06 小米科技有限责任公司 Data clearing method, Apparatus and system
US20170185646A1 (en) * 2015-12-29 2017-06-29 Cognizant Technology Solutions India Pvt. Ltd. System and method for providing a framework having a query building logic
CN107341081A (en) * 2017-07-07 2017-11-10 北京奇虎科技有限公司 Test system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118550A (en) * 2007-09-04 2008-02-06 山东浪潮齐鲁软件产业股份有限公司 Application data quality detecting method
CN102594607A (en) * 2012-03-13 2012-07-18 北京邮电大学 Telecommunication application service security test and evaluation universal platform system and method thereof
WO2014066798A3 (en) * 2012-10-26 2014-06-26 The Johns Hopkins University Method and system for treating a disease using combined radiopharmaceuticals
CN103605571A (en) * 2013-11-20 2014-02-26 国家电网公司 Control method of database connection pool
WO2016043764A1 (en) * 2014-09-19 2016-03-24 Boneta Sebastian Method for enhancing memory skills
CN106294128A (en) * 2016-07-25 2017-01-04 合网络技术(北京)有限公司 A kind of automated testing method deriving report data and device

Also Published As

Publication number Publication date
CN107832230A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN107832230B (en) Test method, equipment and system based on data tuning
JP5970617B2 (en) Development support system
US9734043B2 (en) Test selection
US8645326B2 (en) System to plan, execute, store and query automation tests
US8813035B2 (en) Paradigm for concurrency testcase generation
US9712418B2 (en) Automated network control
US8145944B2 (en) Business process error handling through process instance backup and recovery
US20080010535A1 (en) Automated and configurable system for tests to be picked up and executed
US9811441B2 (en) Method and system for detecting memory leaks in a program
CN111125444A (en) Big data task scheduling management method, device, equipment and storage medium
CN1755648A (en) Method, system, and apparatus for identifying unresponsive portions of a computer program
US20140365833A1 (en) Capturing trace information using annotated trace output
US20080244592A1 (en) Multitask processing device and method
CN103180827A (en) Device and method for executing task files in a game server
CN109558318B (en) Code management method and code warehouse distributed system
CN109144534A (en) Service module dynamic updating method, device and electronic equipment
Ananthanarayanan et al. Keeping master green at scale
CN111324426A (en) ORACLE database task job management scheduling system and method
CN115840691A (en) Remote repair of crash processes
Ehlers Self-adaptive performance monitoring for component-based software systems
US9405636B2 (en) Recovering step and batch-based processes
JP4997144B2 (en) Multitask processing apparatus and method
CN112749156A (en) Data processing method, database management system and data processing equipment
CN112200536B (en) Test case monitoring management method, terminal equipment and storage medium
Höger Fault tolerance in parallel data processing systems

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