Nothing Special   »   [go: up one dir, main page]

CN113434398B - A batch automated testing method and platform - Google Patents

A batch automated testing method and platform Download PDF

Info

Publication number
CN113434398B
CN113434398B CN202110697247.3A CN202110697247A CN113434398B CN 113434398 B CN113434398 B CN 113434398B CN 202110697247 A CN202110697247 A CN 202110697247A CN 113434398 B CN113434398 B CN 113434398B
Authority
CN
China
Prior art keywords
test
execution
statement
configuration table
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110697247.3A
Other languages
Chinese (zh)
Other versions
CN113434398A (en
Inventor
汤畅通
徐辰翀
孙婧岚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110697247.3A priority Critical patent/CN113434398B/en
Publication of CN113434398A publication Critical patent/CN113434398A/en
Application granted granted Critical
Publication of CN113434398B publication Critical patent/CN113434398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

本说明书实施例涉及大数据技术领域,具体公开了一种批量自动化测试方法及平台,应用于测试平台,所述测试平台中存储有测试配置表,所述测试配置表至少包括与作业标识相关联的至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息;所述方法包括:接收批量测试请求,所述批量测试请求至少包括指定作业标识;从所述测试配置表中读取所述指定作业标识所关联的至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息;利用读取的所述至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息对所述指定作业标识所标识的测试作业执行测试操作,从而可以实现自动化批量测试,提高批量测试的简便性。

The embodiments of this specification relate to the field of big data technology, and specifically disclose a batch automated testing method and platform, which are applied to a testing platform, wherein a test configuration table is stored in the testing platform, and the test configuration table at least includes at least one test execution statement associated with a job identifier and test environment information corresponding to the execution of the test execution statement; the method includes: receiving a batch testing request, wherein the batch testing request at least includes a specified job identifier; reading from the test configuration table at least one test execution statement associated with the specified job identifier and the test environment information corresponding to the execution of the test execution statement; performing a test operation on the test job identified by the specified job identifier using the read at least one test execution statement and the test environment information corresponding to the execution of the test execution statement, thereby realizing automated batch testing and improving the simplicity of batch testing.

Description

Batch automatic testing method and platform
Technical Field
The specification relates to the technical field of big data, in particular to a batch automatic testing method and a platform.
Background
Batch frameworks are an important way of data processing. With the continuous development of business, the original batch operation is often changed, and the stock operation is more, so that the manual test is influenced by time, hands and other factors, and the full coverage test is difficult to realize. The types and the quantity of stock operations are complex, so that test case script sentences are numerous, the problems that partial batch types are not supported and the like can exist, and further, the writing difficulty of test cases is high. In addition, the environment configuration related to batch operation test is complex and changeable, and manual test cannot be well adapted to the change of test application (different applications may have own characteristics) and test environment (mainly referred to as upstream dependent environment). Therefore, there is a need for an automatic batch test method that is more efficient and accurate.
Disclosure of Invention
The embodiment of the specification aims to provide a batch automatic testing method and platform, which can realize automatic batch testing and improve the simplicity and efficiency of batch testing.
The specification provides a batch automatic test method and platform, which are realized in the following modes:
A batch automatic test method is applied to a test platform, wherein a test configuration table is stored in the test platform and at least comprises at least one test execution statement associated with a job identifier and test environment information corresponding to the test execution statement in execution, the job identifier is information for identifying a test job, the batch automatic test method comprises the steps of receiving a batch test request at least comprising a designated job identifier, the designated job identifier is information for identifying at least one test job related to the batch test request, reading the at least one test execution statement associated with the designated job identifier and the test environment information corresponding to the test execution statement in execution from the test configuration table, and executing test operation on the test job identified by the designated job identifier by utilizing the read at least one test execution statement and the read test environment information corresponding to the test execution statement in execution.
In other embodiments of the method provided in the present disclosure, in a case where the test execution statement associated with the job identifier includes two or more test execution statements, an execution order is set between the two or more test execution statements, so that the two or more test execution statements are sequentially executed based on the corresponding execution order during testing.
In other embodiments of the method provided by the specification, the test configuration table comprises a statement configuration table and an environment configuration table, wherein at least one test execution statement associated with the job identifier is stored in the statement configuration table, and test environment information corresponding to the execution statement in execution is stored in the environment configuration table.
In other embodiments of the method provided by the specification, the test environment information stored in the environment configuration table is identified by using a test environment identifier, and the test execution statement includes the test environment identifier of the test environment information corresponding to the execution.
In other embodiments of the method provided in the present disclosure, the test environment information includes at least an environment type, so as to connect, when executing a test execution statement, a test environment corresponding to the test environment information based on an environment connection program corresponding to the environment type.
In other embodiments of the methods provided herein, the test configuration table further includes an assertion statement associated with the job identifier, the assertion statement being configured to verify an execution result of the corresponding test execution statement after execution of the test execution statement is completed.
In other embodiments of the method provided herein, the test configuration table further includes a storage address and a transfer address for the test data file associated with the job identification to copy the test data file required for testing from the storage address to the transfer address at the time of testing.
On the other hand, the specification also provides a batch automatic testing device which is applied to a testing platform, wherein a testing configuration table is stored in the testing platform, the testing configuration table at least comprises at least one testing execution statement and testing environment information corresponding to the testing execution statement in an operation identification mode, the operation identification mode is information for identifying testing operation, the device comprises a receiving module and a reading module, the receiving module is used for receiving batch testing requests, the batch testing requests at least comprise designated operation identification, the designated operation identification mode is information for identifying at least one testing operation related to the batch testing requests, the reading module is used for reading the at least one testing execution statement and the testing environment information corresponding to the testing execution statement in the operation identification mode from the testing configuration table, and the executing module is used for executing testing operation on the testing operation identified by the designated operation identification mode by means of the at least one testing execution statement and the testing environment information corresponding to the testing execution statement in the operation identification mode.
In other embodiments of the device provided by the specification, the test configuration table comprises a statement configuration table and an environment configuration table, wherein at least one test execution statement associated with the job identifier is stored in the statement configuration table, and test environment information corresponding to the execution statement in execution is stored in the environment configuration table.
In another aspect, the present disclosure also provides a test platform, the platform including at least one processor and a memory for storing processor-executable instructions that, when executed by the processor, implement the steps of the method in any one or more of the embodiments described above.
According to the batch automatic test method and the batch automatic test platform provided by one or more embodiments of the present disclosure, by configuring test execution statements, test environment information and the like into the test configuration table in advance, in the test process, the test platform can automatically execute batch test operations based on the test configuration table, so that the simplicity and the execution efficiency of batch test are improved. Based on the form of the test configuration table, maintenance and modification of test execution sentences, test environment information and the like can be performed more intuitively, and the convenience of test personnel in executing test operation is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic diagram of a configuration of test execution statements and assertion statements provided herein;
FIG. 2 is a schematic diagram of a read flow of a test execution statement or assertion statement provided herein;
FIG. 3 is a schematic diagram illustrating the reading of the test environment information and the connection of the test environment provided in the present specification;
FIG. 4 is a schematic diagram of information reading and execution of test execution provided in the present specification;
FIG. 5 is a schematic diagram of an execution result verification process in the test execution process provided in the present specification;
FIG. 6 is a schematic flow chart of an implementation of the batch automated testing method provided in the present specification;
fig. 7 is a schematic block diagram of a batch automatic testing device provided in the present specification.
Detailed Description
In order that those skilled in the art will better understand the technical solutions in this specification, a clear and complete description of the technical solutions in one or more embodiments of this specification will be provided below with reference to the accompanying drawings in one or more embodiments of this specification, and it is apparent that the described embodiments are only some embodiments of the specification and not all embodiments. All other embodiments, which may be made by one or more embodiments of the disclosure without undue effort by one of ordinary skill in the art, are intended to be within the scope of the embodiments of the disclosure.
In the scenario examples provided in the present specification, the batch automated testing method may be applied to a testing platform, where the testing platform may include a server, a database, and the like. When a test requirement exists, a tester can fill in the test requirement information in the terminal equipment. The tester can select or input the job identification, the test execution time and the like of the test job of the current batch test. The terminal equipment can initiate batch test requests according to the test requirement information input by the testers and send the batch test requests to the test platform. The test platform may perform an automated batch test based on the batch test request. Of course, the test trigger mechanism may be configured on the test platform or other platforms that interact with the test platform, and after the test trigger mechanism is satisfied, a batch test request may be generated, and the test platform may perform batch tests based on the batch test request. Alternatively, other test initiation methods may be used, which are not limited herein.
The test platform may have a test configuration table stored therein. The test configuration table may include at least one test execution statement associated with the job identifier and test environment information corresponding to the test execution statement when executed.
For example, the table specification of the test configuration table may be designed in advance as needed. Such as the table type of the test configuration table, the fields contained in the table, the information format of the field information under each field, etc., may be designed. The test configuration table may include, for example, at least a job identification field, a test execution statement field, an environment information field, an assertion statement field, and so forth. Of course, the tester may also call up the test configuration table used before, multiplex the table specification of the test configuration table, or make appropriate adjustments to the table specification of the test configuration table.
The tester can input test execution sentences corresponding to the test jobs and corresponding test environment information when the test execution sentences are executed in the test configuration table according to the test requirements, and input job identifications of the corresponding test jobs in a correlated mode. The test environment information may include a database environment, a server environment, etc. Such as server IP address, port, username, password, etc.
In the case that the test execution statement associated with the job identifier includes more than two test execution statements, an execution sequence may be further set between the more than two test execution statements, so that the test execution statements are sequentially executed based on the corresponding execution sequences during testing, and the corresponding test job is efficiently and accurately completed. Correspondingly, if the test configuration table can be accessed by a pre-constructed test analysis program, the test execution statement under each job identifier and the corresponding test environment information when the test execution statement is executed are read, and the test is completed. If the test analysis statement can be configured to read and analyze the test execution statement under a certain job identifier in sequence, batch test is automatically completed.
Or in the case that the test execution statement associated with the job identification includes more than two test execution statements, each test execution statement may be configured with a test execution statement identification. Correspondingly, the execution mode of each test execution statement mark can be configured in the test analysis program, and the execution mode can comprise the execution sequence of each test execution statement mark and the like, so that the test analysis program orderly reads and analyzes the test execution statement from the test configuration table, and batch test is automatically completed
The test execution statement and the test environment information corresponding to the test execution statement during execution can be respectively configured through two tables. Accordingly, the test configuration table may include a statement configuration table and an environment configuration table. At least one test execution statement associated with a job identification may be stored in the statement configuration table. The environment configuration table may store test environment information corresponding to the execution of the test execution statement. The test environment information stored in the environment configuration table can be identified by using a test environment identifier, and the test execution statement can correspondingly comprise the test environment identifier of the corresponding test environment information during execution.
The batch operation sometimes involves a plurality of databases and servers, and the test environment information corresponding to the test execution statement is directly configured into the test execution statement, so that the writing of the test execution statement is complicated, and the test execution statement is difficult to check and modify in case of errors. Meanwhile, if the test environment information is configured into the configuration file in the test analysis program, if the actual environment is changed, the configuration file of the program is also required to be modified one by one, so that the execution efficiency of batch operation is indirectly affected. In the scene example, the test environment information is configured into a table independently, and the test environment information corresponding to the test execution statement and the associated test execution statement is identified by using the test environment, so that the simplicity of writing the test execution statement and modifying the test environment information can be greatly improved, and the accuracy of connecting the test execution statement and the test environment information corresponding to the test execution statement is improved.
The test environment information at least can comprise an environment type, so that when a test execution statement is executed, the test environment corresponding to the test environment information is connected based on an environment connection program corresponding to the environment type. The environment connection modes corresponding to different test environments may have larger differences, and the simplicity and the accuracy of the test connection can be greatly improved by configuring different connection programs for different test environments. Table 1 is an example table of test environment information. Table 2 is an example table of test execution statements.
TABLE 1
TABLE 2
The test configuration table may further include an assertion statement associated with the job identifier, which may be used to verify an execution result of the corresponding test execution statement after execution of the test execution statement is completed. By further configuring the assertion statement, after the execution of the test execution statement is completed, whether the test execution statement is normally executed or not is judged, and therefore each link of the whole execution process can be effectively monitored from the code layer, and the test execution statement with errors can be conveniently and rapidly positioned accurately when the test execution is in error. And the test execution statement is configured in the test configuration table, so that a tester can conveniently modify and perfect the error test execution statement after positioning the error test execution statement, the checking and adjustment of the execution program in the batch test process are greatly improved, and the efficient operation of the batch test is effectively and simply realized.
For example, the execution modes of the test execution statement and the assertion statement may be configured in the test parsing statement. The execution manner may include, for example, testing whether the execution statement is executed after the execution of the execution statement is completed, which assertion statements are executed, when to execute the assertion statement, and so on. By configuring the assertion statement also to the test configuration table, the ease of automatic test execution can be further improved. Alternatively, a test execution statement flag of the test execution statement may be configured in the assertion statement to determine an association relationship between the assertion statement and the test execution statement based on the test execution statement flag. By configuring the association relation between the assertion statement and the test execution statement in the test configuration table, a tester can more intuitively check and modify the association relation between the test execution statement and the assertion statement, and the test maintenance simplicity is improved.
Preferably, the statement configuration table can be designed by using the table specification as shown in fig. 1, and the test execution statement configuration and the later maintenance simplicity can be improved by the way of separately configuring the test execution statement at different stages in the execution process.
The tester can upload the test data files related in the test process to the appointed position of the test platform for storage in advance. And the storage address and the transfer address of the test data file are input into the test configuration table. The transfer address refers to the location to which the test data file is transferred when the test is executed. Before configuring the information, a tester can also clean the records affecting the judgment of the batch execution result, so as to ensure the influence of other irrelevant data on the test.
After the tester configures the test configuration table according to the above embodiment, the terminal device may send the configured test configuration table to the database of the test platform for storage. The tester can also input test requirement information and trigger test starting operation in the terminal equipment, and the terminal equipment can generate batch test requests according to the trigger and send the batch test requests to the test platform. The test request may include, for example, a specified job identifier corresponding to the current test job.
The test platform may invoke the test parsing program according to the test request, so that the test parsing program reads and parses the test execution statement corresponding to the specified job identifier from the test configuration table, as shown in fig. 2. FIG. 2 is a flow chart of the reading and parsing of test execution statements. The test resolution program may also read test environment information based on the test environment identification in the test execution statement. The test analysis program may also call a corresponding environment connection program based on the environment type in the test environment information, so as to connect the environment corresponding to the test environment information based on the called environment connection program. Such as a data table to which a database may be connected or a connection server, etc. FIG. 3 is a flow chart showing the reading of test environment information and the connection of test environment. In the test execution process, the test analysis program can also read and analyze the assertion statement, and judge whether the test execution is correct or not by utilizing the assertion statement, so as to complete the execution of the whole automatic test case.
According to the scene example, the test execution statement, the test environment information, the assertion statement and the like are configured into the test configuration table in advance, and in the test process, the test platform can automatically execute batch test operation based on the test configuration table, so that the convenience and the execution efficiency of batch test are improved. Based on the form of the test configuration table, maintenance and modification of test execution sentences, test environment information, assertion sentences and the like can be performed more intuitively, and the convenience of test personnel in executing test operation is greatly improved.
An application of batch testing using an SQL+SHELL statement is described below.
Before execution, testers can modify batch existing date records in the database to finish operation dependence. And cleaning the past batch logs and preparing the data files.
When the method is executed, batch job execution can be performed by using the test analysis program. The shell script can be directly called for testing in the test.
After execution, judging the loading log of the data file. And judging batch records of the database.
The above process can be automated and simplified to:
Database operations (add, delete, change), server operations (delete files, add files) before execution.
During execution, the server operates (executes shell script).
After execution, the statement (database query, log query is executed in the server) is asserted.
The test execution statement is the addition, deletion, modification and check of the database, and the shell script and command line of the server. Accordingly, the test execution statements of database and server statements may generally be of the types of add, INSERT, DELETE, modify, UPDATE, query, SELECT, SHELL script file, sh$dir/filename. Sh, command line statement, rm, cp, and the like. For example, executing an UPDATE statement in an OS1 environment writes OS1: UPDATE. Executing the rm command in the LS1 environment, LS1: rm..
The test execution statement may be configured in the statement configuration table based on the statement type described above. The test environment identifier in the statement configuration table is consistent with the test environment identifier corresponding to each test environment in the environment configuration table, so that the corresponding test execution statement is executed in the environment corresponding to the test environment identifier. The database and server statement execution flow is shown in fig. 4.
The assertion statement may include an assertion execution statement, a target result acquisition statement, a comparison judgment statement, and the like. The assertion execution statement corresponding to the database is mainly a query of results by SELECT, and then the query results are compared with preset target results. The corresponding assertion execution statement of the server mainly screens out the error reporting information of the corresponding batch execution log, and then compares the screened error reporting information with a preset target result. If the database results are queried, the results queried by the query (OS 1: select..= VALUE) are true. If the execution log is judged that the value queried by the ASSERT (LS 1: cat/DIR/LOGFILE |grep., |=, RESULT) is true. The execution flow of the assertion statement is shown in fig. 5.
Compared with the mode of directly writing test case codes, the framework for batch automatic testing provided by the embodiment is easier to write and maintain test cases, can be frequently used after being written once, is operated by one key, and reduces the workload of testers. And the test execution statement and the test environment configuration are simpler and more visual, the modification and the variation are convenient, and the influence of the environment variation on the test program execution is reduced. And the method is easy to develop, and for batch types with other operations, only the corresponding code specifications are expanded and added into the table.
Based on the above scenario examples, the present embodiment of the present disclosure provides a batch automated testing method, as shown in fig. 6. FIG. 6 is a flow diagram of one embodiment of a batch automated testing method provided herein. The method can be applied to a test platform, a test configuration table is stored in the test platform, the test configuration table at least comprises at least one test execution statement associated with a job identifier and test environment information corresponding to the execution of the test execution statement, and the job identifier is information for identifying a test job. The method may comprise the following steps.
S602, receiving a batch test request, wherein the batch test request at least comprises a designated job identifier, and the designated job identifier refers to information for identifying at least one test job related to the batch test request.
S604, reading at least one test execution statement associated with the specified job identification from the test configuration table, and testing environment information corresponding to the execution of the test execution statement.
S606, executing test operation on the test job identified by the designated job identification by using the read at least one test execution statement and the test environment information corresponding to the execution of the test execution statement.
In other embodiments, in the case that the test execution statement associated with the job identifier includes more than two test execution statements, an execution order is set between the more than two test execution statements, so that the test execution statements are sequentially executed based on the corresponding execution order during testing.
In other embodiments, the test configuration table includes an execution statement configuration table and an environment configuration table, wherein at least one test execution statement associated with the job identifier is stored in the execution statement configuration table, and test environment information corresponding to the execution of the test execution statement is stored in the environment configuration table.
In other embodiments, the test environment information stored in the environment configuration table is identified by a test environment identifier, and the test execution statement includes the test environment identifier of the test environment information corresponding to the execution.
In other embodiments, the test environment information includes at least an environment type, so that when executing the test execution statement, the test environment corresponding to the test environment information is connected based on the environment connection program corresponding to the environment type.
In other embodiments, the test configuration table further includes an assertion statement associated with the job identifier, where the assertion statement is configured to verify an execution result of the corresponding test execution statement after execution of the test execution statement is completed.
In other embodiments, the test configuration table further includes a storage address and a transfer address of the test data file associated with the job identification to copy the test data file required for the test from the storage address to the transfer address at the time of the test.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. Specific reference may be made to the foregoing description of related embodiments of the related process, which is not described herein in detail.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the method provided by the embodiment, the embodiment of the specification also provides a batch automatic testing device which is applied to a testing platform, wherein a testing configuration table is stored in the testing platform, the testing configuration table at least comprises at least one testing execution statement associated with a job identifier and testing environment information corresponding to the execution of the testing execution statement, and the job identifier is information for identifying a testing job. As shown in FIG. 7, the apparatus may include a receiving module 702 configured to receive a batch test request, where the batch test request includes at least a specified job identifier, where the specified job identifier is information for identifying at least one test job related to the batch test request, a reading module 704 configured to read, from the test configuration table, at least one test execution statement associated with the specified job identifier and test environment information corresponding to the test execution statement when the test execution statement is executed, and an executing module 706 configured to execute a test operation on the test job identified by the specified job identifier using the read at least one test execution statement and the test environment information corresponding to the test execution statement when the test execution statement is executed.
It should be noted that the above-mentioned device according to the above-mentioned embodiment may also include other embodiments. Specific implementation may refer to descriptions of related method embodiments, which are not described herein in detail.
The present specification also provides a test platform which may include 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 or more of the embodiments described above. The memory may include physical means for storing information, typically by digitizing the information before storing it in an electrical, magnetic or optical medium. The storage medium may include devices for storing information using electric energy such as various memories, e.g., RAM, ROM, etc., devices for storing information using magnetic energy such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, usb disk, and devices for storing information using optical means such as CD or DVD. Of course, there are other ways of readable storage medium, such as quantum memory, graphene memory, etc.
It should be noted that the embodiments of the present specification are not limited to the case where the standard data model/template is met or described in the embodiments of the present specification. Some industry standards or embodiments modified slightly based on the implementation described by the custom manner or examples can also realize the same, equivalent or similar or predictable implementation effect after modification of the above examples. Examples of data acquisition, storage, judgment, processing, etc., using these modifications or variations are still within the scope of alternative embodiments of the present description.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (9)

1.一种批量自动化测试方法,其特征在于,应用于测试平台,所述测试平台中存储有测试配置表,所述测试配置表至少包括与作业标识相关联的至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息;所述作业标识是指对测试作业进行标识的信息;所述方法包括:1. A batch automated testing method, characterized in that it is applied to a test platform, wherein a test configuration table is stored in the test platform, wherein the test configuration table at least includes at least one test execution statement associated with a job identifier and test environment information corresponding to the execution of the test execution statement; the job identifier refers to information for identifying the test job; the method comprises: 接收批量测试请求,所述批量测试请求至少包括指定作业标识;所述指定作业标识是指对所述批量测试请求所涉及的至少一个测试作业进行标识的信息;Receive a batch test request, the batch test request including at least a specified job identifier; the specified job identifier refers to information for identifying at least one test job involved in the batch test request; 从所述测试配置表中读取所述指定作业标识所关联的至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息;Reading at least one test execution statement associated with the specified job identifier and the test environment information corresponding to the execution of the test execution statement from the test configuration table; 利用读取的所述至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息,对所述指定作业标识所标识的测试作业执行测试操作;Using the read at least one test execution statement and the test environment information corresponding to the execution of the test execution statement, a test operation is performed on the test job identified by the designated job identifier; 其中,所述测试配置表还包括与作业标识相关联的断言语句,所述断言语句用于在测试执行语句执行完成后对相应测试执行语句的执行结果进行验证;所述断言语句中配置有测试执行语句的测试执行语句标识,以基于该测试执行语句标识确定所述断言语句与该测试执行语句之间的关联关系。Among them, the test configuration table also includes an assertion statement associated with the job identifier, and the assertion statement is used to verify the execution result of the corresponding test execution statement after the test execution statement is executed; the assertion statement is configured with a test execution statement identifier of the test execution statement to determine the association relationship between the assertion statement and the test execution statement based on the test execution statement identifier. 2.根据权利要求1所述的方法,其特征在于,在作业标识所关联的测试执行语句包括两条以上的情况下,该两条以上的测试执行语句之间设置有执行顺序,以在测试时基于相应的执行顺序依次执行该两条以上的测试执行语句。2. The method according to claim 1 is characterized in that, when the test execution statements associated with the job identifier include more than two, an execution order is set between the more than two test execution statements, so that the more than two test execution statements are executed sequentially based on the corresponding execution order during testing. 3.根据权利要求1所述的方法,其特征在于,所述测试配置表包括语句配置表及环境配置表;所述语句配置表中存储有与作业标识相关联的至少一条测试执行语句;所述环境配置表中存储有测试执行语句执行时所对应的测试环境信息。3. The method according to claim 1 is characterized in that the test configuration table includes a statement configuration table and an environment configuration table; the statement configuration table stores at least one test execution statement associated with the job identifier; and the environment configuration table stores the test environment information corresponding to the execution of the test execution statement. 4.根据权利要求3所述的方法,其特征在于,所述环境配置表中存储的测试环境信息利用测试环境标识进行标识;所述测试执行语句包括执行时所对应的测试环境信息的测试环境标识。4. The method according to claim 3 is characterized in that the test environment information stored in the environment configuration table is identified by a test environment identifier; and the test execution statement includes the test environment identifier of the test environment information corresponding to the execution. 5.根据权利要求3所述的方法,其特征在于,所述测试环境信息至少包括环境类型,以在执行测试执行语句时基于所述环境类型对应的环境连接程序连接所述测试环境信息对应的测试环境。5. The method according to claim 3 is characterized in that the test environment information at least includes an environment type, so that when executing a test execution statement, a test environment corresponding to the test environment information is connected based on an environment connection program corresponding to the environment type. 6.根据权利要求1所述的方法,其特征在于,所述测试配置表还包括与作业标识相关联的测试数据文件的存储地址以及转移地址,以在测试时将测试所需的测试数据文件从所述存储地址复制至转移地址。6. The method according to claim 1 is characterized in that the test configuration table also includes a storage address and a transfer address of a test data file associated with the job identifier, so that the test data file required for the test can be copied from the storage address to the transfer address during the test. 7.一种批量自动化测试装置,其特征在于,应用于测试平台,所述测试平台中存储有测试配置表,所述测试配置表至少包括与作业标识相关联的至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息;所述作业标识是指对测试作业进行标识的信息;所述装置包括:7. A batch automated testing device, characterized in that it is applied to a test platform, wherein a test configuration table is stored in the test platform, wherein the test configuration table at least includes at least one test execution statement associated with a job identifier and test environment information corresponding to the execution of the test execution statement; the job identifier refers to information for identifying the test job; the device comprises: 接收模块,用于接收批量测试请求,所述批量测试请求至少包括指定作业标识;所述指定作业标识是指对所述批量测试请求所涉及的至少一个测试作业进行标识的信息;A receiving module, configured to receive a batch test request, wherein the batch test request at least includes a designated job identifier; the designated job identifier refers to information for identifying at least one test job involved in the batch test request; 读取模块,用于从所述测试配置表中读取所述指定作业标识所关联的至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息;A reading module, used to read from the test configuration table at least one test execution statement associated with the specified job identifier and the test environment information corresponding to the execution of the test execution statement; 执行模块,用于利用读取的所述至少一条测试执行语句及测试执行语句执行时所对应的测试环境信息,对所述指定作业标识所标识的测试作业执行测试操作;An execution module, configured to execute a test operation on the test job identified by the designated job identifier by using the read at least one test execution statement and the test environment information corresponding to the execution of the test execution statement; 其中,所述测试配置表还包括与作业标识相关联的断言语句,所述断言语句用于在测试执行语句执行完成后对相应测试执行语句的执行结果进行验证;所述断言语句中配置有测试执行语句的测试执行语句标识,以基于该测试执行语句标识确定所述断言语句与该测试执行语句之间的关联关系。Among them, the test configuration table also includes an assertion statement associated with the job identifier, and the assertion statement is used to verify the execution result of the corresponding test execution statement after the test execution statement is executed; the assertion statement is configured with a test execution statement identifier of the test execution statement to determine the association relationship between the assertion statement and the test execution statement based on the test execution statement identifier. 8.根据权利要求7所述的装置,其特征在于,所述测试配置表包括语句配置表及环境配置表;所述语句配置表中存储有与作业标识相关联的至少一条测试执行语句;所述环境配置表中存储有测试执行语句执行时所对应的测试环境信息。8. The device according to claim 7 is characterized in that the test configuration table includes a statement configuration table and an environment configuration table; the statement configuration table stores at least one test execution statement associated with the job identifier; and the environment configuration table stores the test environment information corresponding to the execution of the test execution statement. 9.一种测试平台,其特征在于,所述平台包括至少一个处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现权利要求1至6任一项所述方法的步骤。9. A test platform, characterized in that the platform comprises at least one processor and a memory for storing processor executable instructions, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 6.
CN202110697247.3A 2021-06-23 A batch automated testing method and platform Active CN113434398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110697247.3A CN113434398B (en) 2021-06-23 A batch automated testing method and platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110697247.3A CN113434398B (en) 2021-06-23 A batch automated testing method and platform

Publications (2)

Publication Number Publication Date
CN113434398A CN113434398A (en) 2021-09-24
CN113434398B true CN113434398B (en) 2025-02-18

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542757A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Interface testing environment determines method, apparatus, electronic equipment and storage medium
CN112988583A (en) * 2021-03-16 2021-06-18 中国建设银行股份有限公司 Method and device for testing syntax compatibility of database

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542757A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Interface testing environment determines method, apparatus, electronic equipment and storage medium
CN112988583A (en) * 2021-03-16 2021-06-18 中国建设银行股份有限公司 Method and device for testing syntax compatibility of database

Similar Documents

Publication Publication Date Title
US8151247B2 (en) Test data management
CN111832236B (en) Chip regression testing method and system, electronic equipment and storage medium
CN108345532A (en) A kind of automatic test cases generation method and device
US9507697B2 (en) Completing functional testing
WO2018010552A1 (en) Test method and device
CN109189479B (en) Parallel automatic verification method for processor instruction set
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
US20170277624A1 (en) Method and system for automated user interface (ui) testing through model driven techniques
CN112069073B (en) Test case management method, terminal and storage medium
US9389978B2 (en) Automated operating system test framework
US10592703B1 (en) Method and system for processing verification tests for testing a design under test
CN104901845A (en) Automation test system and method of domain name WHOIS service
CN111723009A (en) Framework system of python automated testing series products
CN117312270A (en) Change management method for automatic construction and deployment of database
CN117785723A (en) Dynamic interface parameter association method, device and electronic equipment
CN114996127A (en) Intelligent test method and system for solid state disk firmware module
CN113434398B (en) A batch automated testing method and platform
CN113836001A (en) Code detection method, device and storage medium
US20080172659A1 (en) Harmonizing a test file and test configuration in a revision control system
CN116991713B (en) Method, device, computer equipment and storage medium for executing use cases across environments
CN118093396A (en) Interface testing method, device, computer equipment and storage medium
CN117850866A (en) Data verification test method and system
CN113434398A (en) Batch automatic testing method and platform
CN112181809B (en) A graphical user interface automated testing method based on multiple positioning methods
TW202307670A (en) Device and method for automated generation of parameter testing requests

Legal Events

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