CN112115058A - 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 PDFInfo
- Publication number
- CN112115058A CN112115058A CN202011022409.5A CN202011022409A CN112115058A CN 112115058 A CN112115058 A CN 112115058A CN 202011022409 A CN202011022409 A CN 202011022409A CN 112115058 A CN112115058 A CN 112115058A
- Authority
- CN
- China
- Prior art keywords
- case
- test
- configuration
- sub
- data
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 581
- 238000000034 method Methods 0.000 title claims abstract description 98
- 238000010998 test method Methods 0.000 title abstract description 10
- 230000008569 process Effects 0.000 claims abstract description 29
- 238000002360 preparation method Methods 0.000 claims abstract description 21
- 238000012545 processing Methods 0.000 claims abstract description 15
- 238000013515 script Methods 0.000 claims description 41
- 230000003068 static effect Effects 0.000 claims description 21
- 230000015654 memory Effects 0.000 claims description 12
- 238000004140 cleaning Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 10
- 238000012795 verification Methods 0.000 description 7
- 238000010276 construction Methods 0.000 description 6
- 238000003860 storage Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000000750 progressive effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000013499 data model Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test 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 a test device, a test case generation method and a test 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 case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 duration of each data configuration sub-case; and testing the processing performance of the target service system based on the test data configuration case to obtain a test result of the target service system. By using the embodiments of the present specification, the convenience of test data preparation and the test efficiency used by the service system test can be improved.
Description
Technical Field
The present disclosure relates to the field of computer data processing technologies, and in particular, to a test method and apparatus, a test case generation method and apparatus, and a test 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 the actual business data concurrency can be simulated by using a pressure testing tool so as to perform system performance testing. In system performance testing, 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 usually needs to know the test background, analyze the test range, specify the fields to be parameterized in the test script, and prepare the SQL statements for extracting the test data. Writing SQL statements also typically requires familiarity with knowing the structure of the database tables, etc. involved. After the work is ready, the tester connects the system database through the database client, executes the SQL statement, and manually exports the execution result to the data file. When the test script is developed, a data file prepared in advance is associated with the script, and a parameter use strategy is set, so that the links of test data generation and use are completed.
Therefore, in the current link of generating and using test data, when the data is accurately tested each time, a large amount of time is spent by a tester 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 related links are performed for testing, so that the preparation of the test data is complex and tedious, the efficiency is low, and the overall testing efficiency is low. Therefore, a more efficient and accurate testing method is needed.
Disclosure of Invention
An object of the embodiments of the present specification is to provide a test method and apparatus, a test case generation method and apparatus, and a test system, which can improve the test efficiency of a service system.
The specification provides a test method and a test device, a test case generation method and a test device, and a test system, which are realized by the following modes:
a testing method is applied to a server of a testing system, and comprises the following steps: receiving a test request of a target service system; acquiring a test data configuration case corresponding to the test request; the test data configuration case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 duration of each data configuration sub-case; and testing the processing performance of the target service system based on the test data configuration case to obtain a test result of the target service system.
In other embodiments of the method provided in this specification, the data configuration sub-case includes at least one of a data preparation sub-case, a data cleaning sub-case, a data resetting sub-case, a data generation sub-case, a data usage sub-case, and a result statistics sub-case.
In other embodiments of the method provided in this specification, the test generation sub-case includes a static data generation sub-case and a dynamic data generation sub-case; the static data generation sub-case comprises data generation configuration information corresponding to the repeatedly used test data; the dynamic data generation sub-case comprises data generation configuration information corresponding to the real-time test data.
In other embodiments of the method provided in this specification, the test data configuration case in the test case database is generated by: acquiring a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; receiving the selection operation of a user on 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 in the information configuration frame; and 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.
In other embodiments of the method provided in this specification, the obtaining a test data configuration case corresponding to the test request includes: calling a historical test data configuration case corresponding to the target service system from a test case database; and determining a test data configuration case corresponding to the test request according to the called historical test data configuration case.
In other embodiments of the method provided in this specification, the test request includes a use case version identifier and/or a system version identifier; correspondingly, the invoking of the historical test data configuration case corresponding to the target service system includes: and calling the historical test data configuration use case corresponding to the use case version identification and/or the system version identification.
In other embodiments of the method provided in this specification, the test data configuration case is generated by: receiving database connection information configured in the data preparation sub-case; receiving database operation information configured in the data generation sub-case, and recording the database operation result to operation result recording script information in the data file; receiving use strategy script information which is configured in the data use sub-case and uses the data record in the data file; and generating a test data configuration case corresponding to the static data based on the database connection information, the database operation information, the operation result recording script information and the strategy script information.
In other embodiments of the method provided in this specification, the database operation information includes an SQL statement type and a corresponding SQL statement.
In other embodiments of the method provided in this specification, the test data configuration case is generated by: receiving equipment connection information based on an HTTP (hyper text transport protocol) protocol configured in a data preparation sub-case; receiving dynamic data generation configured in the data generation sub-case and script information recorded; receiving use strategy script information of dynamic data records configured in the data use sub-case; and generating a test data configuration case corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information.
On the other hand, the embodiments of this specification also provide a testing apparatus, apply to the server of the test system, the apparatus includes: the test request receiving module is used for receiving a test request of the target service system; the case obtaining module is used for obtaining a test data configuration case corresponding to the test request; the test data configuration case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 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 case to obtain the test result of the target service system.
On the other hand, an embodiment of the present specification further provides a test case generation method, which is applied to a server of a test system, and the method includes: receiving a test case generation request sent by a test terminal; acquiring a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the data configuration sub-case is used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; the parameter types at least comprise execution time sequences among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases; sending the case configuration template to the test terminal so as to display the test terminal; receiving selection operation of a user on a data configuration sub-case in the case configuration template fed back by the test terminal and parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation; and 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, an embodiment of the present specification further provides a test case generation apparatus, which is applied to a server of a test system, and the apparatus includes: 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 a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the data configuration sub-case is used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; the parameter types at least comprise execution time sequences 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 case configuration template to the test terminal; the information receiving module is used for receiving the selection operation of the user on the data configuration sub-case in the case configuration template fed back by the test terminal and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation; and the case generating module is 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.
On the other hand, an embodiment of the present specification further provides a test case generation method, which is applied to a test terminal of a test system, and the method includes: 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 sub-use case selection column and a parameter information configuration column; and receiving the selection operation of the user on the data configuration sub-case in the case configuration template and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, and feeding back the selection operation and the parameter configuration information to the server, so that the server generates 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.
On the other hand, an embodiment of the present specification further provides a test case generation apparatus, which is applied to a test terminal of a test system, and the apparatus includes: 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 sub-use case selection column and a parameter information configuration column; the template display module is used for displaying the use case configuration template; and the operation receiving module is used for receiving the selection operation of the data configuration sub-case in the case configuration template by the user and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, and feeding back the selection operation and the parameter configuration information to the server so that the server generates 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.
On the other hand, the embodiment of the present specification further provides a test system, where the system includes 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 implement the steps of the method of any one or more of the above embodiments.
The test method and device, the test case generation method and device, and the test system provided in one or more embodiments of the present specification may independently package each sub-ring configured by test data in advance, respectively serve as different sub-cases, and configure parameters such as execution timing, execution times, and/or execution duration of each sub-case. The user can select the corresponding sub-cases and configure the execution timing sequence, the execution times, the execution duration and other parameter information of each sub-case according to the requirements of the test scene, the execution parameter information and the execution sequence information of the sub-cases are simply and effectively configured, and the test data configuration case for generating and using the test data is obtained. In the execution process, the test data can be generated and used efficiently and orderly based on the pre-configured test data configuration case, and the test efficiency is improved. Meanwhile, the test data configuration case which is configured in advance or used in the process of executing the test can be stored in the database to form the test data asset, so that the test data asset can be directly reused in the process of subsequent test or can be put into use after being simply adjusted, 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 specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
FIG. 1 is an architectural diagram of a test data configuration use case 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 support for multiple protocols in some embodiments provided herein;
FIG. 4 is a JDBC connection configuration in some embodiments provided herein;
FIG. 5 is a JDBC request configuration diagram 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 illustration of usage scripts 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 schematic flow chart diagram illustrating one embodiment of a testing method provided herein;
FIG. 11 is a schematic block diagram of a testing apparatus provided herein;
FIG. 12 is a flowchart illustrating an embodiment of a test case generation method provided in the present specification;
fig. 13 is a flowchart illustrating an embodiment of a test case generation method provided in this specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the specification, and not all embodiments. All other embodiments obtained by a person skilled in the art based on one or more embodiments of the present specification without making any creative effort shall fall within the protection scope of the embodiments of the present specification.
In an application scenario example of the present specification, the test method may be applied to a test system. The test system may include one server or a server cluster of multiple servers. The test system can correspond to a test case database. The test case database can be used for storing constructed test data configuration cases. The test data configuration case may refer to a test data configuration framework 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 framework when a test is executed, and the test is completed. The constructed test data configuration case can be a test data configuration case constructed in a historical test scene, or a test data configuration case specially configured by related business personnel based on the current test scene. In some embodiments, the test data configuration case may be stored according to a system identifier of the target business system.
The test data configuration use case may include a plurality of data configuration use cases and parameter configuration information of the plurality of data configuration use cases. The data configuration sub-case is used for representing different sub-links in the test data configuration process. The parameter configuration information at least includes an execution timing sequence between a plurality of data configuration sub-cases, an execution number and/or an execution duration of each data configuration sub-case, and the like. The execution time sequence may refer to information representing an execution sequence of the data configuration sub-case in the test execution process.
In some embodiments, data preparation, data cleaning, data resetting, data generation, data retrieval and use during the test process, and test result statistics based on the corresponding test data may be packaged as separate sub-links by analyzing the data management process of the test tool based on the concurrent test of the test system, so as to form a data preparation sub-case, a data cleaning sub-case, a data resetting sub-case, a data generation sub-case, a data use sub-case, a result statistics sub-case, and the like.
Correspondingly, a tester can select the data configuration sub-cases based on the requirement, configure parameters such as execution time sequence among the selected data configuration sub-cases, execution test and/or execution duration of the data configuration sub-cases, simply and effectively associate the data configuration sub-cases, ensure automatic and effective execution of the sub-links, and form the final test data configuration case. In the test execution process, the execution link of the test data configuration case does not need to be combed manually, and the accuracy, simplicity and high efficiency of data generation and use in the test execution process are ensured.
As shown in fig. 1, data preparation, data cleaning, data resetting, data generation, data usage, and data statistics organization form respective test data configuration cases, and may be arranged together with other test cases that need to use test data to form a test scenario, and an execution timing sequence, an execution number, or an execution duration of each test data configuration case is formulated to perform management and maintenance of the test data in a full life cycle.
The data preparation sub-case may include business logic of data preparation and various types of parameter information generated by test data, such as database or associated device connection information, such as server information, SQL statement, HTTP request information, and the like.
The data cleaning sub-case is generally executed once in batch before test execution, executes data cleaning actions generated in the previous test execution process, and prepares a clean environment in advance for the test execution.
The data reset sub-case is generally reset once before each test execution because some test data can be used only once, and the state of the data needs to be reset when the test data is rerun again.
The data generation sub-case may include a static data generation sub-case and a dynamic data generation sub-case, so as to generate two types of test data: testing static data and testing dynamic data. The static data generation sub-case comprises data generation configuration information corresponding to the repeatedly used test data. The dynamic data generation sub-case comprises data generation configuration information corresponding to the real-time test data. Static data is known before the test is executed, and the content of the static data is unchanged and can be repeatedly used in the whole test execution period and is generally 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 needs to be generated repeatedly for many times until the execution of the whole test scene is finished. The static data is generally in the form of a file, and the real-time dynamic data is generally in the form of a variable.
The data use sub-case, the specific data used for testing is generally the service data in the typical service scene of the system, a data parameterization script can be configured, and the generated static data file or real-time dynamic data is associated with other test cases using the test data in the script in a field mode. During test execution, the data value can be directly read according to the preset data parameterization script for use.
And the result statistics sub-case is generally executed after the scene execution is finished. In particular to the test result statistics of some test data configuration cases executed asynchronously. Generally, the pressure test tool cannot display an intuitive test result, and the correctness, the asynchronous execution efficiency and the like of the test result can be verified by performing statistical analysis on the test result data corresponding to the corresponding test data.
In other embodiments, the test data configuration case 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 obtain the case configuration template. The use case configuration template may include a sub-use case selection column and a parameter information configuration column. The sub-case selection bar may include a plurality of data configuration sub-cases. The parameter information configuration column may include a parameter type corresponding to each data configuration sub-case and an information configuration frame of each parameter.
The server of the test system can send the case configuration template to the test terminal. The test terminal can display the case configuration template to a user. The user can operate the data configuration sub-cases in the case configuration template and the information configuration frames of the parameters. The operation may include, for example, selecting a data configuration sub-case, inputting parameter configuration information, and the like.
The test system can receive the selection operation of the user on the data configuration sub-case in the case configuration template fed back by the test terminal and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation. Then, a test data configuration case may 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, the common test data generation and use processes may be combed in advance, a plurality of separable sub-links are extracted, and then the data configuration sub-case frames are respectively packaged to form the data configuration sub-case frame. Then, a use case configuration template can be constructed based on the parameters required to be configured and the parameters required to be configured for instantiating the data configuration use cases which are sequentially executed between the data configuration use case frameworks. As shown in fig. 2, fig. 2 illustrates a use case configuration template diagram. Referring to fig. 2, the use case configuration template may include a sub-use case selection column and a parameter information configuration column. A plurality of data configuration sub-cases are given in the sub-case selection column. And the parameter information configuration column provides the configuration parameters corresponding to the data configuration sub-cases. The tester can configure the data configuration sub-case and the parameter configuration information corresponding to the data configuration sub-case according to the requirement.
The case configuration template may be pre-stored in a test case database. After receiving a test data configuration case generation requirement sent by a tester through a test terminal, a server of the test system can call a case configuration template from a test case database and feed the case configuration template back to the test terminal for display. The tester can operate the sub-case selection column and the parameter information configuration column of the case configuration template. For example, a data configuration sub-case may be selected, and correspondingly, the parameter information configuration column may correspondingly display the parameter information to be configured corresponding to the data configuration sub-case. The parameter information to be configured may include parameters such as execution timing, execution times, execution duration, and the like of the data configuration sub-case. Further, other parameter information may be provided correspondingly according to different data configuration sub-cases. Referring to fig. 2, the parameter information configuration column in fig. 2 shows parameter information to be configured corresponding to the data statistics sub-case. The tester can select or input the configuration information corresponding to each configuration parameter according to the requirement, and the parameter item without configuration information can be set to be null.
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 to be configurable, and after a certain test data configuration case is used for the first time or a test environment is updated, a tester sets a server address and a port required for a current test according to a real environment and requirements. When the test is executed, the data preparation _ XX transaction, the data cleaning _ XX transaction and the data resetting _ XX transaction are usually set to be a setUp Thread Group. And the data use sub-cases of XX online transaction, YY asynchronous transaction and the like are set as common Thread Group in the scene, and concurrent users and execution duration can be respectively set. The statistical result _ YY asynchronous transaction may be set to a Teardown Group during the test, and the test data configuration case of this type may be executed only when the scene is finished, and may also be set to the number of execution times and duration. By independently packaging each testing link and then connecting each link through parameter configuration information, the testing is automatically and flexibly executed based on the configured information, and the flexibility and convenience of the testing can be greatly improved.
After the tester configuration is complete, the tester may choose to submit. The server of the test system can receive the data configuration sub-case and the corresponding parameter configuration information fed back by the test terminal, and then can generate the test data configuration case based on the data configuration sub-case and the corresponding parameter configuration information. The generated test data configuration case can be sent to a test case database for storage.
In some embodiments, the test data configuration case is generated for executing a test task. The tester can execute the test by triggering, and the server of the test system can call specific static data or generate dynamic data based on the test data configuration case, send the test data to the target service system to be tested, and collect the test result 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-case according to the test result, so that the test can meet the actual requirement. After the test task is finished, the server of the test system sends the test data configuration case finally used by the test task to the test case database for storage, so that the generated test data configuration case is more consistent 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 receiving the test requirement. Then, the processing performance of the target service system may be tested based on the historical test data configuration case, so as 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 test data configuration case configured in advance or the test data configuration case configured in the previous test task, so that the test efficiency and the test simplicity are greatly improved, and the test investment cost is reduced. Of course, the tester can also properly adjust the test sub-link and the parameter configuration information of the test sub-link according to the test result, so that the test can better meet the current test requirement.
The scheme of the embodiment is only to independently package each testing link, does not change the test execution mode, is applicable to most of the existing pressure testing tools, and only needs to configure the parameter configuration information according to the selected parameter configuration mode of the pressure testing tool and the testing requirement. Therefore, effective support for various test request protocols can be realized, for example, Apache JMeter is a Java-based stress test tool developed by Apache organization, and can support HTTP protocol, TCP protocol, JDBC protocol, Java request, and the like, so that the test mode provided by the embodiment of the present specification has inherent flexibility for multi-protocol extension of data generation, and as shown in fig. 3, can be applied to different types of system test data preparation.
Based on the solutions provided by the above embodiments, this specification further provides a scenario example, a test data configuration case configuration method based on static data. The method may include: and receiving the database connection information configured in the data preparation sub-case. Receiving the database operation information configured in the data generation sub-case, and recording the database operation result to the operation result recording script information in the data file. And receiving the use strategy script information which is configured in the data use sub-case and uses the data record in the data file. And generating a test data configuration case corresponding to the static data based on the database connection information, the database operation information, the operation result recording script information and the strategy script information. The JDBC protocol and the JMeter test tool are used as examples for the following description.
The first step is as follows: before using JMeter JDBC related functions, the JAR package of the database is placed under the installation directory of JMeter. 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 JMeter, and after the preparation work is finished, the JMeter is restarted.
The second step is that: add JMeter configuration element/JDBC connection configuration in the SETUP thread group of the test scenario as shown in fig. 4. And configuring database connection information including connection pool parameters, database connection strings, data driving classes, user names, passwords and the like according to the test environment of the system to be tested.
The third step: a JMeter sampler/JDBC Request is added to the SETUP thread group for the test scenario, as shown in FIG. 5. And filling in the database connection pool variable set in the second step, and selecting the type of the SQL statement. SQL statements support new, deleted, modified, queried, stored procedures, and the like. Then, a corresponding SQL statement may be written. And setting configuration information such as variable names, query timeout time and the like for storing the returned results of the SQL statements.
The fourth step: a JMeter Sampler/BeanShell Sampler is added to the SETUP thread group for the test scenario, as shown in FIG. 6. The same function can also be accomplished using a Java request sampler. The benshell script may then be written within a script writing text box. And saving the execution result of the JDBC request to a specified data file. The execution result variable name needs to be consistent with the setting in the second step.
The fifth step: adding a JMeter configuration element/CSV Data Set Config to a common thread group needing to use the Data file, associating the Data file generated in the fourth step, and configuring a strategy for using the Data file.
Through the method, the construction of the test data configuration case based on the static data is completed. Then, a test data configuration case can be run, a data record is accessed from a database based on SQL statements configured by the data generation part, the execution result of the JDBC request is stored in a specified data file by using a BeanShell script, and then specific data are called based on a strategy used by the data file to execute the test of the system to be tested.
Based on the solutions provided by the above embodiments, this specification further provides a scenario example, a test data configuration case construction method based on dynamic data. The method may include: device connection information based on the HTTP protocol configured in the data preparation sub-case is received. And receiving dynamic data generation configured in the data generation sub-case and recorded script information. And receiving the use strategy script information of the dynamic data record configured in the data use sub-case. And generating a test data configuration case corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information. The HTTP protocol and the LoadRunner test tool are used as examples for explanation, and links such as data preparation, resetting, and statistics may be configured according to attributes of the test tool, which is not described herein. The corresponding data generation and data use part is exemplified as follows:
the first step is as follows: and analyzing a service scene, assuming that the transaction to be tested is a protocol payment contract, and a client needs to input a short message verification code sent by a system when handling the service, so that the contract can be successfully signed after the verification passes. The short message verification code is identified as test real-time data.
The second step is that: the test transaction agreement payment signing trigger message for sending the short message verification code is compiled, and the short message verification code in the return text is stored in a variable, as shown in fig. 7. In order to avoid the influence of the auxiliary transaction generated by the test real-time data on the statistics of the test result of the tested transaction by the pressure test tool, the auxiliary transaction can be packaged in a single transaction execution.
The third step: the short message verification code SmsKey stored in the second step is used in the request message for agreement payment signing transaction, as shown in fig. 8.
By the method, the test data configuration case based on the dynamic data is constructed. Then, a test data configuration case may be run, data is dynamically generated based on a pre-configured dynamic generation manner in data generation and data use, and then the generated dynamic data is retrieved based on the configured dynamic data use manner to execute a test of the system under test.
According to the test data configuration case construction method, aiming at a specific test scene, the execution time sequence, the execution times, the execution duration and the like of each test link can be configured, and each test link can be effectively and flexibly configured according to needs, so that the test data configuration case is constructed more simply and conveniently. Meanwhile, for a specific test scene, connection parameters such as a server and a database, static data calling statements, dynamic data generation scripts, static data using scripts, dynamic data using scripts and the like corresponding to the test can be configured, a test result statistical mode can be configured, and the like, so that the construction of a test data configuration case in the specific test scene can be simply and conveniently completed.
Meanwhile, the constructed test data configuration case comprises parameter configuration information such as equipment connection parameters, data generation and use scripts and result statistical modes in a characteristic test scene besides the arrangement management of the test links, and the parameter configuration information can be flexibly allocated by a tester according to the requirement of the test scene, so that a reusable test data asset can be maintained. Correspondingly, the test data configuration case constructed under the test scene or the test data configuration case specially designed by professional testers 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 production versions. Over time, each performance testing task will result in a considerable amount of test data assets. The formation of the test assets provides convenient conditions for sharing and releasing the test results among the testers, and the efficiency and the quality of the test task data preparation work are improved. When retesting, after the test personnel transfer the test data configuration case that their needs, only need carry out simple adjustment and can put into use, improved the efficiency of test by a wide margin, reduced the test input cost.
In some embodiments, the test data configuration case corresponding to each target service system to be tested may be stored according to a difference of the target service systems to be tested, and the database corresponding to each target service system to be tested may be stored so as to be stored in one database in a unified manner, and the system identifier is used to identify the test data configuration case corresponding to each system. In other embodiments, a version identification may also be performed on a test data configuration case corresponding to any target business system to be tested, so as to identify a version of the test data configuration case. The version identification can be a case version number of the test data configuration case, and can also be a system version number of a target business system to be tested corresponding to the test data configuration case. By identifying the test data configuration case by using the version number of the target business system to be tested, a tester can analyze the test data configuration case corresponding to the system with the corresponding version conveniently, so that the test data configuration case is more convenient to select and maintain.
As shown in FIG. 9, in one example scenario, assume that an enterprise has an A system, a B system, a C system, and an XX system …. System a had commissioning versions at 1 and 12 months and both required performance testing. The testing task of the 1-month version of the system A is responsible for the testing personnel A, and the testing task of the 12-month version of the system A is responsible for the testing personnel B. During the test task of the 1-month version of the system A, the tester A spends a great deal of time and energy to accumulate the configured test data configuration cases based on the requirements of the test scenes. When the tester B carries out the test task of the 12-month version of the system A, because the time interval between the two test tasks is long, the test environment distributed by the test task of the 1-month version is already recovered, the test environment needs to be reconstructed for the test task of the 12-month version, and the tester B needs to spend a large amount of time and energy to accumulate the test data configuration case configured. By using the scheme provided by the embodiment, the tester B can reuse the test data configuration case of the system A in the test case database, and then, the test data configuration case can be properly adjusted according to the requirement, so that the test efficiency and convenience are improved. Similarly, tester C may submit a 3-month version of system C test data asset … …, thus implementing maintenance and reuse of test data configuration cases for each system under test.
The scheme provided by the embodiment can arrange the full life cycle management of the test data and other test cases in the test into a test scene, realize the integrated and automatic full-flow management of data cleaning, resetting, generating, using and counting, and realize good support for static data and dynamic data. Meanwhile, a large amount of script files for generating and using test data are formed in the construction process of the test data configuration case and can be packaged together as parameter configuration information of the test data configuration case, so that reusable test assets can be formed, convenient conditions are provided for sharing and releasing among testing personnel, tedious and accurate work of the test data during each test execution is avoided, the work efficiency and quality of test data preparation are improved, and the test efficiency and accuracy are further improved.
Based on the solutions provided by the above embodiments, embodiments of the present specification further provide a method for testing 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 following steps:
s102: and receiving a test request of the target business system.
The server of the test system can receive a test request sent by a tester through the test terminal for a certain target service system. The target service system can be any service system to be tested, a distributed service system or an independent service system. The test request may include, for example, a system identifier of the target service system, so that the test system invokes the test data configuration 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 identifier may be information for identifying a test data configuration case. The use case identifier may also adopt a system identifier, or may also adopt a sequence number, etc. In some embodiments, the use case identifier may further include a use case version identifier and/or a system version identifier. By further adopting the use case version identification and/or the system version identification to identify the test data configuration use case, historical test data configuration use cases can be more conveniently managed, and when a plurality of historical test data configuration use cases exist, the test data configuration use case of the latest version or the historical test data configuration use 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 case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 duration of each data configuration sub-case.
The server of the test system can obtain the test data configuration case corresponding to the test request. The test data configuration use case may include a plurality of data configuration use cases and parameter configuration information of the plurality of data configuration use cases. The parameter configuration information may include, for example, at least an execution timing sequence between a plurality of data configuration sub-cases, an execution number and/or an execution duration of each data configuration sub-case, and the like. The parameter configuration information may further include database connection information, associated device connection information related to dynamic data generation, and information such as SQL statements, scripts, data files, and the like corresponding to the data generation and use, according to the difference between the static test data and the dynamic test data.
The test data configuration case can be configured by a case configuration template for a tester based on a current test scene; or, the test case can also be a historical case directly called from a test case database corresponding to the test system; or, the test result may be obtained by readjusting the test result based on the current test scenario and based on the historical use case directly called from the test use case database corresponding to the test system. The configuration mode of the test data configuration case may be implemented with reference to the above-described embodiments, and details are not described here.
For example, if the target service system is a newly online system or a system that is newly online after being updated to a larger extent, the corresponding test scenario may need to be reconfigured, and the generation and usage of the corresponding test data also need to be reconfigured, at this time, a tester may configure the test data configuration case needed by the current test scenario by using the case configuration template. Of course, on the basis of the historical test data configuration case, the tester may also obtain the test data configuration case required by the current test scenario after greatly adjusting each sub-case and the parameter configuration information of the sub-case.
If the target service system is not greatly updated, the server of the test system can directly call the historical test data configuration case of the latest version corresponding to the target service system as the test data configuration case required by the current test scene, namely directly multiplexing the historical test data configuration case of the latest version. Of course, after the historical test data configuration case corresponding to the target service system is called, the tester can properly adjust each sub-case and the parameter configuration information of the sub-case according to the current test scenario to obtain the test data configuration case required by the current test scenario.
Correspondingly, in some embodiments, the server may call a historical test data configuration case corresponding to the target service system from a test case database; and determining a test data configuration case corresponding to the test request according to the called historical test data configuration case. The determination method may be direct multiplexing or multiplexing after adjustment, for example. Therefore, the workload of test data configuration is greatly reduced, and the test simplicity and the test efficiency are improved.
S106: and testing the processing performance of the target service system based on the test data configuration case to obtain a test result of the target service system.
The server of the test system may combine the test data configuration case with other test cases configured in the current test scenario to generate and use test data in the test process, so as to test the processing performance of the target service system and obtain the test result of the target service system. The specific combination mode may be determined by referring to a test tool and the like used in the corresponding test scenario, which is not described herein again.
The embodiments in the specification are all described in a progressive mode, the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the difference between the other embodiments. For details, reference may be made to the description of the related embodiments of the related processing, and details are not repeated herein.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
Based on the test method provided by the embodiment, the construction of the test data configuration case can be simpler and more convenient, a large amount of case assets can be effectively accumulated, the subsequent test can be conveniently reused or simply adjusted and then put into use, 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 foregoing embodiment, an embodiment of the present specification further provides a testing apparatus 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.
A use case obtaining module 112, configured to obtain a test data configuration use case corresponding to the test request; the test data configuration case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 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 case, so as to obtain a test result of the target service system.
It should be noted that the above-described apparatus may also include other embodiments according to the description of the method embodiment. The specific implementation manner may refer to the description of the related method embodiment, and is not described in detail herein.
Based on the scheme provided by the above embodiment, the embodiment of the present specification further 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: acquiring a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the data configuration sub-case is used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; the parameter types at least comprise execution time sequences among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases.
S124: and sending the case configuration template to the test terminal so as to display the test terminal.
S126: and receiving the selection operation of the user on the data configuration sub-case in the case configuration template fed back by the test terminal and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation.
S128: and 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.
Based on the method provided by the foregoing embodiment, an embodiment of the present specification further provides a test case generation apparatus. The apparatus may be applied to a server of the test system, and the apparatus may include:
the generation request receiving module may be configured to receive a test case generation request sent by a test terminal.
The template acquisition module can be used for acquiring a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the data configuration sub-case is used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; the parameter types at least comprise execution time sequences 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 may be configured to receive a selection operation of the user on the data configuration sub-case in the case configuration template and parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, where the selection operation is fed back by the test terminal.
The use case generation module may be configured to generate a test data configuration use case based on the data configuration use case corresponding to the selection operation and the parameter configuration information of the data configuration use case corresponding to the corresponding selection operation.
It should be noted that the test case generation method and apparatus described above may also include other embodiments according to the description of the foregoing embodiments. For a specific implementation, reference may be made to the description related to the foregoing embodiments, and details are not described herein.
Based on the scheme provided by the above embodiment, the embodiment of the present specification further 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 following steps:
s130: and sending a test case generation request to the 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 column and a parameter information configuration column.
S134: and receiving the selection operation of the user on the data configuration sub-case in the case configuration template and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, and feeding back the selection operation and the parameter configuration information to the server, so that the server generates 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.
Based on the method provided by the foregoing embodiment, an embodiment of the present specification further provides a test case generation apparatus. The device can be applied to a test terminal of the test system, and the device can comprise the following steps:
the request sending module may be configured to send a test case generation request to the server.
The template receiving module can be used for receiving the use case configuration template sent by the server; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column.
And the template display module can be used for displaying the use case configuration template.
The operation receiving module may be configured to receive a selection operation of a user on a data configuration sub-case in the case configuration template and parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, and feed back the selection operation and the parameter configuration information to the server, so that the server generates 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.
It should be noted that the test case generation method and apparatus described above may also include other embodiments according to the description of the foregoing embodiments. For a specific implementation, reference may be made to the description related to the foregoing embodiments, and details are not described herein.
Based on the solutions provided by the above embodiments, the present specification further provides a test system, which may be applied to a test system of a single service system, or may be applied to a plurality of computer data processing systems. The system may be a single 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 example devices of the present specification, in combination with a terminal device implementing hardware as necessary.
In some embodiments, the system may include a server and a test terminal. The server may include at least one processor and a memory for storing processor-executable instructions, which when executed by the processor implement the steps of the method of any one or more of the above embodiments. The test terminal may include at least one processor and a memory for storing processor-executable instructions that, 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 for storage on a medium using electrical, magnetic or optical means. The storage medium may include: devices that store information using electrical energy, such as various types of memory, e.g., RAM, ROM, etc.; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, and usb disks; devices that store information optically, such as CDs or DVDs. Of course, there are other ways of storing media that can be read, such as quantum memory, graphene memory, and so forth.
It should be noted that the above-mentioned device may also include other implementation manners according to the description of the method or apparatus embodiment, and specific implementation manners may refer to the description of the related method embodiment, which is not described in detail herein.
The apparatus of the embodiments of the present specification may include systems, software (applications), modules, components, servers, etc. that utilize the methods of the embodiments of the present specification in conjunction with hardware implementations where necessary. Because the implementation scheme of the apparatus for solving the problem is similar to that of the method, the specific implementation of the apparatus in the embodiment of the present description may refer to the implementation of the corresponding method, and repeated details are not repeated. As used herein, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the apparatus embodiments is preferably implemented in software, hardware, or a combination of software and hardware implementations are also possible and contemplated.
The embodiments of the present description are not limited to what must be consistent with a standard data model/template or described in the embodiments of the present description. Certain industry standards, or implementations modified slightly from those described using custom modes or examples, may also achieve the same, equivalent, or similar, or other, contemplated implementations of the above-described examples. The embodiments using these modified or transformed data acquisition, storage, judgment, processing, etc. may still fall within the scope of the alternative embodiments of the present description.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," 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 specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.
Claims (15)
1. A testing method is applied to a server of a testing system, and the method comprises the following steps:
receiving a test request of a target service system;
acquiring a test data configuration case corresponding to the test request; the test data configuration case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 duration of each data configuration sub-case;
and testing the processing performance of the target service system based on the test data configuration case to obtain a test result of the target service system.
2. The method of claim 1, wherein the data configuration sub-case comprises at least one of a data preparation sub-case, a data cleaning sub-case, a data re-configuration sub-case, a data generation sub-case, a data usage sub-case, and a results statistics sub-case.
3. The method of claim 1, wherein the test generated sub-cases comprise static data generated sub-cases and dynamic data generated sub-cases; the static data generation sub-case comprises data generation configuration information corresponding to the repeatedly used test data; the dynamic data generation sub-case comprises data generation configuration information corresponding to the real-time test data.
4. The method of claim 1, wherein the test data configuration case in the test case database is generated by:
acquiring a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters;
receiving the selection operation of a user on 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 in the information configuration frame;
and 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.
5. The method according to claim 1, wherein the obtaining of the test data configuration case corresponding to the test request includes:
calling a historical test data configuration case corresponding to the target service system from a test case database;
and determining a 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 comprises a use case version identifier and/or a system version identifier; correspondingly, the invoking of the historical test data configuration case corresponding to the target service system includes:
and calling the historical test data configuration use case corresponding to the use case version identification and/or the system version identification.
7. The method of claim 1, wherein the test data configuration case is generated by:
receiving database connection information configured in the data preparation sub-case;
receiving database operation information configured in the data generation sub-case, and recording the database operation result to operation result recording script information in the data file;
receiving use strategy script information which is configured in the data use sub-case and uses the data record in the data file;
and generating a test data configuration case corresponding to the static data based on the database connection information, the database operation information, the operation result recording script information and the strategy script information.
8. The method of claim 7, wherein the database operation information comprises an SQL statement type and a corresponding SQL statement.
9. The method of claim 1, wherein the test data configuration case is generated by:
receiving equipment connection information based on an HTTP (hyper text transport protocol) protocol configured in a data preparation sub-case;
receiving dynamic data generation configured in the data generation sub-case and script information recorded;
receiving use strategy script information of dynamic data records configured in the data use sub-case;
and generating a test data configuration case corresponding to the dynamic data based on the equipment connection information, the dynamic data generation and recorded script information and the strategy script information.
10. A testing apparatus, applied to a server of a testing system, the apparatus comprising:
the test request receiving module is used for receiving a test request of the target service system;
the case obtaining module is used for obtaining a test data configuration case corresponding to the test request; the test data configuration case comprises a plurality of data configuration sub-cases and parameter configuration information of the data configuration sub-cases; the data configuration sub-case is 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 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 case to obtain the test result of the target service system.
11. A test case generation method 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;
acquiring a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the data configuration sub-case is used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; the parameter types at least comprise execution time sequences among the data configuration sub-cases, execution times and/or execution duration of the data configuration sub-cases;
sending the case configuration template to the test terminal so as to display the test terminal;
receiving selection operation of a user on a data configuration sub-case in the case configuration template fed back by the test terminal and parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation;
and 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.
12. A test case generation device applied to a server of a test system, the device 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 a use case configuration template; the use case configuration template comprises a sub-use case selection column and a parameter information configuration column; the sub-case selection bar comprises a plurality of data configuration sub-cases; the data configuration sub-case is used for representing different sub-links in the test data configuration process; the parameter information configuration column comprises parameter types corresponding to the data configuration sub-cases and information configuration frames of the parameters; the parameter types at least comprise execution time sequences 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 case configuration template to the test terminal;
the information receiving module is used for receiving the selection operation of the user on the data configuration sub-case in the case configuration template fed back by the test terminal and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation;
and the case generating module is 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.
13. A test case generation method 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 sub-use case selection column and a parameter information configuration column;
and receiving the selection operation of the user on the data configuration sub-case in the case configuration template and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, and feeding back the selection operation and the parameter configuration information to the server, so that the server generates 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.
14. A test case generation device 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 sub-use case selection column and a parameter information configuration column;
the template display module is used for displaying the use case configuration template;
and the operation receiving module is used for receiving the selection operation of the data configuration sub-case in the case configuration template by the user and the parameter configuration information of the data configuration sub-case corresponding to the corresponding selection operation, and feeding back the selection operation and the parameter configuration information to the server so that the server generates 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.
15. The test system is characterized by comprising 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-9, 11;
the test terminal comprises at least one processor and a memory for storing processor-executable instructions which, when executed by the processor, implement steps comprising the method of claim 13.
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 true CN112115058A (en) | 2020-12-22 |
CN112115058B 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) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783788A (en) * | 2021-02-05 | 2021-05-11 | 北京同邦卓益科技有限公司 | Test system, test method, electronic device, and storage medium |
CN113010425A (en) * | 2021-03-18 | 2021-06-22 | 中国平安人寿保险股份有限公司 | System quality monitoring method and device, computer equipment and storage medium |
CN113093721A (en) * | 2021-02-04 | 2021-07-09 | 中国船级社 | Automatic concurrent ship collision avoidance testing method and system |
CN113688025A (en) * | 2021-09-07 | 2021-11-23 | 中国联合网络通信集团有限公司 | Interface test method, device, equipment and storage medium |
CN114428748A (en) * | 2022-03-30 | 2022-05-03 | 北京数腾软件科技有限公司 | Simulation test method and system for real service scene |
CN115952086A (en) * | 2022-12-19 | 2023-04-11 | 成都玖锦科技有限公司 | General automatic test system based on Google Block |
Citations (8)
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 |
US20150178182A1 (en) * | 2011-10-07 | 2015-06-25 | Syntel, Inc. | Software testing platform and method |
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 |
-
2020
- 2020-09-25 CN CN202011022409.5A patent/CN112115058B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150178182A1 (en) * | 2011-10-07 | 2015-06-25 | Syntel, Inc. | Software testing platform and method |
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 |
Non-Patent Citations (3)
Title |
---|
SMILINGH: "Jmeter中使用JDBC Connection Configuration、JDBC Request操作mysql数据库", pages 1 - 6, Retrieved from the Internet <URL:https://blog.csdn.net/smiling880230/article/ details/107083166/> * |
幽梅飘雪: "JMETER获取短信验证码接口压测", Retrieved from the Internet <URL:https://www.cnblogs.com/youlanfeier/p/10616142.html> * |
晴子0214: "Jmeter中压力测试带验证码的登录功能", Retrieved from the Internet <URL:https://www.cnblogs.com/qzsong0214/p/6907075.html> * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113093721A (en) * | 2021-02-04 | 2021-07-09 | 中国船级社 | Automatic concurrent ship collision avoidance testing method and system |
CN113093721B (en) * | 2021-02-04 | 2022-03-01 | 中国船级社 | Automatic concurrent ship collision avoidance testing method and system |
CN112783788A (en) * | 2021-02-05 | 2021-05-11 | 北京同邦卓益科技有限公司 | Test system, test method, electronic device, and storage medium |
CN112783788B (en) * | 2021-02-05 | 2023-12-05 | 北京同邦卓益科技有限公司 | Test system, method, electronic device and storage medium |
CN113010425A (en) * | 2021-03-18 | 2021-06-22 | 中国平安人寿保险股份有限公司 | System quality monitoring method and device, computer equipment 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 |
CN114428748A (en) * | 2022-03-30 | 2022-05-03 | 北京数腾软件科技有限公司 | Simulation test method and system for real service scene |
CN115952086A (en) * | 2022-12-19 | 2023-04-11 | 成都玖锦科技有限公司 | General automatic test system based on Google Block |
Also Published As
Publication number | Publication date |
---|---|
CN112115058B (en) | 2024-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112115058B (en) | Test method and device, test case generation method and device and test system | |
CN109302522B (en) | Test method, test device, computer system, and computer medium | |
US8463822B2 (en) | Data merging in distributed computing | |
US5701471A (en) | System and method for testing multiple database management systems | |
US10116534B2 (en) | Systems and methods for WebSphere MQ performance metrics analysis | |
CN110750458A (en) | Big data platform testing method and device, readable storage medium and electronic equipment | |
CN111147322A (en) | Test system and method for micro service architecture of 5G core network | |
CN110888818A (en) | Test case configuration system and method, automatic test system and method | |
CN111400186A (en) | Performance test method and system | |
CN111552628A (en) | Distributed pressure measurement system and method for graph database and graph service interface | |
CN112650688A (en) | Automated regression testing method, associated device and computer program product | |
CN112463588A (en) | Automatic test system and method, storage medium and computing equipment | |
CN112433948A (en) | Simulation test system and method based on network data analysis | |
CN114297961A (en) | Chip test case processing method and related device | |
CN111258893A (en) | Mobile terminal application automatic testing device for randomly assembling transaction path | |
CN116527553A (en) | Processing method, system and storage medium for automatic test report of switch | |
CN115269387A (en) | Automatic interface testing method and device | |
CN113094266B (en) | Fault testing method, platform and equipment for container database | |
CN116383025A (en) | Performance test method, device, equipment and medium based on Jmeter | |
CN112306862B (en) | Front-end automatic test system and method, storage medium and computing device | |
CN116048962A (en) | Test report generation method, device, computer equipment and storage medium | |
CN118503139B (en) | Automatic test method, equipment and medium for three-dimensional CAD system | |
US20240027998A1 (en) | Resume of failed automates in end-to-end process | |
CN113961472A (en) | Automatic testing method and device, storage medium and electronic equipment | |
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 |