CN112115058B - Test method and device, test case generation method and device and test system - Google Patents

Test method and device, test case generation method and device and test system Download PDF

Info

Publication number
CN112115058B
CN112115058B CN202011022409.5A CN202011022409A CN112115058B CN 112115058 B CN112115058 B CN 112115058B CN 202011022409 A CN202011022409 A CN 202011022409A CN 112115058 B CN112115058 B CN 112115058B
Authority
CN
China
Prior art keywords
data
test
configuration
case
sub
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
CN202011022409.5A
Other languages
Chinese (zh)
Other versions
CN112115058A (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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202011022409.5A priority Critical patent/CN112115058B/en
Publication of CN112115058A publication Critical patent/CN112115058A/en
Application granted granted Critical
Publication of CN112115058B publication Critical patent/CN112115058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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
    • 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 embodiment of the specification discloses a test method and device, a test case generation method and device and a test system, wherein the test method comprises the steps of receiving a test request of a target service system; acquiring a test data configuration case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, and execution times and/or execution time duration of each data configuration sub-case; and testing the processing performance of the target service system based on the test data configuration use case to obtain a test result of the target service system. By utilizing the embodiments of the specification, the simplicity and the testing efficiency of test data preparation used for testing the service system can be improved.

Description

Test method and device, test case generation method and device and test system
Technical Field
The present disclosure relates to the field of computer data processing technologies, and in particular, to a testing method and apparatus, a test case generating method and apparatus, and a testing system.
Background
Before the system is formally released to the outside, the processing capacity of the verification system is an important part of software testing work, and a pressure testing tool can be used for simulating actual business data concurrency to test the performance of the system. In the system performance test, the reality of production is simulated as much as possible by using a large amount of various test data. The generation and use of test data is a very critical link.
The tester typically needs to know the test context, analyze the test scope, specify the fields in the test script that need to be parameterized, and prepare the SQL statement that extracts the test data. Writing SQL statements also typically requires familiarity with knowing the database table structure involved, etc. After the work is ready, the tester is connected with the system database through the database client, executes the SQL sentence, and manually exports the execution result into the data file. When the test script is developed, the data file prepared in advance is associated with the script, and the use strategy of the parameters is set, so that the links of test data generation and use are completed.
Therefore, in the current links of test data generation and use, when each time of accurate test data, a tester needs to spend a great deal of time to familiarize and understand each link to be executed and the configuration information type, execution mode and the like of each link, and then, information configuration and association of relevant links are carried out for testing, so that the test data preparation is complex and complicated, the efficiency is lower, and the overall test efficiency is lower. Therefore, a more efficient and accurate test method is needed.
Disclosure of Invention
An object of an embodiment of the present disclosure is to provide a testing method and apparatus, a test case generating method and apparatus, and a testing system, which can improve testing efficiency of a service system.
The specification provides a test method and device, a test case generation method and device, and a test system, which are realized in the following ways:
a test method applied to a server of a test system, the method comprising: receiving a test request of a target service system; acquiring a test data configuration case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, and execution times and/or execution time duration of each data configuration sub-case; and testing the processing performance of the target service system based on the test data configuration use case to obtain a test result of the target service system.
In other embodiments of the method provided in the present specification, the data configuration sub-use case includes at least one of a data preparation sub-use case, a data cleaning sub-use case, a data resetting sub-use case, a data generating sub-use case, a data use sub-use case, and a result statistics sub-use case.
In other embodiments of the methods provided herein, the test generation sub-use cases include a static data generation sub-use case and a dynamic data generation sub-use case; the static data generation sub-use case comprises data generation configuration information corresponding to the repeatedly used test data; the dynamic data generation sub-use case comprises data generation configuration information corresponding to the real-time test data.
In other embodiments of the methods provided herein, the test data configuration cases in the test case database are generated by: obtaining an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; receiving the parameter configuration information of the data configuration sub-use cases corresponding to the selection operation in the information configuration frame by a user in the use case configuration template; and generating a test data configuration case based on the parameter configuration information of the data configuration sub case corresponding to the selection operation.
In other embodiments of the method provided in the present disclosure, the obtaining a test data configuration case corresponding to the test request includes: the historical test data configuration case corresponding to the target service system is called from a test case database; and determining the test data configuration case corresponding to the test request according to the called historical test data configuration case.
In other embodiments of the methods provided herein, the test request includes a use case version identification and/or a system version identification; correspondingly, the calling the historical test data configuration case corresponding to the target service system comprises the following steps: and calling the historical test data configuration use cases corresponding to the use case version identifiers and/or the system version identifiers.
In other embodiments of the methods provided herein, the test data configuration use case is generated in the following manner: receiving database connection information configured in a data preparation sub-use case; receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file; receiving use policy script information of a data record in the use data file configured in a data use sub-use case; and generating test data configuration cases corresponding to the static data based on the database connection information, the database operation information, the operation result record script information and the strategy script information.
In other embodiments of the methods provided herein, the database operation information includes SQL statement types and corresponding SQL statements.
In other embodiments of the methods provided herein, the test data configuration use case is generated in the following manner: receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case; receiving dynamic data generation and recorded script information configured in a data generation sub-use case; receiving the use policy script information of the dynamic data record configured in the data use sub-use case; and generating test data configuration use cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information.
In another aspect, embodiments of the present disclosure further provide a testing apparatus, applied to a server of a testing system, including: the test request receiving module is used for receiving a test request of the target service system; the case acquisition module is used for acquiring a test data configuration case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, and execution times and/or execution time duration of each data configuration sub-case; and the test execution module is used for testing the processing performance of the target service system based on the test data configuration use case to obtain a test result of the target service system.
On the other hand, the embodiment of the specification also provides a test case generation method, which is applied to a server of a test system, and comprises the following steps: receiving a test case generation request sent by a test terminal; obtaining an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; the parameter type at least comprises execution time sequence among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases; the use case configuration template is sent to the test terminal so that the test terminal can display the use case configuration template; receiving the parameter configuration information of the data configuration sub-use case corresponding to the selection operation, which is fed back by the test terminal, of the user in the use case configuration template; and generating a test data configuration case based on the parameter configuration information of the data configuration sub case corresponding to the selection operation.
On the other hand, the embodiment of the specification also provides a test case generating device, which is applied to a server of a test system, and comprises: the generation request receiving module is used for receiving a test case generation request sent by the test terminal; the template acquisition module is used for acquiring an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; the parameter type at least comprises execution time sequence among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases; the template sending module is used for sending the use case configuration template to the test terminal; the information receiving module is used for receiving the selection operation of the data configuration sub-use cases in the use case configuration template and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation, which are fed back by the test terminal; the case generation module is used for generating a test data configuration case based on the data configuration sub case corresponding to the selection operation and the parameter configuration information of the data configuration sub case corresponding to the corresponding selection operation.
On the other hand, the embodiment of the specification also provides a test case generating method, which is applied to a test terminal of a test system, and comprises the following steps: sending a test case generation request to a server; receiving a use case configuration template sent by the server and displaying the use case configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; and receiving the selection operation of the data configuration sub-use cases in the use case configuration template by the user and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation, and feeding back to the server, so that the server generates the test data configuration use cases based on the data configuration sub-use cases corresponding to the selection operation and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation.
On the other hand, the embodiment of the specification also provides a test case generating device, which is applied to a test terminal of a test system, and the device comprises: the request sending module is used for sending a test case generation request to the server; the template receiving module is used for receiving the use case configuration template sent by the server; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the template display module is used for displaying the use case configuration template; the operation receiving module is used for receiving the selection operation of the data configuration sub-use cases in the use case configuration template and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation by a user, and feeding back the parameter configuration information to the server, so that the server generates the test data configuration use cases based on the data configuration sub-use cases corresponding to the selection operation and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation.
On the other hand, the embodiment of the specification also provides a test system, which comprises a server and a test terminal; wherein the server comprises at least one processor and a memory for storing processor-executable instructions that, when executed by the processor, perform steps comprising the method of any one or more of the embodiments described above; the test terminal comprises at least one processor and a memory for storing processor-executable instructions which, when executed by the processor, perform the steps of the method of any one or more of the embodiments described above.
According to the test method and device, the test case generation method and device and the test system provided by one or more embodiments of the present disclosure, each sub-link of the test data configuration may be packaged independently in advance, and be used as different sub-cases, and parameters such as execution time sequence, execution times and/or execution duration of each sub-case are configured. The user can select the corresponding sub-cases and configure the execution time sequence, the execution times and/or the execution time length and other parameter information of each sub-case according to the requirements of the test scene, and simply and effectively configure the execution parameter information and the execution sequence information of the sub-cases to obtain the test data configuration case for test data generation and use. In the execution process, the use cases can be configured based on the pre-configured test data, so that the generation and the use of the test data can be efficiently and orderly completed, and the test efficiency is improved. Meanwhile, the pre-configured test data configuration use cases or the test data configuration use cases used in executing the test can be stored in a database to form test data assets, so that the test data assets can be reused directly or simply adjusted for use in the subsequent test, the workload of test data configuration is greatly reduced, and the test simplicity and the test efficiency are improved.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic diagram of an example of test data configuration in some embodiments provided herein;
FIG. 2 is a schematic diagram of a use case configuration template in some embodiments provided herein;
FIG. 3 is a schematic diagram of test data generation supporting multiprotocol amount in some embodiments provided herein;
FIG. 4 is a diagram of a JDBC connection configuration in some embodiments provided herein;
FIG. 5 is a diagram of JDBC request configuration in some embodiments provided herein;
FIG. 6 is a schematic diagram of a BeanShell sampler in some embodiments provided herein;
FIG. 7 is a schematic diagram of a real-time dynamic data generation script in some embodiments provided herein;
FIG. 8 is a schematic diagram of a usage script for real-time dynamic data in some embodiments provided herein;
FIG. 9 is a schematic diagram of test data asset formation and use in some embodiments provided herein;
FIG. 10 is a flow chart of an embodiment of a testing method provided in the present disclosure;
FIG. 11 is a schematic block diagram of a testing device according to the present disclosure;
FIG. 12 is a schematic flow chart of an embodiment of a test case generating method provided in the present specification;
fig. 13 is a schematic flow chart of an embodiment of a test case generating method provided in the present specification.
Detailed Description
In order that those skilled in the art will better understand the technical solutions in this specification, a clear and complete description of the technical solutions in one or more embodiments of this specification will be provided below with reference to the accompanying drawings in one or more embodiments of this specification, and it is apparent that the described embodiments are only some embodiments of the specification and not all embodiments. All other embodiments, which may be made by one or more embodiments of the disclosure without undue effort by one of ordinary skill in the art, are intended to be within the scope of the embodiments of the disclosure.
In one application scenario example of the present specification, the test method may be applied to a test system. The test system may comprise a server or a cluster of servers. The test system may correspond to a test case database. The test case database may be used to store built test data configuration cases. The test data configuration case may refer to a test data configuration frame constructed when a specific target service system is tested, so that generation and use of test data are realized based on the test data configuration frame when the test is executed, and the test is completed. The constructed test data configuration use cases can be test data configuration use cases constructed by historical test scenes, or test data configuration use cases specially configured by related business personnel based on the current test scenes. In some embodiments, the test data configuration use cases may be stored according to a system identification of the target business system.
The test data configuration use case may include parameter configuration information of a plurality of data configuration sub-use cases. The data configuration sub-use case is used for representing different sub-links in the test data configuration process. The parameter configuration information at least can comprise execution time sequences among a plurality of data configuration sub-use cases, execution times and/or execution time duration of each data configuration sub-use case and the like. The execution sequence may refer to information characterizing an execution sequence of the data configuration sub-use case in a test execution process.
In some embodiments, the data preparation sub-use case, the data cleaning sub-use case, the data resetting sub-use case, the data generating sub-use case, the data using sub-use case, the result statistics sub-use case and the like in the test process can be respectively packaged as separate sub-links by analyzing the data management process of the test tool based on the concurrent test of the test system.
Correspondingly, a tester can select the data configuration sub-cases based on the requirement, and configure the execution time sequence among the selected data configuration sub-cases, the execution test and/or the execution time length of each data configuration sub-case and other parameters, so that each data configuration sub-case is simply and effectively associated, the automatic and effective execution of each sub-link is ensured, and the final test data configuration case is formed. In the test execution process, the execution links of the test data configuration use cases are not required to be manually combed, and the accuracy, the simplicity and the high efficiency of data generation and use in the test execution process are ensured.
As shown in fig. 1, the data preparation, data cleaning, data resetting, data generation, data use and data statistics are organized to form respective test data configuration cases, which can be arranged into a test scene together with other test cases requiring test data use, and the execution time sequence, execution times or execution duration of each test data configuration case are formulated to manage and maintain the whole life cycle of the test data.
The data preparation sub-use case can comprise business logic of data preparation and various parameter information generated by test data, such as server information, SQL sentences, HTTP request information and other databases or associated equipment connection information.
The data cleaning sub-cases are generally executed in batch before test execution, and data cleaning actions generated in the past test execution process are executed to prepare a clean environment for the test execution in advance.
Because some test data can only be used once, the state of the batch of data needs to be reset for use when the test data is re-run again, and the reset is usually performed once before each test is executed.
The data generation sub-use cases may include a static data generation sub-use case and a dynamic data generation sub-use case for generating two types of test data: testing static data and testing dynamic data. The static data generation sub-use case comprises data generation configuration information corresponding to the repeatedly used test data. The dynamic data generation sub-use case comprises data generation configuration information corresponding to the real-time test data. Static data is well defined prior to test execution, and its contents are unchanged and reusable throughout the test execution period, typically being generated only once. The dynamic data is real-time data continuously generated in the test execution process, the content of the dynamic data is dynamically changed, and the dynamic data is repeatedly generated until the execution of the whole test scene is finished. The form of static data is generally a file, and the form of real-time dynamic data is generally a variable.
The data use sub-cases, the specific data used for testing is generally the service data in the typical service scene of the system, the data parameterization script can be configured, and the generated static data file or real-time dynamic data is subjected to field association with other test cases using the test data in the script. The test can be directly used by reading the data value according to the preset data parameterization script.
The result statistics sub-use cases are generally executed after the scene execution is finished. In particular, statistics of test results for some asynchronously executed test data configuration cases. In general, the pressure test tool cannot display visual test results, and the correctness of the test results, the asynchronous execution efficiency and the like can be verified by carrying out statistical analysis on test result data corresponding to corresponding test data.
In other embodiments, the test data configuration cases in the test case database may be generated in the following manner. After receiving the test request sent by the test terminal, the server of the test system can acquire the use case configuration template. The use case configuration template may include a child use case selection field and a parameter information configuration field. The child case selection field may include a plurality of data configuration child cases. The parameter information configuration column may include a parameter type corresponding to each data configuration sub-use case and an information configuration frame of each parameter.
The server of the test system may send the use case configuration template to the test terminal. The test terminal may present the use case configuration template to the user. The user can operate the data configuration sub-use cases and the information configuration boxes of the parameters in the use case configuration template. The operations may include, for example, selecting a data configuration sub-use case, entering parameter configuration information, and the like.
The test system can receive the selection operation of the data configuration sub-use case in the use case configuration template and the parameter configuration information of the data configuration sub-use case corresponding to the corresponding selection operation, which are fed back by the test terminal. Then, the test data configuration case can be generated based on the data configuration sub case corresponding to the selection operation and the parameter configuration information of the data configuration sub case corresponding to the corresponding selection operation.
In some embodiments, common test data generation and use processes may be carded in advance, and a plurality of separable sub-links may be extracted, and then, the sub-links may be respectively packaged to form a data configuration sub-use case frame. Then, the case configuration template can be constructed based on the parameters of the needed configuration and the parameters of the needed configuration of the data configuration case instantiation among the data configuration case frameworks. As shown in fig. 2, fig. 2 shows a schematic diagram of a use case configuration template. Referring to fig. 2, the case configuration template may include a child case selection field and a parameter information configuration field. A plurality of data configuration sub-cases are provided in the sub-case selection field. The parameter information configuration column gives the configuration parameters corresponding to each data configuration sub-use case. The tester can configure the data configuration sub-use cases and the parameter configuration information corresponding to the data configuration sub-use cases according to the requirements.
The case configuration templates may be pre-stored in a test case database. After receiving the test data configuration case generation requirement sent by the test personnel through the test terminal, the server of the test system can call the case configuration template from the test case database and feed the case configuration template back to the test terminal for display. The tester can operate on the child case selection field and the parameter information configuration field of the case configuration template. For example, a data configuration sub-use case may be selected, and correspondingly, the parameter information configuration column may correspondingly display parameter information to be configured corresponding to the data configuration sub-use case. The parameter information to be configured can include parameters such as execution time sequence, execution times, execution time length and the like of the data configuration sub-use case. Further, other parameter information may be associated with the data configuration sub-use case according to the difference. Referring to fig. 2, the parameter information configuration column in fig. 2 shows the parameter information to be configured corresponding to the data statistics sub-use case. The tester can select or input the configuration information corresponding to each configuration parameter according to the requirement, and the parameter items without the configuration information can be set to be empty.
In one scenario example, referring to fig. 2, in a test scenario, a test data file path, a server address and a port are set in a configurable manner, and after a test data configuration use case is used for the first time or a test environment is updated, a tester sets a server address and a port required by a current test according to a real environment and requirements. In performing the test, the data ready_xx transaction, the data clear_xx transaction, and the data reset_xx transaction are typically set to setUp Thread Group, and this type of test data configuration use case is only performed at the beginning of the test, and may be set to be performed only once. The data use cases of XX online transaction, YY asynchronous transaction and the like are set as a common Thread Group in the scene, and concurrent users and execution time can be respectively set. The statistics YY asynchronous transaction may be set to tearDown Thread Group in the test, and this type of test data configuration use case may be executed only at the end of the scene, or the execution times and durations may be set. Through respectively and independently packaging each test link, then, each link is connected through parameter configuration information, and the test is automatically and flexibly executed based on the configuration information, so that the flexibility and convenience of the test can be greatly improved.
After the tester is configured, the tester can choose to submit. The server of the test system may receive the data configuration sub-use case and the corresponding parameter configuration information fed back by the test terminal, and then may generate the test data configuration use case based on the data configuration sub-use case and the corresponding parameter configuration information. The generated test data configuration cases may be sent to a test case database for storage.
In some embodiments, if a test data configuration instance is generated for performing a test task. The test personnel can trigger the test to be executed, the server of the test system can call specific static data or generate dynamic data based on the test data configuration use case, the test data is sent to the target service system to be tested, and the test result is collected so as to complete the test of the target service system. In the process of executing the test task, a tester can dynamically adjust the parameter configuration information of each data configuration sub-use case according to the test result so that the test meets the actual requirement. After the test task is finished, the server of the test system sends the test data configuration use cases finally used by the test task to the test use case database for storage, so that the generated test data configuration use cases more accord with the current target service system.
When the next test task is executed, the server of the test system can call the historical test data configuration case corresponding to the test request from the test case database when the test requirement is received. And then, testing the processing performance of the target service system based on the historical test data configuration use case to obtain a test result of the target service system. Therefore, in the current test task, a tester does not need to reconfigure the test sub-link and the parameter configuration information corresponding to the test sub-link, and can directly reuse the pre-configured test data configuration use cases or the test data configuration use cases configured in the previous test task, thereby greatly improving the test efficiency and the simplicity and reducing the test input cost. Of course, the tester can also properly adjust the testing sub-link and the parameter configuration information of the testing sub-link according to the testing result, so that the testing meets the current testing requirement.
According to the scheme of the embodiment, all the test links are packaged independently, the test execution mode is not changed, and the method is applicable to most existing pressure test tools, and only the parameter configuration information is required to be configured according to the parameter configuration mode of the selected pressure test tool and the test requirement. Therefore, effective support of multiple test request protocols can be achieved, for example, apache Meter is a Java-based pressure test tool developed by Apache organization, and HTTP protocol, TCP protocol, JDBC protocol, JAVA request and the like can be supported, so that the test mode provided by the embodiment of the specification has inherent flexibility on multi-protocol expansion of data generation, and can be suitable for preparing different types of system test data, as shown in FIG. 3.
Based on the scheme provided by the embodiment, the specification also provides a scene example, and a test data configuration use case configuration method based on static data. The method may include: and receiving the database connection information configured in the data preparation sub-use case. And receiving database operation information configured in the data generation sub use case and recording operation result record script information of the database operation result in the data file. And receiving the use policy script information of the data records in the use data file configured in the data use sub-use case. And generating test data configuration cases corresponding to the static data based on the database connection information, the database operation information, the operation result record script information and the strategy script information. The JDBC protocol and JMeter test tool are described as follows.
The first step: before using the JMeter JDBC related function, the JAR package of the database is put under the JMeter's installation directory. The JAR package needing to be relied on can be found from the database installation catalog, the JAR package is put into the installation catalog\lib\ext of the JFER, and after preparation work is finished, the JFER is restarted.
And a second step of: the JMeter configuration element/JDBC connection configuration is added to the SETUP thread group of the test scenario, as shown in fig. 4. And configuring database connection information according to the test environment of the system to be tested, wherein the database connection information comprises connection pool parameters, database connection strings, data driving classes, user names, passwords and the like.
And a third step of: add JMeter sampler/JDBC Request in SETUP thread group of test scenario as shown in fig. 5. Filling in the database connection pool variables set in the second step, and selecting the type of the SQL sentence. SQL statements support additions, deletions, modifications, queries, stored procedures, etc. The corresponding SQL statement may then be written. And setting configuration information such as variable names, query timeout time and the like for storing return results of SQL sentences.
Fourth step: the JMeter sampler/BeanShell Sampler is added to the SETUP thread group of the test scenario as shown in fig. 6. The same function can also be accomplished using a Java request sampler. The BeanShell script can then be written within the script writing text box. And storing the execution result of the JDBC request into a specified data file. The execution result variable name needs to be consistent with the settings in the second step.
Fifth step: in the normal thread group needing to use the data file, add the JMeter configuration element/CSV Data Set Config, and associate the data file generated in the fourth step, configure the policy used for the data file.
By the method, the construction of the test data configuration use case based on the static data is completed. Then, a test data configuration use case can be operated, a data record is accessed from a database based on SQL sentences configured by the data generation part, the execution result of the JDBC request is saved to a specified data file by utilizing a BeanShell script, then specific data is called based on a strategy used by the data file, and the test of the system to be tested is executed.
Based on the scheme provided by the embodiment, the specification also provides a scene example, and a test data configuration use case construction method based on dynamic data. The method may include: and receiving the equipment connection information based on the HTTP protocol configured in the data preparation sub-use case. Dynamic data generation configured in the data generation sub-use case and recorded script information are received. And receiving the use policy script information of the dynamic data record configured in the data use sub-use case. And generating test data configuration use cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information. Taking HTTP protocol and LoadRunner test tools as examples, links such as data preparation, resetting, statistics, etc. may be configured according to the attribute of the test tools, which will not be described herein. The corresponding data generation and data use sections are exemplified as follows:
the first step: and analyzing a service scene, wherein the transaction to be tested is assumed to be agreement payment subscription, and a customer needs to input a short message verification code sent by a system when transacting the service, and the subscription can be successful after verification. The short message verification code is identified as test real-time data.
And a second step of: writing a test transaction protocol payment subscription triggering short message for sending a short message verification code, and storing the short message verification code in a returned message in a variable, as shown in fig. 7. To avoid the impact of the auxiliary transaction generated by the test real-time data on the tested transaction test result statistics by the pressure test tool, the test real-time data can be packaged in a separate transaction execution.
And a third step of: the sms authentication code smkey stored in the second step is used in the request message for agreement payment subscription transaction, as shown in fig. 8.
By the method, the construction of the test data configuration use case based on the dynamic data is completed. Then, a test data configuration use case can be operated, data is dynamically generated based on a pre-configured dynamic generation mode in data generation and data use, and then the generated dynamic data is called based on the configured dynamic data use mode, so that the test of the system to be tested is executed.
According to the test data configuration case construction mode, aiming at a specific test scene, the execution time sequence, the execution times, the execution time length and the like of each test link can be configured, and each test link can be effectively and flexibly configured according to the needs, so that the test data configuration case can be constructed more simply and conveniently. Meanwhile, aiming at a specific test scene, connection parameters such as a server and a database corresponding to the test, a static data calling statement, a dynamic data generating script, a static data using script, a dynamic data using script and the like can be configured, and a test result statistical mode and the like can be configured, so that the construction of test data configuration cases under the specific test scene is simply and conveniently completed.
Meanwhile, the constructed test data configuration use case comprises the arrangement management of the test links, and also comprises parameter configuration information such as equipment connection parameters, data generation, a script, a result statistics mode and the like in the characteristic test scene, and the parameter configuration information can be flexibly allocated by a tester according to the requirements of the test scene, so that the maintainable and reusable test data asset is formed. Accordingly, test data configuration cases constructed in a test scenario or test data configuration cases specially designed by a professional tester according to experience can be stored in the database. Because of the large number of projects and products of an enterprise, each system has many versions to be put into production. The test data assets formed by each performance test task will be very considerable over the course of the day and month. The formation of the test assets provides convenient conditions for sharing and releasing test results among various testers, and improves the efficiency and quality of test task data preparation work. When in retest, after the tester calls the needed test data configuration use cases, the tester can be put into use only by simple adjustment, so that the test efficiency is greatly improved, and the test input cost is reduced.
In some embodiments, according to different target service systems to be tested, the test data configuration use cases corresponding to the target service systems to be tested may be stored, and may be stored in databases corresponding to the target service systems to be tested, so as to be uniformly stored in one database, and the system identifier is used to identify the test data configuration use cases corresponding to the systems. In other embodiments, the version identification may be further performed on the test data configuration case corresponding to any target service system to be tested, so as to identify the version of the test data configuration case. The version identifier may be a case version number of the test data configuration case, or may be a system version number of the target service system to be tested corresponding to the test data configuration case. By using the version number of the target service system to be tested to identify the test data configuration use cases, the test personnel can conveniently analyze the test data configuration use cases corresponding to the corresponding version of the system, so that the selection and maintenance of the test data configuration use cases are more convenient.
As shown in fig. 9, in one example scenario, assume an enterprise has an a system, a B system, a C system, and an XX system …. The A system has a production version in 1 month and 12 months, and performance tests are required. The 1 month version of the test task of the A system is responsible for the tester A, and the 12 month version of the test task of the A system is responsible for the tester B. In the test task of the 1 month version of the A system, the tester A spends a lot of time and effort accumulating configured test data configuration cases based on the test scene requirement. When the tester B performs the 12-month version of the test task of the A system, because the interval time between the two test tasks is longer, the test environment allocated by the 1-month version of the test task is recovered, the 12-month test task needs to reconstruct the test environment, and the tester B needs to spend a great deal of time and energy to accumulate to configure the test data configuration use cases. By using the scheme provided by the embodiment, the tester B can multiplex the test data configuration cases of the A system in the test case database, and then properly adjust the test data configuration cases according to the needs, thereby improving the test efficiency and convenience. Similarly, the tester C may submit a 3 month version of the test data asset … … for the C system, thus enabling maintenance and reuse of test data configuration cases for each system under test.
According to the scheme provided by the embodiment, the whole life cycle management of the test data and other test cases in the test can be arranged into a test scene, so that the integrated and automatic whole flow management of data cleaning, resetting, generating, using and counting is realized, and good support can be realized for static data and dynamic data. Meanwhile, a large number of test data generation and used script files are formed in the construction process of the test data configuration case, and the script files can be packaged together as parameter configuration information of the test data configuration case, so that maintainable reusable test assets are formed, convenience conditions are provided for sharing and releasing among all test personnel, complicated and accurate work of the test data in each test execution is avoided, the test data preparation work efficiency and quality are improved, and further the test efficiency and accuracy are improved.
Based on the scheme provided by the above embodiment, the embodiment of the present specification further provides a testing method of a service system. In a specific embodiment, as shown in fig. 10, the method may be applied to a server of the test system, and the method may include the steps of:
s102: and receiving a test request of the target service system.
The server of the test system can receive a test request of a certain target service system sent by a tester through the test terminal. The target service system can be any service system to be tested, can be a distributed service system or an independent service system. The test request can include, for example, a system identifier of the target service system, so that the test system invokes a test data configuration use case corresponding to the system identifier.
Or, the test request may include a use case identifier, so that the test system invokes the test data configuration use case corresponding to the use case identifier. The case identification may be information that identifies the test data configuration case. The use case identifier may be a system identifier, or may be a sequence number. In some embodiments, the use case identifier may further include a use case version identifier and/or a system version identifier, etc. By further adopting the case version identifier and/or the system version identifier to identify the test data configuration case, the management of the historical test data configuration case can be more convenient, and when a plurality of historical test data configuration cases exist, the latest version of the test data configuration case or the historical test data configuration case which is more matched with the current test scene can be conveniently called.
Of course, the test request may also include parameter information that needs to be configured in the test scenario, and may be set by itself according to the need, which is not limited herein.
S104: acquiring a test data configuration case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, execution times and/or execution time duration of each data configuration sub-case.
And the server of the test system can acquire the test data configuration use cases corresponding to the test requests. The test data configuration use case may include parameter configuration information of a plurality of data configuration sub-use cases. The parameter configuration information may include, for example, at least execution timing among the plurality of data configuration sub-use cases, execution times and/or execution time duration of each data configuration sub-use case, and the like. The parameter configuration information can also comprise database connection information, associated equipment connection information related to dynamic data generation, and information such as SQL sentences, scripts, data files and the like corresponding to the data generation according to the difference of static test data and dynamic test data.
The test data configuration use cases can be configured by using use case configuration templates for testers based on the current test scene; alternatively, the historical use cases may be directly called from the test use case database corresponding to the test system; alternatively, the test staff may be readjusted based on the current test scenario and the history cases directly retrieved from the test case database corresponding to the test system. The configuration manner of the test data configuration case may be implemented with reference to the schemes of the foregoing embodiments, which is not described herein.
For example, if the target service system is a newly-online system or a newly-online system after a larger update occurs, the corresponding test scenario may need to be reconfigured, and the corresponding test data generation and use mode may also need to be reconfigured, and at this time, the tester may use the case configuration template to configure the test data configuration case required by the current test scenario. Of course, the tester may also obtain the test data configuration case required by the current test scenario after greatly adjusting the parameter configuration information of each sub case and sub case based on the historical test data configuration case.
If the target service system is not updated greatly, the server of the test system can directly call the latest version of the historical test data configuration use case corresponding to the target service system as the test data configuration use case required by the current test scene, namely, the latest version of the historical test data configuration use case can be directly reused. Of course, after the historical test data configuration use cases corresponding to the target service system are called, the tester can properly adjust each sub use case and the parameter configuration information of the sub use cases according to the current test scene, so as to obtain the test data configuration use cases required by the current test scene.
Correspondingly, in some embodiments, the server may retrieve a historical test data configuration case corresponding to the target service system from a test case database; and determining the test data configuration case corresponding to the test request according to the called historical test data configuration case. The determination mode can be direct multiplexing or multiplexing after adjustment, etc. Therefore, the workload of test data configuration is greatly reduced, and the test simplicity and test efficiency are improved.
S106: and testing the processing performance of the target service system based on the test data configuration use case to obtain a test result of the target service system.
The server of the test system can combine the test data configuration case with other test cases configured in the current test scene to realize the generation and use of the test data in the test process, and realize the test of the processing performance of the target service system to obtain the test result of the target service system. The specific combination manner may be determined by referring to a test tool used in a corresponding test scenario, and will not be described herein.
All embodiments in the specification are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred to, so that each embodiment mainly describes differences from other embodiments. Specific reference may be made to the foregoing description of related embodiments of the related process, which is not described herein in detail.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the test method provided by the embodiment, the construction of the test data configuration use cases is simpler and more convenient, a large number of use case assets can be effectively accumulated, the use of the test data configuration use cases after the subsequent test multiplexing or simple adjustment is facilitated, the workload of test data configuration is greatly reduced, and the test simplicity and the test efficiency are improved.
Based on the method provided by the above embodiment, the embodiment of the present disclosure further provides a testing device for a service system. In a specific embodiment, as shown in fig. 11, the apparatus may be applied to a server of the test system, and the apparatus may include:
the test request receiving module 110 may be configured to receive a test request of a target service system.
The use case obtaining module 112 may be configured to obtain a test data configuration use case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, execution times and/or execution time duration of each data configuration sub-case.
The test execution module 114 may be configured to test the processing performance of the target service system based on the test data configuration use case, to obtain a test result of the target service system.
It should be noted that the above description of the apparatus according to the method embodiment may also include other implementations. Specific implementation may refer to descriptions of related method embodiments, which are not described herein in detail.
Based on the scheme provided by the embodiment, the embodiment of the specification also provides a test case generation method. In a specific embodiment, as shown in fig. 12, the method may be applied to a test terminal of the test system, and the method may include the following steps:
s120: and receiving a test case generation request sent by the test terminal.
S122: obtaining an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; the parameter type at least comprises execution time sequence among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases.
S124: and sending the use case configuration template to the test terminal so as to enable the test terminal to display.
S126: and receiving the parameter configuration information of the data configuration sub-use case corresponding to the selection operation of the user fed back by the test terminal in the use case configuration template.
S128: and generating a test data configuration case based on the parameter configuration information of the data configuration sub case corresponding to the selection operation.
Based on the method provided by the embodiment, the embodiment of the specification also provides a test case generating device. The apparatus may be applied to a server of the test system, and the apparatus may include:
the generation request receiving module can be used for receiving a test case generation request sent by the test terminal.
The template acquisition module can be used for acquiring an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; the parameter type at least comprises execution time sequence among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases.
And the template sending module can be used for sending the use case configuration template to the test terminal.
The information receiving module can be used for receiving the selection operation of the data configuration sub-use case in the use case configuration template and the parameter configuration information of the data configuration sub-use case corresponding to the corresponding selection operation, which are fed back by the test terminal.
The case generation module can be used for generating the test data configuration case based on the data configuration sub case corresponding to the selection operation and the parameter configuration information of the data configuration sub case corresponding to the corresponding selection operation.
It should be noted that the method and apparatus for generating test cases described above may further include other implementations according to the description of the foregoing embodiments. Specific implementation may refer to the description of the related foregoing embodiments, which is not repeated herein.
Based on the scheme provided by the embodiment, the embodiment of the specification also provides a test case generation method. In a specific embodiment, as shown in fig. 13, the method may be applied to a server of the test system, and the method may include the steps of:
s130: and sending a test case generation request to a server.
S132: receiving a use case configuration template sent by the server and displaying the use case configuration template; the use case configuration template comprises a sub use case selection field and a parameter information configuration field.
S134: and receiving the selection operation of the data configuration sub-use cases in the use case configuration template by the user and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation, and feeding back to the server, so that the server generates the test data configuration use cases based on the data configuration sub-use cases corresponding to the selection operation and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation.
Based on the method provided by the embodiment, the embodiment of the specification also provides a test case generating device. The device can be applied to a test terminal of the test system, and the device can comprise the following steps:
and the request sending module can be used for sending a test case generation request to the server.
The template receiving module can be used for receiving a use case configuration template sent by the server; the use case configuration template comprises a sub use case selection field and a parameter information configuration field.
And the template display module can be used for displaying the use case configuration template.
The operation receiving module can be used for receiving the selection operation of the data configuration sub-use cases in the use case configuration template and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation by a user and feeding back to the server, so that the server generates the test data configuration use cases based on the data configuration sub-use cases corresponding to the selection operation and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation.
It should be noted that the method and apparatus for generating test cases described above may further include other implementations according to the description of the foregoing embodiments. Specific implementation may refer to the description of the related foregoing embodiments, which is not repeated herein.
Based on the scheme provided by the embodiment, the specification also provides a test system which can be applied to a test system of a single service system and can also be applied to various computer data processing systems. The system may be a stand-alone server or may include a server cluster, a system (including a distributed system), software (applications), an actual operating device, a logic gate device, a quantum computer, etc., using one or more of the methods or one or more of the embodiment devices of the present specification in combination with a terminal device that implements the necessary hardware.
In some embodiments, the system may include a server and a test terminal. Wherein the server may comprise at least one processor and a memory for storing processor-executable instructions which, when executed by the processor, perform the steps of the method of any one or more of the embodiments described above. The test terminal may comprise at least one processor and a memory for storing processor-executable instructions which, when executed by the processor, perform the steps of the method of any one or more of the embodiments described above.
The memory may include physical means for storing information, typically by digitizing the information before storing it in an electrical, magnetic or optical medium. The storage medium may include: means for storing information using electrical energy such as various memories, e.g., RAM, ROM, etc.; devices for storing information using magnetic energy such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, and USB flash disk; devices for optically storing information, such as CDs or DVDs. Of course, there are other ways of readable storage medium, such as quantum memory, graphene memory, etc.
It should be noted that the description of the above apparatus according to the method or apparatus embodiment may further include other embodiments, and specific implementation manner may refer to the description of the related method embodiment, which is not described herein in detail.
The apparatus according to the embodiments of the present specification may include a system, software (application), a module, a component, a server, etc. using the method according to the embodiments of the present specification, in combination with necessary hardware implementation. Because the implementation scheme and the method for solving the problem by the device are similar, the implementation of the device in the embodiment of the present disclosure may refer to the implementation of the corresponding method, and the repetition is not repeated. As used herein, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. Although the apparatus described in the apparatus embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present description embodiments are not limited to cases that are necessarily compliant with standard data models/templates or described in the present description embodiments. Some industry standards or embodiments modified slightly based on the implementation described by the custom manner or examples can also realize the same, equivalent or similar or predictable implementation effect after modification of the above examples. Examples of data acquisition, storage, judgment, processing, etc., using these modifications or variations are still within the scope of alternative embodiments of the present description.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (13)

1. A method of testing a server for a test system, the method comprising:
receiving a test request of a target service system;
acquiring a test data configuration case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, and execution times and/or execution time duration of each data configuration sub-case;
testing the processing performance of the target service system based on the test data configuration use case to obtain a test result of the target service system;
The test data configuration use case is generated by the following method:
receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case;
receiving dynamic data generation and recorded script information configured in a data generation sub-use case;
receiving the use policy script information of the dynamic data record configured in the data use sub-use case;
generating test data configuration cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information; after generating a test data configuration case corresponding to the dynamic data, running the test data configuration case corresponding to the dynamic data, generating the dynamic data based on a pre-configured dynamic generation mode in data generation and data use, and then calling the generated dynamic data based on the configured dynamic data use mode to execute the test of the target service system; and/or
The test data configuration case is generated by adopting the following modes:
receiving database connection information configured in a data preparation sub-use case;
receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file;
Receiving use policy script information of a data record in the use data file configured in a data use sub-use case;
based on the database connection information, the database operation information, the operation result record script information and the use strategy script information, generating test data configuration cases corresponding to static data; after the test data configuration case corresponding to the static data is generated, the test data configuration case corresponding to the static data is operated, the data record is accessed from the database based on the SQL statement configured by the data generation part, the execution result of the JDBC request is saved to the appointed data file by utilizing the BeanShell script, and then the test of the static data execution target business system is called based on the strategy used by the data file.
2. The method of claim 1, wherein the data configuration sub-use cases comprise at least one of a data preparation sub-use case, a data cleansing sub-use case, a data resetting sub-use case, a data generation sub-use case, a data use sub-use case, and a result statistics sub-use case.
3. The method of claim 1, wherein the data generation sub-use cases comprise a static data generation sub-use case and a dynamic data generation sub-use case; the static data generation sub-use case comprises data generation configuration information corresponding to the repeatedly used test data; the dynamic data generation sub-use case comprises data generation configuration information corresponding to the real-time test data.
4. The method of claim 1, wherein the test system corresponds to a test case database; the test case database is used for storing the constructed test data configuration cases; the test data configuration cases in the test case database are generated by adopting the following modes:
obtaining an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter;
receiving the parameter configuration information of the data configuration sub-use cases corresponding to the selection operation in the information configuration frame by a user in the use case configuration template;
and generating a test data configuration case based on the parameter configuration information of the data configuration sub case corresponding to the selection operation.
5. The method of claim 1, wherein the obtaining the test data configuration case corresponding to the test request comprises:
The historical test data configuration case corresponding to the target service system is called from a test case database;
and determining the test data configuration case corresponding to the test request according to the called historical test data configuration case.
6. The method of claim 5, wherein the test request includes a use case version identification and/or a system version identification; correspondingly, the calling the historical test data configuration case corresponding to the target service system comprises the following steps:
and calling the historical test data configuration use cases corresponding to the use case version identifiers and/or the system version identifiers.
7. The method of claim 1, wherein the database operation information comprises an SQL statement type and a corresponding SQL statement.
8. A test apparatus for use with a server of a test system, the apparatus comprising:
the test request receiving module is used for receiving a test request of the target service system;
the case acquisition module is used for acquiring a test data configuration case corresponding to the test request; the test data configuration cases comprise a plurality of data configuration sub-cases and parameter configuration information of the plurality of data configuration sub-cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter configuration information at least comprises execution time sequences among a plurality of data configuration sub-cases, and execution times and/or execution time duration of each data configuration sub-case;
The test execution module is used for testing the processing performance of the target service system based on the test data configuration use case to obtain a test result of the target service system;
the test data configuration use case is generated by the following method:
receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case;
receiving dynamic data generation and recorded script information configured in a data generation sub-use case;
receiving the use policy script information of the dynamic data record configured in the data use sub-use case;
generating test data configuration cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information; after generating a test data configuration case corresponding to the dynamic data, running the test data configuration case corresponding to the dynamic data, generating the dynamic data based on a pre-configured dynamic generation mode in data generation and data use, and then calling the generated dynamic data based on the configured dynamic data use mode to execute the test of the target service system; and/or
The test data configuration case is generated by adopting the following modes:
Receiving database connection information configured in a data preparation sub-use case;
receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file;
receiving use policy script information of a data record in the use data file configured in a data use sub-use case;
based on the database connection information, the database operation information, the operation result record script information and the use strategy script information, generating test data configuration cases corresponding to static data; after the test data configuration case corresponding to the static data is generated, the test data configuration case corresponding to the static data is operated, the data record is accessed from the database based on the SQL statement configured by the data generation part, the execution result of the JDBC request is saved to the appointed data file by utilizing the BeanShell script, and then the test of the static data execution target business system is called based on the strategy used by the data file.
9. A test case generation method, characterized by being applied to a server of a test system, the method comprising:
receiving a test case generation request sent by a test terminal;
Obtaining an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; the parameter type at least comprises execution time sequence among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases;
the use case configuration template is sent to the test terminal so that the test terminal can display the use case configuration template;
receiving the parameter configuration information of the data configuration sub-use case corresponding to the selection operation, which is fed back by the test terminal, of the user in the use case configuration template;
generating a test data configuration case based on the parameter configuration information of the data configuration sub case corresponding to the selection operation;
the test data configuration use case is generated by the following method:
receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case;
Receiving dynamic data generation and recorded script information configured in a data generation sub-use case;
receiving the use policy script information of the dynamic data record configured in the data use sub-use case;
generating test data configuration cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information; after generating a test data configuration case corresponding to the dynamic data, running the test data configuration case corresponding to the dynamic data, generating the dynamic data based on a pre-configured dynamic generation mode in data generation and data use, and then calling the generated dynamic data based on the configured dynamic data use mode to execute the test of the target service system; and/or
The test data configuration case is generated by adopting the following modes:
receiving database connection information configured in a data preparation sub-use case;
receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file;
receiving use policy script information of a data record in the use data file configured in a data use sub-use case;
Based on the database connection information, the database operation information, the operation result record script information and the use strategy script information, generating test data configuration cases corresponding to static data; after the test data configuration case corresponding to the static data is generated, the test data configuration case corresponding to the static data is operated, the data record is accessed from the database based on the SQL statement configured by the data generation part, the execution result of the JDBC request is saved to the appointed data file by utilizing the BeanShell script, and then the test of the static data execution target business system is called based on the strategy used by the data file.
10. A test case generating apparatus, characterized by being applied to a server of a test system, comprising:
the generation request receiving module is used for receiving a test case generation request sent by the test terminal;
the template acquisition module is used for acquiring an example configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column; the child use case selection field comprises a plurality of data configuration child use cases; the data configuration sub-use cases are used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to each data configuration sub-use case and an information configuration frame of each parameter; the parameter type at least comprises execution time sequence among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases;
The template sending module is used for sending the use case configuration template to the test terminal;
the information receiving module is used for receiving the selection operation of the data configuration sub-use cases in the use case configuration template and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation, which are fed back by the test terminal;
the case generation module is used for generating a test data configuration case based on the data configuration sub case corresponding to the selection operation and the parameter configuration information of the data configuration sub case corresponding to the corresponding selection operation;
the test data configuration use case is generated by the following method:
receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case;
receiving dynamic data generation and recorded script information configured in a data generation sub-use case;
receiving the use policy script information of the dynamic data record configured in the data use sub-use case;
generating test data configuration cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information; after generating a test data configuration case corresponding to the dynamic data, running the test data configuration case corresponding to the dynamic data, generating the dynamic data based on a pre-configured dynamic generation mode in data generation and data use, and then calling the generated dynamic data based on the configured dynamic data use mode to execute the test of the target service system; and/or
The test data configuration case is generated by adopting the following modes:
receiving database connection information configured in a data preparation sub-use case;
receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file;
receiving use policy script information of a data record in the use data file configured in a data use sub-use case;
based on the database connection information, the database operation information, the operation result record script information and the use strategy script information, generating test data configuration cases corresponding to static data; after the test data configuration case corresponding to the static data is generated, the test data configuration case corresponding to the static data is operated, the data record is accessed from the database based on the SQL statement configured by the data generation part, the execution result of the JDBC request is saved to the appointed data file by utilizing the BeanShell script, and then the test of the static data execution target business system is called based on the strategy used by the data file.
11. A test case generation method, which is applied to a test terminal of a test system, the method comprising:
Sending a test case generation request to a server;
receiving a use case configuration template sent by the server and displaying the use case configuration template; the use case configuration template comprises a child use case selection column and a parameter information configuration column;
receiving the selection operation of the data configuration sub-use cases in the use case configuration template by a user and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation, and feeding back to the server, so that the server generates a test data configuration use case based on the data configuration sub-use cases corresponding to the selection operation and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation;
the test data configuration use case is generated by the following method:
receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case;
receiving dynamic data generation and recorded script information configured in a data generation sub-use case;
receiving the use policy script information of the dynamic data record configured in the data use sub-use case;
generating test data configuration cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information; after generating a test data configuration case corresponding to the dynamic data, running the test data configuration case corresponding to the dynamic data, generating the dynamic data based on a pre-configured dynamic generation mode in data generation and data use, and then calling the generated dynamic data based on the configured dynamic data use mode to execute the test of the target service system; and/or
The test data configuration case is generated by adopting the following modes:
receiving database connection information configured in a data preparation sub-use case;
receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file;
receiving use policy script information of a data record in the use data file configured in a data use sub-use case;
based on the database connection information, the database operation information, the operation result record script information and the use strategy script information, generating test data configuration cases corresponding to static data; after the test data configuration case corresponding to the static data is generated, the test data configuration case corresponding to the static data is operated, the data record is accessed from the database based on the SQL statement configured by the data generation part, the execution result of the JDBC request is saved to the appointed data file by utilizing the BeanShell script, and then the test of the static data execution target business system is called based on the strategy used by the data file.
12. A test case generating device, characterized by being applied to a test terminal of a test system, comprising:
The request sending module is used for sending a test case generation request to the server;
the template receiving module is used for receiving the use case configuration template sent by the server; the use case configuration template comprises a child use case selection column and a parameter information configuration column;
the template display module is used for displaying the use case configuration template;
the operation receiving module is used for receiving the selection operation of the data configuration sub-use cases in the use case configuration template by a user and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation, and feeding back the parameter configuration information to the server so that the server generates a test data configuration use case based on the data configuration sub-use cases corresponding to the selection operation and the parameter configuration information of the data configuration sub-use cases corresponding to the corresponding selection operation;
the test data configuration use case is generated by the following method:
receiving equipment connection information based on the HTTP protocol, which is configured in the data preparation sub-use case;
receiving dynamic data generation and recorded script information configured in a data generation sub-use case;
receiving the use policy script information of the dynamic data record configured in the data use sub-use case;
generating test data configuration cases corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information; after generating a test data configuration case corresponding to the dynamic data, running the test data configuration case corresponding to the dynamic data, generating the dynamic data based on a pre-configured dynamic generation mode in data generation and data use, and then calling the generated dynamic data based on the configured dynamic data use mode to execute the test of the target service system; and/or
The test data configuration case is generated by adopting the following modes:
receiving database connection information configured in a data preparation sub-use case;
receiving database operation information configured in a data generation sub-use case and recording operation result recording script information of a database operation result in a data file;
receiving use policy script information of a data record in the use data file configured in a data use sub-use case;
based on the database connection information, the database operation information, the operation result record script information and the use strategy script information, generating test data configuration cases corresponding to static data; after the test data configuration case corresponding to the static data is generated, the test data configuration case corresponding to the static data is operated, the data record is accessed from the database based on the SQL statement configured by the data generation part, the execution result of the JDBC request is saved to the appointed data file by utilizing the BeanShell script, and then the test of the static data execution target business system is called based on the strategy used by the data file.
13. A test system, wherein the system comprises a server and a test terminal; wherein,
The server comprising at least one processor and a memory for storing processor-executable instructions which, when executed by the processor, implement steps comprising the method of any one of claims 1-7, 9;
the test terminal comprising at least one processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the steps comprising the method of claim 11.
CN202011022409.5A 2020-09-25 2020-09-25 Test method and device, test case generation method and device and test system Active CN112115058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011022409.5A CN112115058B (en) 2020-09-25 2020-09-25 Test method and device, test case generation method and device and test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011022409.5A CN112115058B (en) 2020-09-25 2020-09-25 Test method and device, test case generation method and device and test system

Publications (2)

Publication Number Publication Date
CN112115058A CN112115058A (en) 2020-12-22
CN112115058B true CN112115058B (en) 2024-03-29

Family

ID=73796784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011022409.5A Active CN112115058B (en) 2020-09-25 2020-09-25 Test method and device, test case generation method and device and test system

Country Status (1)

Country Link
CN (1) CN112115058B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113093721B (en) * 2021-02-04 2022-03-01 中国船级社 Automatic concurrent ship collision avoidance testing method and system
CN112783788B (en) * 2021-02-05 2023-12-05 北京同邦卓益科技有限公司 Test system, method, electronic device and storage medium
CN113010425B (en) * 2021-03-18 2024-04-02 中国平安人寿保险股份有限公司 System quality monitoring method, device, computer equipment and storage medium
CN113688025A (en) * 2021-09-07 2021-11-23 中国联合网络通信集团有限公司 Interface test method, device, equipment and storage medium
CN114428748B (en) * 2022-03-30 2022-06-21 北京数腾软件科技有限公司 Simulation test method and system for real service scene

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331369A (en) * 2014-11-21 2015-02-04 北京奇虎科技有限公司 Browser-based webpage detection method and device, and server
WO2018010552A1 (en) * 2016-07-12 2018-01-18 博彦科技股份有限公司 Test method and device
CN107766190A (en) * 2017-10-31 2018-03-06 平安科技(深圳)有限公司 Interface test method, device, computer equipment and storage medium
CN109144857A (en) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 Cross-platform test of heuristics method and system
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN110489325A (en) * 2019-07-09 2019-11-22 微民保险代理有限公司 Vehicle insurance data test method, apparatus, test platform and vehicle insurance test macro
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10282281B2 (en) * 2011-10-07 2019-05-07 Syntel, Inc. Software testing platform and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331369A (en) * 2014-11-21 2015-02-04 北京奇虎科技有限公司 Browser-based webpage detection method and device, and server
WO2018010552A1 (en) * 2016-07-12 2018-01-18 博彦科技股份有限公司 Test method and device
CN107766190A (en) * 2017-10-31 2018-03-06 平安科技(深圳)有限公司 Interface test method, device, computer equipment and storage medium
CN109144857A (en) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 Cross-platform test of heuristics method and system
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
CN110489325A (en) * 2019-07-09 2019-11-22 微民保险代理有限公司 Vehicle insurance data test method, apparatus, test platform and vehicle insurance test macro
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium

Also Published As

Publication number Publication date
CN112115058A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN112115058B (en) Test method and device, test case generation method and device and test system
US10915526B2 (en) Historical data replay utilizing a computer system
CN108319547B (en) Test case generation method, device and system
US8028200B2 (en) Tracing operations in multiple computer systems
Subraya et al. Object driven performance testing of Web applications
US10116534B2 (en) Systems and methods for WebSphere MQ performance metrics analysis
US20160098341A1 (en) Web application performance testing
JP2017084345A (en) Real-time monitoring of computer system processor and transaction performance during ongoing performance test
CN108920139B (en) Program generation method, device and system, electronic equipment and storage medium
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN111522728A (en) Method for generating automatic test case, electronic device and readable storage medium
CN112035363A (en) Automatic interface testing method and device
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN111552628A (en) Distributed pressure measurement system and method for graph database and graph service interface
CN112217886B (en) Distributed system testing method and system, message production and consumption module
CN114595201A (en) Method, equipment and storage medium for inquiring acquisition record of interface access log
Zhou et al. Ltf: a model-based load testing framework for web applications
WO2016190869A1 (en) Determining potential test actions
US11720476B2 (en) Automated end-to-end testing platform with dynamic container configuration
CN113094266B (en) Fault testing method, platform and equipment for container database
Klein et al. Application-Specific Evaluation of No SQL Databases
CN113377680A (en) Dubbo service test system and method
Langsari et al. Measuring performance efficiency of application applying design patterns and refactoring method
CN112363944A (en) Method and equipment for comparing return values of multiple environment interfaces
CN117077592B (en) Regression data monitoring method, monitoring device and monitoring 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