CN112069068A - Automatic test data processing method, device, equipment and readable storage medium - Google Patents
Automatic test data processing method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN112069068A CN112069068A CN202010918867.0A CN202010918867A CN112069068A CN 112069068 A CN112069068 A CN 112069068A CN 202010918867 A CN202010918867 A CN 202010918867A CN 112069068 A CN112069068 A CN 112069068A
- Authority
- CN
- China
- Prior art keywords
- test data
- modification
- modified
- target
- automatic test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 579
- 238000003672 processing method Methods 0.000 title claims abstract description 33
- 238000012986 modification Methods 0.000 claims abstract description 305
- 230000004048 modification Effects 0.000 claims abstract description 305
- 238000012545 processing Methods 0.000 claims abstract description 40
- 238000000034 method Methods 0.000 claims abstract description 38
- 230000009471 action Effects 0.000 claims description 31
- 238000012795 verification Methods 0.000 claims description 10
- 238000012790 confirmation Methods 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 6
- 238000012423 maintenance Methods 0.000 abstract description 6
- 238000005516 engineering process Methods 0.000 abstract description 3
- 230000008569 process Effects 0.000 description 10
- 238000013142 basic testing Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
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 application discloses an automatic test data processing method, an automatic test data processing device, automatic test data processing equipment and a readable storage medium, and relates to a block chain technology, wherein the method comprises the following steps: when an automatic test instruction is detected, receiving a demand document of an automatic test, and extracting modification parameters in the demand document; obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter; and modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instructions, and combining the target test data to be combined to obtain a target automatic test case. The method and the device solve the technical problems that in the prior art, the automatic test development efficiency is low, and the code maintenance cost is too high.
Description
Technical Field
The present application relates to the field of artificial intelligence and block chaining technologies, and in particular, to an automated test data processing method, apparatus, device, and readable storage medium.
Background
The automatic test technology is applied more and more widely in the industry, at present, a linear script compiling method (or a recording playback method) is usually adopted to compile an automatic test script, but the code reusability of the automatic test script compiled by the linear script compiling method (or the recording playback method) is very low, so that the automatic test script is huge, the code stability is poor, when the system service logic is subjected to iterative change, the code with the huge script needs to be repeatedly modified, the efficiency of automatic test development is further reduced, and the code maintenance cost is overhigh.
Disclosure of Invention
The present application mainly aims to provide an automated test data processing method, an automated test data processing apparatus, an automated test data processing device, and a readable storage medium, and aims to solve technical problems that in the prior art, automated test development efficiency is low, and code maintenance cost is too high.
In order to achieve the above object, the present application provides an automated test data processing method, including:
when an automatic test instruction is detected, receiving a demand document of an automatic test, and extracting modification parameters in the demand document;
obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter;
and modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instructions, and combining the target test data to be combined to obtain a target automatic test case.
Optionally, the step of obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automated test data associated with the modification parameter according to the data hierarchy of the modification parameter includes:
acquiring the type of the modification parameter, and determining the data hierarchy of the modification parameter according to the type of the modification parameter;
determining each modification code of the modification parameter according to the data hierarchy;
and determining each piece of to-be-modified automatic test data associated with the modification parameters according to each modification code of the modification parameters.
Optionally, the step of determining, according to the modification data modification code, each piece of automated test data to be modified associated with the modification parameter includes:
if the modification code of the modification parameter is the first type modification code, determining the automatic test data to be modified as the automatic test scene data to be modified of the scene layer;
if the modification code of the modification parameter is a second type modification code, determining the automatic test data to be modified as the automatic test action data to be modified of the action layer;
and if the modification code of the modification parameter is a third type modification code, determining the automatic test data to be modified as the automatic test step data to be modified of the step layer.
Optionally, the step of obtaining the type of the modification parameter and determining the data hierarchy of the modification parameter according to the type of the modification parameter includes:
acquiring attribute information of the modification parameters and identification information of the modification parameters to determine the types of the modification parameters;
determining a data hierarchy of the modification parameter according to the type of the modification parameter, wherein the data hierarchy of the modification parameter comprises a first hierarchy, a second hierarchy and a third hierarchy.
Optionally, the modifying the automated test data to be modified to obtain target test data to be combined of the automated test instructions, and combining the target test data to be combined to obtain the target automated test case includes:
modifying each automatic test data to be modified to obtain modified automatic test data;
displaying the modified automatic test data, and receiving each modification instruction fed back by a user based on the modified automatic test data;
selecting a target modified automated test data from each of the modified automated test data based on the respective modification instruction;
obtaining unmodified target test data based on the automatic test instruction, and determining target test data to be combined of the automatic test instruction based on the unmodified target test data and the target modified automatic test data;
based on the automatic test instruction, acquiring a combination sequence and an embedding position of target test data to be combined;
and combining to obtain the target automatic test case according to the combination sequence and the embedding position.
Optionally, after the step of modifying the automated test data to be modified to obtain target test data to be combined of the automated test instruction and combining the target test data to be combined to obtain the target automated test case, the method includes:
executing a preset automatic test flow based on the target automatic test case to obtain a test result;
comparing the test result with a preset expected result to obtain a comparison result;
and determining a verification result of the target automation test case based on the comparison result.
Optionally, the modifying the automated test data to be modified to obtain target test data to be combined of the automated test instructions, and combining the target test data to be combined to obtain the target automated test case includes:
modifying each automated test data to be modified to obtain target test data to be combined of the automated test instruction;
uploading the target test data to be combined to a preset block chain block so as to perform consensus confirmation processing on the target test data to be combined;
and if the consensus of the target test data to be combined is confirmed, combining the target test data to be combined to obtain the target automatic test case.
The present application further provides an automated test data processing apparatus, the automated test data processing apparatus includes:
the detection module is used for receiving a demand document of the automatic test and extracting modification parameters in the demand document when detecting an automatic test instruction;
the first determining module is used for acquiring the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter;
and the first acquisition module is used for modifying each piece of automatic test data to be modified so as to acquire target test data to be combined of the automatic test instruction, and combining the target test data to be combined so as to acquire a target automatic test case.
Optionally, the first determining module includes:
the first acquisition unit is used for acquiring the type of the modification parameter and determining the data hierarchy of the modification parameter according to the type of the modification parameter;
a first determining unit, configured to determine, according to the data hierarchy, each modification code of the modification parameter;
and the second determining unit is used for determining each piece of to-be-modified automatic test data associated with the modification parameter according to each modification code of the modification parameter.
Optionally, the second determining unit includes:
the first determining subunit is configured to determine, if the modification code of the modification parameter is the first type modification code, that the automated test data to be modified is the automated test scenario data to be modified of the scenario layer;
the second determining subunit is configured to determine, if the modification code of the modification parameter is a second type modification code, that the automated test data to be modified is automated test action data to be modified of an action layer;
and a third determining subunit, configured to determine, if the modification code of the modification parameter is a third type modification code, that the automated test data to be modified is automated test step data to be modified in a step layer.
Optionally, the first obtaining unit includes:
the first acquisition subunit is configured to acquire attribute information of the modification parameter and identification information of the modification parameter, so as to determine a type of the modification parameter;
and the fourth determining subunit is configured to determine, according to the type of the modification parameter, a data hierarchy of the modification parameter, where the data hierarchy of the modification parameter includes a first hierarchy, a second hierarchy, and a third hierarchy.
Optionally, the first obtaining module includes:
the modification unit is used for modifying the automatic test data to be modified to obtain modified automatic test data;
the display unit is used for displaying the modified automatic test data and receiving each modification instruction fed back by a user based on the modified automatic test data;
a selection unit configured to select a target modified automated test data from each of the modified automated test data based on each of the modification instructions;
a third determining unit, configured to obtain unmodified target test data based on the automation test instruction, and determine target test data to be combined of the automation test instruction based on the unmodified target test data and the target modified automation test data;
the second acquisition unit is used for acquiring the combination sequence and the embedding position of the target test data to be combined based on the automatic test instruction;
and the combination unit is used for combining to obtain the target automatic test case according to the combination sequence and the embedding position.
Optionally, the automated test data processing apparatus further includes:
the second acquisition module is used for executing a preset automatic test flow based on the target automatic test case to obtain a test result;
the comparison module is used for comparing the test result with a preset expected result to obtain a comparison result;
and the second determination module is used for determining the verification result of the target automation test case based on the comparison result.
Optionally, the first obtaining module includes:
a third obtaining unit, configured to modify each piece of to-be-modified automated test data to obtain to-be-combined target test data of the automated test instruction;
the consensus unit is used for uploading the target test data to be combined to a preset block chain block so as to perform consensus confirmation processing on the target test data to be combined;
and the fourth obtaining unit is used for combining the target test data to be combined to obtain the target automatic test case if the consensus of the target test data to be combined is confirmed to be completed.
The present application further provides an automated test data processing apparatus, the automated test data processing apparatus is an entity apparatus, the automated test data processing apparatus includes: a memory, a processor and a program of the automated test data processing method stored on the memory and executable on the processor, which program, when executed by the processor, may implement the steps of the automated test data processing method as described above.
The present application also provides a readable storage medium having stored thereon a program for implementing the above-described automated test data processing method, the program implementing the above-described automated test data processing method when executed by a processor.
The method comprises the steps of receiving a demand document of an automatic test when an automatic test instruction is detected, and extracting modification parameters in the demand document; obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter; and modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instructions, and combining the target test data to be combined to obtain a target automatic test case. Compared with the prior art that the automatic test script is compiled by adopting a linear script compiling method (or a recording playback method), in the application, modification parameters are determined based on the received requirement document of the automatic test; further determining each automatic test data to be modified associated with the modification parameters; the automatic test data to be modified is modified to obtain target test data to be combined of the automatic test instruction, so as to automatically obtain a target automatic test case, that is, in this embodiment, other test data except the automatic test data to be modified is reused, so that repeated modification of codes is avoided, poor stability of the codes is improved, the efficiency of automatic test development is further improved, and the code maintenance cost is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of an automated test data processing method according to the present application;
FIG. 2 is a flowchart illustrating a detailed process of performing speech recognition on speech data to be recognized to obtain candidate results of the speech data to be recognized according to a first embodiment of the automated test data processing method of the present application;
FIG. 3 is a schematic diagram of an apparatus configuration of a hardware operating environment according to an embodiment of the present application;
fig. 4 is a schematic view of a scenario in the automated test data processing method according to the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a first embodiment of the automated test data processing method of the present application, referring to fig. 1, the automated test data processing method includes:
step S10, when an automatic test instruction is detected, receiving a demand document of an automatic test, and extracting modification parameters in the demand document;
step S20, obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each automated test data to be modified associated with the modification parameter according to the data hierarchy of the modification parameter;
and step S30, modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instruction, and combining the target test data to be combined to obtain a target automatic test case.
The method comprises the following specific steps:
step S10, when an automatic test instruction is detected, receiving a demand document of an automatic test, and extracting modification parameters in the demand document;
in this embodiment, it should be noted that the automated test data processing method is applied to an automated test data processing system, where the automated test data processing system is subordinate to an automated test data processing device, and for the automated test data processing system, there are a plurality of basic test cases with different functions, specifically, for example, the basic test cases may be car insurance process test cases (for insurance), policy synchronization process test cases (for policy synchronization), policy following process test cases (for policy following) and wind control process test cases (for wind control), and the plurality of basic test cases with different functions may be prestored in a preset automated test model, and it should be noted that a test with the same function may also include a plurality of types of basic test cases to meet different test requirements, specifically, the test cases of the insurance application process may include at least 2 types of basic test cases, for example, the first type of basic test case does not need to select an application item, and the second type of basic test case needs to select an application item.
In this embodiment, when an automated test instruction is detected, a requirement document for an automated test is received, specifically, when the automated test instruction is detected, the requirement document for the automated test corresponding to the automated test instruction is received, where the requirement document for the automated test may be carried in the instruction or preset in a corresponding trigger interface that triggers the automated test instruction, and after the requirement document for the automated test is obtained, a modification parameter in the requirement document is extracted.
Specifically, after obtaining the requirement document for the automated test, extracting the modification parameters in the requirement document may include the following steps:
the first method is as follows: after receiving a requirement document, determining that the requirement document corresponds to an automatic test case to be modified (according to specific functional requirement information in the requirement document, a plurality of automatic test cases to be modified can be corresponding), further obtaining a preset standard requirement document of the automatic test case to be modified, comparing the requirement document with the preset standard requirement document of the automatic test case to be modified, and obtaining modification parameters, in this embodiment, it is to be noted that the requirement document is a document composed of automatic test parameters required by an automatic test data processing system for performing an automatic test, and the requirement document corresponds to one or more automatic test cases, wherein the automatic test case is an automatic test action combination for automatically testing functions of the data processing system, and after receiving the requirement document, and determining the automatic test case to be modified corresponding to the requirement document, and further obtaining specific modification parameters.
The second method comprises the following steps: after receiving the requirement document, extracting modification parameters in the requirement document according to the identification parameter information in the requirement document, and determining the modification parameters according to whether each parameter in the requirement document has a modification identification.
Step S20, obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each automated test data to be modified associated with the modification parameter according to the data hierarchy of the modification parameter;
in this embodiment, it should be noted that the requirement document corresponds to one or more automated test cases, the automated test cases correspond to one or more automated test scenarios, and the automated scenarios correspond to one or more automated test actions, as shown in fig. 4, a "car insurance application process" is the automated test case, a "login" is the automated test scenario, a "login system" is the automated test action, and an "open login address" is the automated test step, where it is to be noted that a plurality of the automated test cases may simultaneously correspond to the same automated test scenario, and a plurality of the automated test scenarios may simultaneously correspond to the same automated test action.
The method comprises the steps of obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, determining each automatic test data to be modified related to the modification parameter according to the data hierarchy of the modification parameter, specifically, for example, determining each automatic test case to be modified corresponding to a requirement document through document comparison in a case layer of a preset automatic test model, further determining corresponding modified automatic test data in a corresponding scene in each automatic test case based on each modification parameter in the requirement document such as scene parameters to be modified, and displaying the automatic test data to be modified after the determination.
Referring to fig. 2, the step of obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of automated test data to be modified associated with the modification parameter according to the data hierarchy of the modification parameter includes:
step S21, obtaining the type of the modification parameter, and determining the data hierarchy of the modification parameter according to the type of the modification parameter;
in this embodiment, after obtaining the modification parameter, the type of the modification parameter is determined by a preset determination method, such as an attribute determination method, and after determining or acquiring the type of the modification parameter, the data level of the modification parameter is determined according to the type of the modification parameter, where the data level of the modification parameter may refer to a functional depth level or a step depth level of the modification parameter in the test case, and the level may include a first level, a second level, or a third level.
Step S22, determining each modification code of the modification parameter according to the data hierarchy;
and determining each modification code of the modification parameter according to the data hierarchy, specifically determining each modification code process of the modification parameter according to the data hierarchy, wherein the modification data code (process) may be a, a-b or a-b-c. In this embodiment, the code modification efficiency is improved by determining each modification encoding mode of the modification parameter.
Step S23, determining, according to each modification code of the modification parameter, each automated test data to be modified associated with the modification parameter.
And determining each piece of to-be-modified automatic test data associated with the modification parameter according to each modification code (flow) of the modification parameter, specifically, determining a search path according to each modification code flow of the modification parameter, and further searching each piece of to-be-modified automatic test data associated with a specific modification parameter.
Wherein, the step of determining each to-be-modified automated test data associated with the modification parameter according to the modification data modification code comprises:
step S231, if the modification code of the modification parameter is the first type modification code, determining that the automated test data to be modified is the automated test scenario data to be modified of the scenario layer;
in this embodiment, the automated test data to be modified is determined based on the type of the modification code of the modification parameter, and specifically, if the modification code of the modification parameter is the first type modification code, such as a, the automated test data to be modified is determined to be the automated test scenario data to be modified of the scenario layer, that is, the automated test data to be modified is determined to be modified on the scenario layer of the preset automated test model based on the modification parameter.
Wherein determining that the modification is performed on the scene layer of the preset automated test model comprises: adding or deleting automated test scenarios, etc.
Step S232, if the modification code of the modification parameter is a second type modification code, determining the automatic test data to be modified as the automatic test action data to be modified of the action layer;
specifically, if the modification code of the modification parameter is a second type modification code, such as a-b, the automated test data to be modified is determined to be the automated test action data to be modified of the action layer, that is, based on the modification parameter, the modification is determined to be performed on the action layer of the preset automated test model.
Wherein determining that the modification is performed on the action layer of the preset automated test model comprises: add or delete automated test actions, and the like.
In step S233, if the modification code of the modification parameter is the third type modification code, it is determined that the automated test data to be modified is the automated test step data to be modified of the step layer.
Specifically, if the modification code of the modification parameter is a third type modification code such as a-b-c, the automatic test data to be modified is determined to be the automatic test step data to be modified of the action layer, that is, based on the modification parameter, the step layer of the preset automatic test model is determined to be modified.
Wherein determining that the modification is performed on the action layer of the preset automated test model comprises: add or delete automated testing steps, and the like.
And step S30, modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instruction, and combining the target test data to be combined to obtain a target automatic test case.
In this embodiment, after obtaining each piece of automated test data to be modified, the piece of automated test data to be modified is modified to obtain target test data to be combined of the automated test instructions, and the piece of automated test data to be combined is combined to obtain a target automated test case.
After the step of modifying the automated test data to be modified to obtain target test data to be combined of the automated test instructions and combining the target test data to be combined to obtain a target automated test case, the method includes:
step S31, executing a preset automated test flow based on the target automated test case to obtain a test result;
in this embodiment, after obtaining the target automated test case, a preset automated test procedure is executed based on the target automated test case, for example, a car insurance application procedure is executed based on the target automated test case, or a policy synchronization procedure is executed based on the target automated test case, so as to obtain a test result, where the test result includes a test result of each step, a test result of each action, a test result of each scene, and the like.
Step S32, comparing the test result with a preset expected result to obtain a comparison result;
and comparing the test result with a corresponding preset expected result to obtain a comparison result, specifically, comparing the test result of each step with the preset expected step result, comparing the test result of each action with the preset expected action result, and comparing the test result of each scene with the preset expected scene result to obtain the comparison result, wherein the comparison result comprises the same result as the preset expected result or different results from the preset expected result.
Step S33, based on the comparison result, determining the verification result of the target automation test case.
After the comparison result is obtained, determining a verification result of the target automatic test case based on the comparison result, if the comparison result (including the test result of each step, the test result of each action, the test result of each scene, and the like) is all consistent with the corresponding preset expected result, determining that the verification result of the target automatic test case passes the verification, and if the comparison result is partially consistent with the preset expected result, determining that the verification result of the target automatic test case does not pass the verification.
The method comprises the steps of receiving a demand document of an automatic test when an automatic test instruction is detected, and extracting modification parameters in the demand document; determining each automatic test data to be modified associated with the modification parameters; and modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instructions, and combining the target test data to be combined to obtain a target automatic test case. Compared with the prior art that the automatic test script is compiled by adopting a linear script compiling method (or a recording playback method), in the application, modification parameters are determined based on the received requirement document of the automatic test; further determining each automatic test data to be modified associated with the modification parameters; the automatic test data to be modified is modified to obtain target test data to be combined of the automatic test instruction, so as to automatically obtain a target automatic test case, that is, in this embodiment, other test data except the automatic test data to be modified is reused, so that repeated modification of codes is avoided, poor stability of the codes is improved, the efficiency of automatic test development is further improved, and the code maintenance cost is reduced.
In another embodiment of the automated test data processing method, the step of obtaining the type of the modification parameter and determining the data hierarchy of the modification parameter according to the type of the modification parameter includes:
step A1, obtaining attribute information of the modification parameter and identification information of the modification parameter to determine the type of the modification parameter;
in this embodiment, after obtaining the attribute information, the attribute information of the modified parameter includes a time attribute, an execution attribute, and the like, and after obtaining the attribute information, the attribute information of the modified parameter is also obtained, the identification information of the modified parameter includes subscript information, suffix information, and the like, and after obtaining the attribute information of the modified parameter and the identification information of the modified parameter, the type of the modified parameter is determined, specifically, for example, if the attribute of the modified parameter includes a policy entry execution attribute, and the subscript information is subscript information of an open entry address, the type of the modified parameter is a step type, or if the attribute of the modified parameter includes a policy entry execution attribute, and the subscript information is null, the type of the modified parameter is an action type, or if the attribute of the modified parameter is an entry execution attribute, and if the subscript information is null, the type of the modification parameter is the scene type.
Step a2, determining the data hierarchy of the modified parameter according to the type of the modified parameter, wherein the data hierarchy of the modified parameter includes a first hierarchy, a second hierarchy and a third hierarchy.
Determining a data hierarchy of the modification parameter according to the type of the modification parameter, such as a scene type, an action type or a step type, wherein the data hierarchy of the modification parameter includes a first hierarchy (scene type), a second hierarchy (action type) and a third hierarchy (step type).
In this embodiment, the type of the modification parameter is determined by obtaining attribute information of the modification parameter and identification information of the modification parameter; determining a data hierarchy of the modification parameter according to the type of the modification parameter, wherein the data hierarchy of the modification parameter comprises a first hierarchy, a second hierarchy and a third hierarchy. In the embodiment, because the data hierarchy of the modification parameter is accurately determined, a foundation is laid for accurately determining each piece of to-be-modified automatic test data associated with the modification parameter.
In another embodiment of the present application, the step of modifying each piece of automated test data to be modified to obtain target test data to be combined of the automated test instruction and combining the target test data to be combined to obtain a target automated test case includes:
step B1, modifying the automatic test data to be modified to obtain modified automatic test data;
in this embodiment, each piece of automated test data to be modified is modified based on a modification parameter to obtain modified automated test data, and specifically, each piece of automated test data to be modified is replaced with a corresponding parameter content to obtain modified automated test data.
Step B2, displaying the modified automatic test data, and receiving each modification instruction fed back by the user based on the modified automatic test data;
step B3, selecting target modified automated test data from each modified automated test data based on each modification instruction;
displaying the modified automated test data after obtaining the modified automated test data, the purpose of displaying being: first, a target in the modified automated test data is determined or selected by a user or customer to modify the automated test data, and second: the customer confirms that the modified automated test data is error free.
Specifically, in this embodiment, after displaying the modified automated test data, receiving each modification instruction fed back by the user based on the modified automated test data, where the modification instruction carries selection information or confirmation information, and selecting a target modified automated test data from each modified automated test data according to the selection information or the confirmation information.
In this embodiment, a target modified automation test data is selected from each modified automation test data based on each modification instruction, specifically, a modification instruction input by a user is received, if the modification instruction is a first type modification instruction, it is determined that the modified automation test data is a modified automation test scenario type, then the target modified automation test scenario data is selected from each modified automation test data based on the modification instruction at a scenario layer of the preset automation test model, if the modification instruction is a second type instruction, it is determined that the modified automation test data is a modified automation test action type, then the target modified automation test action data is selected from each modified automation test data at an action layer of the preset automation test model based on the modification instruction, and if the modification instruction is a third instruction, judging that the modified automatic test data is of a modified automatic test step type, and selecting target modified automatic test step data from each modified automatic test data on a step layer of the preset automatic test model based on the modification instruction.
Step B4, obtaining unmodified target test data based on the automatic test instruction, and determining target test data to be combined of the automatic test instruction based on the unmodified target test data and the target modified automatic test data;
and step B5, combining to obtain a target automatic test case according to the target test data to be combined of the automatic test instruction.
In this embodiment, unmodified target test data is obtained based on the automation test instruction, specifically, unmodified parameters are obtained based on the automation test instruction (determination requirement document), unmodified target test data is obtained based on the unmodified parameters, target test data to be combined of the automation test instruction is determined based on the unmodified target test data and the target modified automation test data, and a target automation test case is obtained by combining according to the target test data to be combined of the automation test instruction.
The method comprises the steps of receiving a demand document of an automatic test when an automatic test instruction is detected, and extracting modification parameters in the demand document; obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter; and modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instructions, and combining the target test data to be combined to obtain a target automatic test case. Compared with the prior art that the automatic test script is compiled by adopting a linear script compiling method (or a recording playback method), in the application, modification parameters are determined based on the received requirement document of the automatic test; further determining each automatic test data to be modified associated with the modification parameters; the automatic test data to be modified is modified to obtain target test data to be combined of the automatic test instruction, so as to automatically obtain a target automatic test case, that is, in this embodiment, other test data except the automatic test data to be modified is reused, so that repeated modification of codes is avoided, poor stability of the codes is improved, the efficiency of automatic test development is further improved, and the code maintenance cost is reduced.
In another embodiment of the present application, the step of combining target test data to be combined according to the automated test instruction to obtain a target automated test case includes:
step C1, acquiring the combination sequence and the embedding position of the target test data to be combined based on the automatic test instruction;
and step C2, combining to obtain the target automatic test case according to the combination sequence and the embedding position.
In this embodiment, based on the automated test instruction, a combination order of target test data to be combined, such as a combination order of each test case, a combination order of test scenes in each test case, a combination order of each test step in each test scene, and the like, is obtained.
In this embodiment, a combination sequence and an embedding position of target test data to be combined are obtained based on the automated test instruction; and combining to obtain the target automatic test case according to the combination sequence and the embedding position. In the embodiment, the target automatic test case is obtained by realizing accurate combination.
In another embodiment of the present application, the step of modifying each piece of automated test data to be modified to obtain target test data to be combined of the automated test instruction and combining the target test data to be combined to obtain a target automated test case includes:
step D1, modifying the automated test data to be modified to obtain target test data to be combined of the automated test instruction;
step D2, uploading the target test data to be combined to a preset block chain block to perform consensus confirmation processing on the target test data to be combined;
in this embodiment, after the target test data to be combined of the automated test instruction is obtained, the target test data to be combined is further uploaded to a preset block chain block to perform consensus confirmation processing on the target test data to be combined, and particularly, the target test data to be combined is uploaded to a preset block chain block node inside a test, where the preset block chain block node inside the test corresponds to different testers to perform consensus confirmation processing on the target test data to be combined by the different testers.
And D3, if the consensus of the target test data to be combined is confirmed to be completed, combining the target test data to be combined to obtain the target automatic test case.
And if the target test data to be combined is not identified and confirmed, the target test data to be combined is not combined so as to avoid the waste of resources.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 3, the automated test data processing apparatus may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the automated test data processing device may further include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, a sensor, audio circuitry, a WiFi module, and so on. The rectangular user interface may comprise a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the automated test data processing apparatus configuration shown in FIG. 3 does not constitute a limitation of automated test data processing apparatus and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, and an automated test data processing program. An operating system is a program that manages and controls the hardware and software resources of an automated test data processing apparatus, supporting the operation of the automated test data processing program as well as other software and/or programs. The network communications module is used to enable communication between components within the memory 1005, as well as with other hardware and software within the automated test data processing system.
In the automated test data processing apparatus shown in fig. 3, the processor 1001 is configured to execute an automated test data processing program stored in the memory 1005 to implement the steps of the automated test data processing method described in any one of the above.
The specific implementation of the automated test data processing apparatus of the present application is substantially the same as the embodiments of the automated test data processing method described above, and is not described herein again.
The present application further provides an automated test data processing apparatus, the automated test data processing apparatus includes:
the detection module is used for receiving a demand document of the automatic test and extracting modification parameters in the demand document when detecting an automatic test instruction;
the first determining module is used for acquiring the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter;
and the first acquisition module is used for modifying each piece of automatic test data to be modified so as to acquire target test data to be combined of the automatic test instruction, and combining the target test data to be combined so as to acquire a target automatic test case.
Optionally, the first determining module includes:
the first acquisition unit is used for acquiring the type of the modification parameter and determining the data hierarchy of the modification parameter according to the type of the modification parameter;
a first determining unit, configured to determine, according to the data hierarchy, each modification code of the modification parameter;
and the second determining unit is used for determining each piece of to-be-modified automatic test data associated with the modification parameter according to each modification code of the modification parameter.
Optionally, the second determining unit includes:
the first determining subunit is configured to determine, if the modification code of the modification parameter is the first type modification code, that the automated test data to be modified is the automated test scenario data to be modified of the scenario layer;
the second determining subunit is configured to determine, if the modification code of the modification parameter is a second type modification code, that the automated test data to be modified is automated test action data to be modified of an action layer;
and a third determining subunit, configured to determine, if the modification code of the modification parameter is a third type modification code, that the automated test data to be modified is automated test step data to be modified in a step layer.
Optionally, the first obtaining unit includes:
the first acquisition subunit is configured to acquire attribute information of the modification parameter and identification information of the modification parameter, so as to determine a type of the modification parameter;
and the fourth determining subunit is configured to determine, according to the type of the modification parameter, a data hierarchy of the modification parameter, where the data hierarchy of the modification parameter includes a first hierarchy, a second hierarchy, and a third hierarchy.
Optionally, the first obtaining module includes:
the modification unit is used for modifying the automatic test data to be modified to obtain modified automatic test data;
the display unit is used for displaying the modified automatic test data and receiving each modification instruction fed back by a user based on the modified automatic test data;
a selection unit configured to select a target modified automated test data from each of the modified automated test data based on each of the modification instructions;
a third determining unit, configured to obtain unmodified target test data based on the automation test instruction, and determine target test data to be combined of the automation test instruction based on the unmodified target test data and the target modified automation test data;
the second acquisition unit is used for acquiring the combination sequence and the embedding position of the target test data to be combined based on the automatic test instruction;
and the combination unit is used for combining to obtain the target automatic test case according to the combination sequence and the embedding position.
Optionally, the automated test data processing apparatus further includes:
the second acquisition module is used for executing a preset automatic test flow based on the target automatic test case to obtain a test result;
the comparison module is used for comparing the test result with a preset expected result to obtain a comparison result;
and the second determination module is used for determining the verification result of the target automation test case based on the comparison result.
Optionally, the first obtaining module includes:
a third obtaining unit, configured to modify each piece of to-be-modified automated test data to obtain to-be-combined target test data of the automated test instruction;
the consensus unit is used for uploading the target test data to be combined to a preset block chain block so as to perform consensus confirmation processing on the target test data to be combined;
and the fourth obtaining unit is used for combining the target test data to be combined to obtain the target automatic test case if the consensus of the target test data to be combined is confirmed to be completed.
The specific implementation of the automated test data processing apparatus of the present application is substantially the same as the embodiments of the automated test data processing method described above, and is not described herein again.
The embodiment of the application provides a readable storage medium, and the readable storage medium stores one or more programs, which can be executed by one or more processors for implementing the steps of any one of the above automated test data processing methods.
The specific implementation of the readable storage medium of the present application is substantially the same as the embodiments of the automated test data processing method, and is not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.
Claims (10)
1. An automated test data processing method, comprising:
when an automatic test instruction is detected, receiving a demand document of an automatic test, and extracting modification parameters in the demand document;
obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter;
and modifying the automatic test data to be modified to obtain target test data to be combined of the automatic test instructions, and combining the target test data to be combined to obtain a target automatic test case.
2. The automated test data processing method of claim 1, wherein the step of obtaining the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each automated test data to be modified associated with the modification parameter according to the data hierarchy of the modification parameter comprises:
acquiring the type of the modification parameter, and determining the data hierarchy of the modification parameter according to the type of the modification parameter;
determining each modification code of the modification parameter according to the data hierarchy;
and determining each piece of to-be-modified automatic test data associated with the modification parameters according to each modification code of the modification parameters.
3. The automated test data processing method of claim 2, wherein the step of determining each automated test data to be modified associated with the modification parameter based on the modification data modification code comprises:
if the modification code of the modification parameter is the first type modification code, determining the automatic test data to be modified as the automatic test scene data to be modified of the scene layer;
if the modification code of the modification parameter is a second type modification code, determining the automatic test data to be modified as the automatic test action data to be modified of the action layer;
and if the modification code of the modification parameter is a third type modification code, determining the automatic test data to be modified as the automatic test step data to be modified of the step layer.
4. The automated test data processing method of claim 2, wherein the step of obtaining the type of the modification parameter and determining the data hierarchy of the modification parameter based on the type of the modification parameter comprises:
acquiring attribute information of the modification parameters and identification information of the modification parameters to determine the types of the modification parameters;
determining a data hierarchy of the modification parameter according to the type of the modification parameter, wherein the data hierarchy of the modification parameter comprises a first hierarchy, a second hierarchy and a third hierarchy.
5. The method for processing the automated test data according to claim 1, wherein the step of modifying each automated test data to be modified to obtain target test data to be combined of the automated test instructions and combining the target test data to be combined to obtain a target automated test case comprises:
modifying each automatic test data to be modified to obtain modified automatic test data;
displaying the modified automatic test data, and receiving each modification instruction fed back by a user based on the modified automatic test data;
selecting a target modified automated test data from each of the modified automated test data based on the respective modification instruction;
obtaining unmodified target test data based on the automatic test instruction, and determining target test data to be combined of the automatic test instruction based on the unmodified target test data and the target modified automatic test data;
based on the automatic test instruction, acquiring a combination sequence and an embedding position of target test data to be combined;
and combining to obtain the target automatic test case according to the combination sequence and the embedding position.
6. The automated test data processing method according to any one of claims 1 to 5, wherein after the step of modifying each automated test data to be modified to obtain target test data to be combined of the automated test instructions and combining the target test data to be combined to obtain the target automated test case, the method comprises:
executing a preset automatic test flow based on the target automatic test case to obtain a test result;
comparing the test result with a preset expected result to obtain a comparison result;
and determining a verification result of the target automation test case based on the comparison result.
7. The method for processing the automated test data according to claim 1, wherein the step of modifying each automated test data to be modified to obtain target test data to be combined of the automated test instructions and combining the target test data to be combined to obtain a target automated test case comprises:
modifying each automated test data to be modified to obtain target test data to be combined of the automated test instruction;
uploading the target test data to be combined to a preset block chain block so as to perform consensus confirmation processing on the target test data to be combined;
and if the consensus of the target test data to be combined is confirmed, combining the target test data to be combined to obtain the target automatic test case.
8. The automated test data processing apparatus of claim 1, wherein the automated test data processing apparatus comprises:
the detection module is used for receiving a demand document of the automatic test and extracting modification parameters in the demand document when detecting an automatic test instruction;
the first determining module is used for acquiring the type of the modification parameter, determining the data hierarchy of the modification parameter according to the type of the modification parameter, and determining each piece of to-be-modified automatic test data associated with the modification parameter according to the data hierarchy of the modification parameter;
and the first acquisition module is used for modifying each piece of automatic test data to be modified so as to acquire target test data to be combined of the automatic test instruction, and combining the target test data to be combined so as to acquire a target automatic test case.
9. An automated test data processing apparatus, comprising: a memory, a processor, and a program stored on the memory for implementing the automated test data processing method,
the memory is used for storing programs for realizing the automatic test data processing method;
the processor is configured to execute a program implementing the automated test data processing method to implement the steps of the automated test data processing method according to any one of claims 1 to 8.
10. A readable storage medium having stored thereon a program for implementing an automated test data processing method, the program being executable by a processor to implement the steps of the automated test data processing method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010918867.0A CN112069068B (en) | 2020-09-03 | 2020-09-03 | Automated test data processing method, apparatus, device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010918867.0A CN112069068B (en) | 2020-09-03 | 2020-09-03 | Automated test data processing method, apparatus, device and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112069068A true CN112069068A (en) | 2020-12-11 |
CN112069068B CN112069068B (en) | 2024-08-13 |
Family
ID=73664945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010918867.0A Active CN112069068B (en) | 2020-09-03 | 2020-09-03 | Automated test data processing method, apparatus, device and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112069068B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685302A (en) * | 2020-12-29 | 2021-04-20 | 长威信息科技发展股份有限公司 | Method and system for automatically constructing and deploying |
CN112953896A (en) * | 2021-01-26 | 2021-06-11 | 杭州迪普科技股份有限公司 | Playback method and device of log message |
CN113220579A (en) * | 2021-05-18 | 2021-08-06 | 京东科技控股股份有限公司 | Method, device, equipment and storage medium for processing stock test data |
CN114140078A (en) * | 2021-11-30 | 2022-03-04 | 鼎信项目管理咨询有限公司 | Digital engineering management system |
CN115144678A (en) * | 2022-09-01 | 2022-10-04 | 卡斯柯信号(北京)有限公司 | Visual test condition configuration method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140068410A1 (en) * | 2012-09-06 | 2014-03-06 | Elena Dolinina | User interface for composing test scenarios |
CN107193740A (en) * | 2017-05-23 | 2017-09-22 | 郑州云海信息技术有限公司 | The software test case test system and method for a kind of Reuse-Oriented |
CN108829587A (en) * | 2018-05-29 | 2018-11-16 | 平安普惠企业管理有限公司 | Test case parameter replacing method, device, computer equipment and storage medium |
CN109408370A (en) * | 2018-09-18 | 2019-03-01 | 深圳壹账通智能科技有限公司 | Interface testing document generating method, device, computer equipment and storage medium |
CN109933521A (en) * | 2019-01-23 | 2019-06-25 | 平安科技(深圳)有限公司 | Automated testing method, device, computer equipment and storage medium based on BDD |
CN110134584A (en) * | 2019-04-12 | 2019-08-16 | 深圳壹账通智能科技有限公司 | A kind of generation method, device, storage medium and the server of interface testing use-case |
-
2020
- 2020-09-03 CN CN202010918867.0A patent/CN112069068B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140068410A1 (en) * | 2012-09-06 | 2014-03-06 | Elena Dolinina | User interface for composing test scenarios |
CN107193740A (en) * | 2017-05-23 | 2017-09-22 | 郑州云海信息技术有限公司 | The software test case test system and method for a kind of Reuse-Oriented |
CN108829587A (en) * | 2018-05-29 | 2018-11-16 | 平安普惠企业管理有限公司 | Test case parameter replacing method, device, computer equipment and storage medium |
CN109408370A (en) * | 2018-09-18 | 2019-03-01 | 深圳壹账通智能科技有限公司 | Interface testing document generating method, device, computer equipment and storage medium |
CN109933521A (en) * | 2019-01-23 | 2019-06-25 | 平安科技(深圳)有限公司 | Automated testing method, device, computer equipment and storage medium based on BDD |
CN110134584A (en) * | 2019-04-12 | 2019-08-16 | 深圳壹账通智能科技有限公司 | A kind of generation method, device, storage medium and the server of interface testing use-case |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685302A (en) * | 2020-12-29 | 2021-04-20 | 长威信息科技发展股份有限公司 | Method and system for automatically constructing and deploying |
CN112953896A (en) * | 2021-01-26 | 2021-06-11 | 杭州迪普科技股份有限公司 | Playback method and device of log message |
CN113220579A (en) * | 2021-05-18 | 2021-08-06 | 京东科技控股股份有限公司 | Method, device, equipment and storage medium for processing stock test data |
CN114140078A (en) * | 2021-11-30 | 2022-03-04 | 鼎信项目管理咨询有限公司 | Digital engineering management system |
CN115144678A (en) * | 2022-09-01 | 2022-10-04 | 卡斯柯信号(北京)有限公司 | Visual test condition configuration method and device |
CN115144678B (en) * | 2022-09-01 | 2022-12-09 | 卡斯柯信号(北京)有限公司 | Visual test condition configuration method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112069068B (en) | 2024-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112069068A (en) | Automatic test data processing method, device, equipment and readable storage medium | |
CN106844217B (en) | Method and device for embedding point of applied control and readable storage medium | |
US9934136B2 (en) | Automated generation of scripted and manual test cases | |
CN109033772B (en) | Verification information input method and device | |
CN106326120B (en) | Regression testing method and device for application software and electronic equipment | |
CN110554962A (en) | Regression testing process covering method, server and computer readable storage medium | |
CN108089985B (en) | Method, device and equipment for verifying interface return parameters and readable storage medium | |
CN107807841B (en) | Server simulation method, device, equipment and readable storage medium | |
CN109657475A (en) | Code vulnerabilities check method, apparatus, equipment and storage medium | |
CN112905451B (en) | Automatic testing method and device for application program | |
CN111737073B (en) | Automatic testing method, device, equipment and medium | |
CN117290236A (en) | Software testing method, device, computer equipment and computer readable storage medium | |
CN112835808A (en) | Interface testing method and device, computer equipment and storage medium | |
CN114237754B (en) | Data loading method and device, electronic equipment and storage medium | |
CN107102938B (en) | Test script updating method and device | |
CN110309057B (en) | Automatic script-based flow project testing method and related equipment | |
CN112433935A (en) | Test method, test device, electronic equipment and storage medium | |
CN111400171A (en) | Interface testing method, system, device and readable storage medium | |
CN116431522A (en) | Automatic test method and system for low-code object storage gateway | |
CN116719736A (en) | Test case generation method and device for testing software interface | |
CN112181809A (en) | Automatic graphical user interface testing method based on multiple positioning methods | |
CN112783759B (en) | White box test task execution method and device, storage medium and computer equipment | |
CN111324757B (en) | Map data problem processing method and device | |
CN118427063A (en) | Method, device, equipment, medium and product for testing application page | |
CN116069639A (en) | Information processing method, device, equipment 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |