CN113886260A - Automatic testing method, system, computer equipment and storage medium - Google Patents

Automatic testing method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN113886260A
CN113886260A CN202111216661.4A CN202111216661A CN113886260A CN 113886260 A CN113886260 A CN 113886260A CN 202111216661 A CN202111216661 A CN 202111216661A CN 113886260 A CN113886260 A CN 113886260A
Authority
CN
China
Prior art keywords
test
target
case
data
test case
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.)
Pending
Application number
CN202111216661.4A
Other languages
Chinese (zh)
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202111216661.4A priority Critical patent/CN113886260A/en
Publication of CN113886260A publication Critical patent/CN113886260A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The present invention relates to the field of automated testing technologies, and in particular, to an automated testing method, an automated testing system, a computer device, and a storage medium. The automatic test method is applied to an automatic test system, wherein the automatic test system comprises a test platform and a number making platform; the automatic test method comprises the steps that when a target test case is executed through the test platform, the target test case is analyzed, and a number making request is generated; intercepting the number making request through the number making platform, and performing distributed authentication on the number making request; when the authentication is passed, responding to the manufacture number request through the manufacture number platform to generate simulation test data; and carrying out automatic testing based on the simulation test data through the test platform. The method can effectively improve the execution efficiency of the test case.

Description

Automatic testing method, system, computer equipment and storage medium
Technical Field
The present invention relates to the field of automated testing technologies, and in particular, to an automated testing method, an automated testing system, a computer device, and a storage medium.
Background
In the execution stage of the automatic test case, a real test environment is often required to be simulated for testing, so that batch numbering (i.e. generating simulation test data) is required for parameters required in the automatic test case. At present, the batch number making of part of fields (such as identity numbers) in an automatic test case can be realized by using Excel and UltraEdit tools, but when an automatic test script is actually executed, a test case needing to execute a number making task needs to be manually triggered by a tester, and when the test cases are executed in batch, the requirement of execution efficiency cannot be met.
Disclosure of Invention
The embodiment of the invention provides an automatic testing method, an automatic testing system, computer equipment and a storage medium, and aims to solve the problem that in the execution process of the current test case, a user needs to manually trigger a number making task, and the execution efficiency cannot be met.
An automatic test method is applied to an automatic test system, and the automatic test system comprises a test platform and a number making platform; the automatic test method comprises the following steps:
when a target test case is executed through the test platform, analyzing the target test case to generate a number making request;
intercepting the number making request through the number making platform, and performing distributed authentication on the number making request;
when the authentication is passed, responding to the manufacture number request through the manufacture number platform to generate simulation test data;
and carrying out automatic testing based on the simulation test data through the test platform.
An automatic test system comprises a test platform and a manufacture platform; the automated test system further comprises:
the system comprises a number making request generation module, a number making request generation module and a test platform, wherein the number making request generation module is used for analyzing a target test case to generate a number making request when the target test case is executed through the test platform;
the distributed authentication module is used for intercepting the manufacture number request through the manufacture number platform and performing distributed authentication on the manufacture number request;
the simulation test data generation module is used for responding to the number making request through the number making platform and generating simulation test data when the authentication is passed;
and the target test case execution module is used for carrying out automatic test on the basis of the simulation test data through the test platform.
A computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the steps of the above automated testing method when executing said computer program.
A computer storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned automated testing method.
According to the automatic test method, the automatic test system, the computer equipment and the storage medium, when the target test case is executed through the test platform, the target test is analyzed so as to automatically trigger one or more manufacture requests, a user does not need to manually specify a manufacture task, and the test case execution efficiency is effectively improved. Then, the number making platform intercepts the number making request and performs distributed authentication on the number making request, so that when the authentication is passed, the number making platform responds to the number making request to generate simulation test data, and the safety of the test process is ensured. And finally, the test platform carries out automatic test based on the simulation test data, and a user does not need to manually edit parameters required in the execution process of the target test case, so that the execution efficiency of the test case is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram illustrating an application environment of an automated testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an automated testing method according to an embodiment of the invention;
FIG. 3 is a flow chart of an automated testing method in an embodiment of the invention;
FIG. 4 is a detailed flowchart of step S301 in FIG. 3;
FIG. 5 is a flow chart of an automated testing method in an embodiment of the invention;
FIG. 6 is a detailed flowchart of step S202 in FIG. 2;
FIG. 7 is a flow chart of an automated testing method in an embodiment of the invention;
FIG. 8 is a detailed flowchart of step S702 in FIG. 7;
FIG. 9 is a schematic diagram of an automated test system in accordance with an embodiment of the present invention;
FIG. 10 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The automated testing method can be applied in an application environment as shown in fig. 1, in which a computer device communicates with a server via a network. Computer devices may include, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server may be implemented as a stand-alone server.
In an embodiment, as shown in fig. 2, an automated testing method is provided, which is described by taking the server in fig. 1 as an example, and includes the following steps:
s201: when the target test case is executed through the test platform, the target test case is analyzed, and the number making request is generated.
The target test case is one or more test cases currently being executed. The number request includes target number information and corresponding target number. The target manufacture number information refers to the manufacture number field required by the current test case, such as user name, gender, residence address, creator, updater, bank credit rating, certificate type, certificate number and the like.
Specifically, the method can be applied to a distributed automatic test system, wherein a corresponding number making platform (namely a platform for automatically generating simulation test data) and a test platform (namely a platform for executing test cases) are integrated in the automatic test system, when the test cases are executed through the test platform, one or more number making requests can be automatically triggered by analyzing a target test, so that the simulation data required in the case execution process is generated through the number making platform, when the test cases are executed in batch, a user does not need to manually specify a number making task, and the execution efficiency of the test cases can be effectively improved.
S202: intercepting the manufacture number request through the manufacture number platform, and performing distributed authentication on the manufacture number request.
Specifically, since the automated testing system in this embodiment is a distributed system, the number request needs to be intercepted by the interceptor corresponding to the number platform to obtain the login information corresponding to the number request, and the distributed authentication is performed on the number request according to the login information, so as to ensure the security of the testing process. The login information includes, but is not limited to, a user name and a password.
It can be understood that the login information of the user is stored in a redis cluster, where the login information of the user is stored in the redis cluster through a master-slave mode, and it can be understood that, after the user logs in at the front end, a session ID is generated, and when a subsequent user accesses the redis cluster, the subsequent user can access the redis cluster by carrying the session ID.
S203: and when the authentication is passed, responding to the number making request through the number making platform to generate simulation test data.
Specifically, when the authentication passes, the simulation test data required by the test case execution is acquired in response to the number generation request, so that the test case is executed based on the simulation test data.
In this embodiment, the manner of obtaining the simulation test data includes, but is not limited to, the following two manners, one is to read the simulation test data corresponding to the manufacture request, which has been generated in advance in the pre-data pool; one is to configure a corresponding model according to the target model information and the corresponding model number, so as to realize the on-line generation of simulation test data by executing the model.
It can be understood that when the authentication passes, the generated one or more number making requests are pushed to the message queue through the rabbitmq message middleware, so that the number making efficiency is effectively improved by multithreading and concurrent processing of multiple number making requests in the message queue.
S204: and carrying out automatic testing based on the simulation test data through the testing platform.
Specifically, the simulation test data can be filled into a corresponding field in the test script or stored in a database according to the instruction of the target test case so as to automatically execute the test case, and a user does not need to manually fill in parameters in the test script, so that the efficiency of the automatic test is further improved.
Exemplarily, when a certain test case is used for testing a login function, a user name and a password need to be input, for a field in a test script, namely, an attribute value of the user name and the password, corresponding simulation test data can be obtained from a manufacturer platform so as to transmit the simulation test data to the test script, and then the field is filled so as to execute the test case according to the filled test script; or, after the simulation test data is generated, the simulation test data may be stored in a database to provide a simulation database for the execution of the test case, that is, when the test case is executed, the simulation database may be accessed to test editing functions (such as adding, deleting, modifying, and checking), and the like.
In the embodiment, when the target test case is executed through the test platform, the target test is analyzed so as to automatically trigger one or more manufacture number requests, a manufacture number task is not required to be manually specified by a user, and the execution efficiency of the test case is effectively improved. Then, the number making platform intercepts the number making request and performs distributed authentication on the number making request, so that when the authentication is passed, the number making platform responds to the number making request to generate simulation test data, and the safety of the test process is ensured. And finally, the test platform carries out automatic test based on the simulation test data without manually editing parameters required in the target test case execution process by a user, so that the test case execution efficiency is further improved.
In an embodiment, as shown in fig. 3, after step S202, the automated testing method further includes the following steps:
s301: and determining at least one original test case as a similar test case of the target test case from the historical case set based on the case similarity between the target test case and each original test case in the historical case set.
The historical use case set comprises at least one original test case which is executed in a historical mode. The case characteristics are the case characteristics obtained after the case keywords of the test case are subjected to characteristic extraction. The first example feature has the same dimension as the second example feature, and includes but is not limited to the features of description documents, example titles, expectations, test points, test steps, example types, expected results, test methods, test directions, test ranges and the like. The similar test case is an original test case with higher similarity to the target test case. Specifically, a first case feature of an original test case and a second case feature corresponding to a target test case can be respectively extracted; and determining the similar test cases corresponding to the target test cases according to the case similarity based on the first case characteristics and the second case characteristics.
S302: reading an execution log of the similar test cases, and analyzing target trigger quantities corresponding to the similar test cases based on the execution log; the target trigger quantity is the trigger quantity of the artificial number task triggered in the similar test case.
The execution log refers to a log file generated after a test script corresponding to the similar test case is executed, and the execution log records, including but not limited to, execution time of the test, whether the artificial number task is triggered, an artificial number template adopted by the artificial number task, and an artificial number corresponding to the artificial number task. Specifically, the execution logs corresponding to the similar test cases are read from the database, so as to analyze the target trigger quantity of the similar test cases triggered by the artificial number task from multiple dimensions, for example, the target trigger quantity of the similar test cases triggered by the artificial number task is obtained through comprehensive analysis of the triggered quantity in the historical full-time interval, the triggered quantity in the latest period of time, the user-specified trigger quantity, and the like.
S303: and generating an initial manufacture task corresponding to the target test case based on the target trigger quantity.
Specifically, by judging the target trigger quantity and the preset trigger condition, if the preset trigger condition is met, it is judged that the target test case is triggered to the manufacture task with a high probability, so that the initial manufacture task of the target test case is created according to manufacture task information (such as manufacture templates adopted by the manufacture task) corresponding to similar test cases. The preset trigger condition may be set as a threshold or a range interval, or may be other trigger conditions, and may be set according to actual needs, which is not limited herein.
S304: and returning the initial modeling task to the front-end page, and receiving the target modeling task based on the front-end page.
Specifically, the automated testing system integrates the manufacture number platform and the testing platform, so that the execution log of the historically executed original test case can be read, and the original manufacture number task corresponding to the similar test case is analyzed in a multi-dimensional manner. The initial manufacture task corresponds to a manufacture template, and the manufacture template comprises one or more fields of manufacture required in an original test case.
S305: and generating a manufacture number request according to the target manufacture number task.
It can be understood that, by returning the initial manufacture task to the front-end page, the user can directly edit (including but not limited to add, delete, and change) the manufacture board displayed in the front-end page individually or in batches, for example, the user can edit the corresponding manufacture board in the constructed initial manufacture task, or newly add a manufacture digital segment in the manufacture board, and after the editing is completed, the updating of the initial manufacture task can be completed, the corresponding target manufacture task is obtained, and then one or more manufacture requests are generated, without manually triggering one or more manufacture tasks corresponding to the test case by the user, thereby improving the execution efficiency of the test case.
In an embodiment, as shown in fig. 4, in step S301, that is, based on the case similarity between the target test case and the historical executed original test case, determining a similar test case corresponding to the target test case specifically includes the following steps:
s401: and respectively extracting the first case characteristics of the original test case and the second case characteristics of the target test case.
Specifically, TF-IDF (term frequency-inverse document frequency) processing can be performed on case keywords corresponding to an original test case or a target test case, so that feature extraction is performed on the case keywords to obtain first case features; or analyzing the original test case or the target test case by a word segmentation technology, and then extracting the characteristics of the analyzed word elements by adopting word2vec to obtain the corresponding case characteristic representation.
S402: and determining the similar test cases based on the case similarity of the first case characteristics and the second case characteristics.
Specifically, the similar test case corresponding to the target test case is determined by calculating case similarity (for example, cosine similarity) of the first case feature and the second case feature, for example, when the case similarity reaches a preset similarity threshold, the similarity between the original test case and the target test case is considered to be high, so that the original test case can be used as the similar test case.
In one embodiment, as shown in fig. 5, the target trigger amount includes a first trigger amount within a first preset time period, an externally specified trigger amount, and a second trigger amount within a second preset time period; the automatic testing method also comprises the following steps:
s501: and determining a first weight value corresponding to the first trigger quantity, a second weight value corresponding to the second trigger quantity and a third weight value corresponding to the external specified trigger quantity based on the preset weight range.
The first preset time period is the total time before the current time. The first trigger quantity refers to a global trigger quantity of similar test cases in historical time. The second predetermined time period is the last period of time, such as the last 7 days, or the last month. The second trigger quantity refers to a local trigger quantity of the similar test case in a last period of time (i.e. a second preset period of time). The externally specified trigger quantity refers to the trigger quantity of the similar test case which is specified by a user to trigger the artificial number task in a first preset time period. The preset weight range is a plurality of pre-divided weight levels, each weight level corresponds to a standard weight value, different weight levels correspond to different trigger measuring value ranges, for example, the preset weight range is divided into three weight levels A, B, C, the weight level a corresponds to a standard weight value 1, the weight level B corresponds to a standard weight value 2, and the weight level C corresponds to a standard weight value 3; the trigger quantity value range corresponding to the weight level a is [0-50 ], the trigger quantity value range corresponding to the weight level B is [50-100 "), and the trigger quantity value range corresponding to the weight level C is [100, + ∞), and assuming that the first trigger quantity is 50 at this time, the first weight value corresponding to the first trigger quantity is determined to be 2 based on the weight level B.
S502: and weighting the first trigger quantity, the second trigger quantity and the external specified trigger quantity based on the first weight value, the second weight value and the third weight value to obtain the corresponding target trigger quantity.
Specifically, based on the first weight value, the second weight value, and the third weight value, the first trigger quantity, the second trigger quantity, and the external specified trigger quantity are weighted to obtain a corresponding target trigger quantity, that is, Z ═ a + B + C ═ C, where Z denotes the target trigger quantity, a denotes the first trigger quantity, B denotes the second trigger quantity, C denotes the external specified trigger quantity, a denotes the first weight value, B denotes the second weight value, and C denotes the third weight value.
S503: and when the target trigger quantity meets the trigger condition of the manufacture number task, generating an initial manufacture number task based on the manufacture number template corresponding to the original test case and the target trigger quantity.
Specifically, when the target trigger quantity meets the preset trigger condition, the initial manufacture number task corresponding to the target test case is constructed based on the manufacture number template corresponding to the original test case and the target trigger quantity, that is, the manufacture number template corresponding to the original test case is used as the manufacture number template of the target test case, and the target trigger quantity is used as the manufacture number (that is, the generation quantity of the simulation test data). The modeling task is a task for automatically generating model test data.
Illustratively, if the target test case is a stress test for a large number of concurrent login requests, a large number of user names and passwords need to be filled in the test script, so when the system detects that the similar test case of the current test case is a login concurrent test, the manufacture number template corresponding to the similar test case (the manufacture number template is a login manufacture number template, i.e. the user name and the password can be automatically generated according to manufacture number rules in the login manufacture number template) is used as the manufacture number template of the currently executed target test case, and the target trigger quantity is used as the manufacture number to construct an initial manufacture number task corresponding to the target test case, wherein the initial task comprises the manufacture number template and the corresponding target trigger quantity.
In an embodiment, as shown in fig. 6, in step S202, that is, responding to the manufacture number request through the manufacture number platform, generating the simulation test data specifically includes the following steps:
s601: and acquiring a target modeling template corresponding to the modeling request from a cache template library.
S602: and generating simulation test data according to the information of the number to be manufactured corresponding to the target number manufacturing template and the number manufacturing rule. Alternatively, the first and second electrodes may be,
the number-making template includes information of number to be made and number-making rules, the information of number to be made is the field which needs number making and is indicated in the number-making request, such as sex, name, ID number, etc.
It can be understood that different number making fields may correspond to different number making templates, and the target number making template may be obtained by matching the target number making information indicated by the number making request with the cache template library. If the number request carries the target number specified by the user, the number in the target number template needs to be further updated, so as to obtain one or more target number templates corresponding to the number request.
Furthermore, in this embodiment, different modeling templates are pre-constructed and stored in the database, and the latest updated modeling template is stored in the cache template library, so that when the modeling templates are called to perform modeling, the data access efficiency is improved.
In order to further ensure high availability of the system, a programming mode is further provided in the embodiment, so that when the modeling template required by the user does not exist in the system, the programming mode can be directly entered to program the required modeling template.
It can be understood that, in order to ensure the extensibility of the system, in the programming mode, the corresponding jar packet in the swagger component may be rewritten in advance, so that when a user needs to write a manufacturing scheme that the current manufacturing template does not have, only through annotation statement, for example, parameter class annotation param is implemented, then "io. @ acdapipraram (value ═ mobile phone number, "defaultValue ═ 000000," parameterstyleneenum. input _ REFRESH, InputType ═ inputtypeenum. phone) to interpret the method class corresponding to the mobile phone number.
S603: acquiring simulation test data corresponding to the number making request from a preposed data pool; the prepositive data pool stores simulation test data generated off line.
The pre-data pool stores test data generated by executing the number making template in the cache template library in advance, so as to prepare for simulation test data required by subsequent tests. The preposed data pool comprises a plurality of simulation test data corresponding to different data making templates, when a data making task is subsequently initiated or a data making request is received, the corresponding simulation test data can be directly obtained from the preposed data pool based on the data making templates required in the data making request, the time for generating the simulation test data on line is saved, and therefore the execution efficiency of the test case is guaranteed.
In an embodiment, as shown in fig. 7, after step S603, the automated testing method further includes the following steps:
s701: and monitoring the data volume of the preposed data pool.
S702: and when the data volume is lower than the preset minimum volume value, calling a data creating template in the cache template library to execute a data creating task so as to supplement the data volume of the preposed data pool.
Specifically, the preset data pool is correspondingly provided with a minimum capacity value, the data volume of the preset data pool is monitored in real time, when the data volume is lower than the preset minimum capacity value, the pre-edited data template is obtained from the cache data template, the data volume of the preset data pool is automatically supplemented, and the effective utilization of the preset data pool is guaranteed.
Further, the data amount of the pre-data pool may be supplemented in a plurality of ways, as long as the data amount of the pre-data pool is increased to the preset minimum capacity value, for example, the data amount of the pre-data pool may be randomly selected to perform the data making task for supplementation, or the data amount of the pre-data pool may be selected to perform the data making task for supplementation according to the priority of the data making template, which is not limited herein.
In an embodiment, as shown in fig. 8, in step S702, that is, invoking a modeling template in the cache template library to execute a modeling task, the method specifically includes the following steps:
s801: and acquiring the utilization rate of each analog template in the cache template library in a third preset time period.
The simulation test data in the preposed data pool is obtained by executing the number-making templates in advance, and the number of the numbers of the different number-making templates is different, so when the data is supplemented to the preposed data pool, the number priority of the different number-making templates can be determined according to the corresponding use frequency of the different number-making templates in the preposed data pool, and the number of the numbers of the pre-edited number-making templates obtained from the cache number-making templates can be executed according to the number priority of each number-making template so as to supplement the data volume of the preposed data pool.
In this embodiment, the usage frequency of each artifact template may be determined comprehensively by collecting the usage frequency and usage amount of the artifact template within a third preset time period (for example, the last 7 days), so as to avoid the problem that the accuracy of determining the priority cannot be guaranteed when a certain artifact template is used less times but used more times because only a single usage frequency is used for evaluation.
It should be understood that the first preset time period and the second preset time period in this embodiment are the same in meaning, and both refer to the latest time period, and the corresponding specific time period ranges may be the same or different.
As an embodiment, after the number of times of use and the usage amount of the manufacture template in the third preset time period are obtained, the number of times of use and the usage amount may be weighted according to a preset weight value to obtain a usage rate of each manufacture template, where the usage rate refers to a probability that the manufacture template is used in a subsequent short time.
As another embodiment, the history data may be fitted to determine the weight values corresponding to the two dimensions of the number of uses and the usage amount, for example, by fitting a curve to the number of uses and the usage amount of different number templates in the history and using the number of uses and the usage amount of the number template as sample data in a short period of time later (that is, the sample data includes the number of uses and the usage amount of the number template and whether the number template is used in a short period of time later), so as to construct a corresponding regression model, and when the pre-data is supplemented later, the number of uses and the usage amount of the number template may be directly input to the model, that is, the usage rate of the number template may be output.
S802: and determining the number priority of each number template according to the utilization rate.
S803: and calling a data making template in the cache template library to execute a data making task according to the data making priority so as to supplement the data volume of the preposed data pool.
Specifically, the obtained utilization rates of the different manufacture number templates are sequenced from large to small, so that the manufacture number priority of each manufacture number template is determined, the manufacture number templates edited in advance are obtained from the cache manufacture number templates according to the manufacture number priority of each manufacture number template, and the data volume of the preposed data pool is supplemented until the supplementary data volume in the current preposed data pool reaches a preset minimum volume value.
Further, after the amount of the supplementary data in the current pre-data pool reaches the preset minimum capacity value, the supplementary data may not be continued, or only the model creation template with the priority ranking in the first N bits is executed for supplementary, which is not limited herein.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, an automated testing system is provided, which corresponds to the automated testing method in the above embodiments one to one. As shown in fig. 9, the automated test system includes an artificial number request generating module 10, a distributed certification module 20, a simulation test data generating module 30, and a target test case executing module 40. The functional modules are explained in detail as follows:
a number request generating module 10, configured to analyze a target test case when the target test case is executed through the test platform, and generate a number request;
a distributed authentication module 20, configured to intercept the manufacture number request through the manufacture number platform, and perform distributed authentication on the manufacture number request;
a simulation test data generating module 30, configured to respond to the manufacture number request through the manufacture number platform and generate simulation test data when the authentication passes;
and the target test case execution module 40 is used for carrying out automatic test on the basis of the simulation test data through the test platform.
Specifically, the manufacture number request generating module comprises a similar test case determining unit, an execution log analyzing unit, an initial manufacture number task generating unit, a target manufacture number task receiving unit and a manufacture number request generating unit.
And the similar test case determining unit is used for determining the similar test case corresponding to the target test case based on the case similarity between the target test case and the historical executed original test case.
The execution log analysis unit is used for reading the execution logs of the similar test cases and analyzing the target trigger quantity of the similar test cases based on the execution logs; and the target trigger quantity is the trigger quantity of the artificial number task triggered in the similar test case.
And the initial manufacture task generating unit is used for generating an initial manufacture task of the target test case based on the target trigger quantity.
And the target manufacture task receiving unit is used for returning the initial manufacture task to a front end page and receiving the target manufacture task based on the front end page.
And the number request generating unit is used for generating the number request according to the target number task.
Specifically, the similar test case determining unit includes a case feature extracting subunit and a similar test case determining subunit.
And the case feature extraction subunit is used for respectively extracting the first case features of the original test case and the second case features of the target test case.
And the similar test case determining subunit is used for determining the similar test cases based on the case similarity of the first case characteristic and the second case characteristic.
Specifically, the target trigger quantity comprises a first trigger quantity in a first preset time period, an external specified trigger quantity and a second trigger quantity in a second preset time period; the automatic test system comprises a weight value determining module, a weighting processing module and an initial manufacture number task generating module.
And the weight value determining module is used for determining a first weight value corresponding to the first trigger quantity, a second weight value corresponding to the second trigger quantity and a third weight value corresponding to the external specified trigger quantity based on a preset weight range.
And the weighting processing module is used for weighting the first trigger quantity, the second trigger quantity and the external specified trigger quantity based on the first weight value, the second weight value and the third weight value to obtain corresponding target trigger quantities.
And the initial manufacturing task generating module is used for generating the initial manufacturing task based on the manufacturing template corresponding to the original test case and the target trigger quantity when the target trigger quantity meets the manufacturing task trigger condition.
Specifically, the simulation test data generation module includes a target analog-to-digital board acquisition unit, a first simulation test number generation unit, and a second simulation test number generation unit.
The target modeling template acquisition unit is used for acquiring a target modeling template corresponding to the modeling request from a cache template library;
the first simulation test data generating unit is used for generating the simulation test data according to the information of the number to be manufactured corresponding to the target number manufacturing template and the number manufacturing rule; alternatively, the first and second electrodes may be,
the second simulation test number generation unit is used for acquiring simulation test data corresponding to the number making request from a front data pool; the preposed data pool stores simulation test data generated off line.
Specifically, the automatic test system further comprises a monitoring module and a data supplementing module.
And the monitoring module is used for monitoring the data volume of the preposed data pool.
And the data supplement module is used for calling the modeling template in the cache template library to execute a modeling task when the data volume is lower than a preset minimum volume value so as to supplement the data volume of the preposed data pool.
Specifically, the automatic test system further comprises a utilization rate acquisition unit, a manufacture number priority determination unit and a data supplement unit.
And the utilization rate obtaining unit is used for obtaining the utilization rate of each manufacture number template in the cache template library in a third preset time period.
And the number priority determining unit is used for determining the number priority of each number template according to the utilization rate.
And the data supplementing unit is used for calling the modeling templates in the cache template library to execute the modeling task according to the modeling priority of each modeling template so as to supplement the data volume of the preposed data pool.
For the specific definition of the automated testing system, reference may be made to the above definition of the automated testing method, which is not described herein again. The various modules in the automated test system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a computer storage medium and an internal memory. The computer storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the computer storage media. The database of the computer device is used to store data, such as a manufacturer template, generated or obtained during execution of the automated test method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an automated testing method.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the automated testing method in the above embodiments when executing the computer program, such as the steps S201-S204 shown in fig. 2 or the steps shown in fig. 3 to 8. Alternatively, the functions of the modules/units in this embodiment of the automated testing system, such as the functions of the modules/units shown in fig. 9, are realized when the processor executes the computer program, and are not described herein again to avoid repetition.
In an embodiment, a computer storage medium is provided, where a computer program is stored on the computer storage medium, and when executed by a processor, the computer program implements the steps of the automated testing method in the foregoing embodiments, such as steps S201 to S204 shown in fig. 2 or steps shown in fig. 3 to fig. 8, which are not repeated herein for avoiding repetition. Alternatively, the computer program, when executed by the processor, implements the functions of each module/unit in the embodiment of the automatic test system, for example, the functions of each module/unit shown in fig. 9, and are not described herein again to avoid repetition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the system is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An automatic test method is characterized in that the method is applied to an automatic test system, and the automatic test system comprises a test platform and a manufacture platform; the automatic test method comprises the following steps:
when a target test case is executed through the test platform, analyzing the target test case to generate a number making request;
intercepting the number making request through the number making platform, and performing distributed authentication on the number making request;
when the authentication is passed, responding to the manufacture number request through the manufacture number platform to generate simulation test data;
and carrying out automatic testing based on the simulation test data through the test platform.
2. The automated testing method of claim 1, wherein said parsing the target test case to generate a number request comprises:
determining at least one original test case from the historical case set as a similar test case of the target test case based on case similarity of the target test case and each original test case in the historical case set;
reading an execution log of the similar test case, and analyzing a target trigger quantity of the similar test case based on the execution log; the target trigger quantity is the trigger quantity of the number making task triggered in the similar test case;
generating an initial manufacture number task of the target test case based on the target trigger quantity;
returning the initial modeling task to a front-end page, and receiving a target modeling task based on the front-end page;
and generating the manufacture number request according to the target manufacture number task.
3. The automated testing method of claim 2, wherein determining similar test cases corresponding to the target test case based on case similarity between the target test case and the historical executed original test cases comprises:
respectively extracting first case characteristics of the original test case and second case characteristics of the target test case;
and determining the similar test case based on the case similarity of the first case characteristic and the second case characteristic.
4. The automated testing method of claim 2, wherein the target trigger amount comprises a first trigger amount within a first preset time period, an externally specified trigger amount, and a second trigger amount within a second preset time period;
the reading of the execution logs of the similar test cases and the analysis of the target trigger quantity corresponding to the similar test cases based on the execution logs include:
determining a first weight value corresponding to the first trigger quantity, a second weight value corresponding to the second trigger quantity and a third weight value corresponding to the external specified trigger quantity based on a preset weight range;
based on the first weight value, the second weight value and the third weight value, weighting the first trigger quantity, the second trigger quantity and the external specified trigger quantity to obtain corresponding target trigger quantities;
generating an initial manufacture number task corresponding to the target test case based on the target trigger quantity, wherein the initial manufacture number task comprises the following steps:
and when the target trigger quantity meets the trigger condition of the manufacture number task, generating the initial manufacture number task based on the manufacture number template corresponding to the original test case and the target trigger quantity.
5. The automated testing method of claim 1, wherein said generating, by said manufacturer platform in response to said manufacturer request, simulated test data comprises:
acquiring a target modeling template corresponding to the modeling request from a cache template library;
generating the simulation test data according to the information of the number to be manufactured corresponding to the target number manufacturing template and the number manufacturing rule; alternatively, the first and second electrodes may be,
acquiring simulation test data corresponding to the number making request from a front data pool; the preposed data pool stores simulation test data generated off line.
6. The automated testing method of claim 5, wherein after obtaining the simulated test data corresponding to the manufacture request from a pre-staging data pool, the automated testing method further comprises:
monitoring the data volume of the preposed data pool;
and when the data volume is lower than a preset minimum volume value, calling a data creating template in the cache template library to execute a data creating task so as to supplement the data volume of the preposed data pool.
7. The automated testing method of claim 6, wherein said invoking an artificial template in said cache template library to perform an artificial task comprises:
acquiring the utilization rate of each manufacture number template in the cache template library within a third preset time period;
determining the number priority of each number template according to the utilization rate;
and calling the number making templates in the cache template library to execute a number making task according to the number making priority of each number making template so as to supplement the data volume of the preposed data pool.
8. An automatic test system is characterized by comprising a test platform and a number making platform; the automated test system further comprises:
the system comprises a number making request generation module, a number making request generation module and a test platform, wherein the number making request generation module is used for analyzing a target test case to generate a number making request when the target test case is executed through the test platform;
the distributed authentication module is used for intercepting the manufacture number request through the manufacture number platform and performing distributed authentication on the manufacture number request;
the simulation test data generation module is used for responding to the number making request through the number making platform and generating simulation test data when the authentication is passed;
and the target test case execution module is used for carrying out automatic test on the basis of the simulation test data through the test platform.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the automated testing method according to any one of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the automated testing method according to any one of claims 1 to 7.
CN202111216661.4A 2021-10-19 2021-10-19 Automatic testing method, system, computer equipment and storage medium Pending CN113886260A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111216661.4A CN113886260A (en) 2021-10-19 2021-10-19 Automatic testing method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111216661.4A CN113886260A (en) 2021-10-19 2021-10-19 Automatic testing method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113886260A true CN113886260A (en) 2022-01-04

Family

ID=79003608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111216661.4A Pending CN113886260A (en) 2021-10-19 2021-10-19 Automatic testing method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113886260A (en)

Similar Documents

Publication Publication Date Title
CN111506498B (en) Automatic generation method and device of test case, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
EP3332320B1 (en) Model integration tool
CN108388515B (en) Test data generation method, device, equipment and computer readable storage medium
CN110888911A (en) Sample data processing method and device, computer equipment and storage medium
CN110851159B (en) Business rule updating method and device, computer equipment and storage medium
CN113159737B (en) RPA service processing method, RPA management platform, device and medium
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN111797026A (en) Test case generation method and device, computer equipment and storage medium
CN109542764B (en) Webpage automatic testing method and device, computer equipment and storage medium
CN110688168A (en) Method, device and equipment for improving starting speed of application program and storage medium
CN111475494A (en) Mass data processing method, system, terminal and storage medium
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
CN113419950A (en) Method and device for generating UI automation script, computer equipment and storage medium
CN114610635A (en) Interface test case generation method and device, computer equipment and storage medium
CN112527786B (en) Data table partition newly-adding method and device, computer equipment and storage medium
CN110633213B (en) Unit test method, unit test device, computer equipment and storage medium
CN114090462B (en) Software repeated defect identification method and device, computer equipment and storage medium
CN113886260A (en) Automatic testing method, system, computer equipment and storage medium
CN111147441A (en) Method and device for automatically detecting fraud behaviors of online ticket purchasing and readable storage medium
CN113176995B (en) Interface testing method, device, equipment and medium based on testing scene
WO2019062087A1 (en) Attendance check data testing method, terminal and device, and computer readable storage medium
CN114971926A (en) Premium calculation model test method, system, device and storage medium
CN112187564A (en) vSAN performance test method, apparatus, computer device and storage medium
CN112181831A (en) Script performance verification method, device and equipment based on keywords and storage medium

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