CN111552635A - Data detection method, equipment, server and readable storage medium - Google Patents
Data detection method, equipment, server and readable storage medium Download PDFInfo
- Publication number
- CN111552635A CN111552635A CN202010262776.6A CN202010262776A CN111552635A CN 111552635 A CN111552635 A CN 111552635A CN 202010262776 A CN202010262776 A CN 202010262776A CN 111552635 A CN111552635 A CN 111552635A
- Authority
- CN
- China
- Prior art keywords
- state
- data
- processed
- functional module
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 63
- 238000012360 testing method Methods 0.000 claims abstract description 164
- 238000000034 method Methods 0.000 claims abstract description 24
- 230000007704 transition Effects 0.000 claims description 83
- 238000006243 chemical reaction Methods 0.000 claims description 40
- 230000009471 action Effects 0.000 claims description 38
- 238000004590 computer program Methods 0.000 claims description 11
- 230000005012 migration Effects 0.000 claims description 9
- 238000013508 migration Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 description 30
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 230000007547 defect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 235000012976 tarts Nutrition 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001960 triggered effect Effects 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a data detection method, equipment, a server and a readable storage medium, wherein the method comprises the following steps: acquiring a requirement document of data to be processed, and analyzing the requirement document to obtain a functional module in the data to be processed; determining a finite state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed; comparing the test case of the data to be processed with a finite state machine, and determining whether the test case of the data to be processed has a missing functional module or not, wherein the finite state machine consists of at least one test case, and each test case in the at least one test case consists of the functional module and the state path of the data to be processed; and if the missing functional modules exist in the test case of the data to be processed, adding the missing functional modules into the test case. By the implementation mode, the test cases can be automatically supplemented, and the accuracy and efficiency of data detection are improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data detection method, device, server, and readable storage medium.
Background
At present, a test case is designed based on a requirement document according to experience of a tester, whether description of the requirement document is complete or not can affect coverage of a user scene of the test case in data detection to a certain extent, if the description of the requirement document is not specific enough, description of a certain scene state is omitted, the test case is caused to omit a certain user scene, defects in a data detection process cannot be found in a test stage, and a test effect is poor. Taking a marketing campaign as an example, currently, a marketing campaign mainly detects whether defects exist in a marketing campaign flow based on data of a demand document by a user, however, in this way, when data description in the demand document is not specific enough, defects existing in the marketing campaign flow may not be detected, thereby resulting in poor experience of the user on the marketing campaign. Therefore, how to perform data detection more efficiently becomes an important research issue.
Disclosure of Invention
The embodiment of the invention provides a data detection method, data detection equipment, a server and a readable storage medium, which can automatically complement test cases and improve the accuracy and efficiency of data detection.
In a first aspect, an embodiment of the present invention provides a data detection method, including:
acquiring a requirement document of data to be processed, and analyzing the requirement document to obtain a functional module in the data to be processed;
determining a finite state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed;
comparing the test case of the data to be processed with the finite-state machine, and determining whether the test case of the data to be processed has a missing functional module or not, wherein the finite-state machine consists of at least one test case, and each test case in the at least one test case consists of a functional module and a state path of the data to be processed;
and if the missing functional modules exist in the test case of the data to be processed, adding the missing functional modules into the test case.
Further, the determining, according to the state information of the functional module in the data to be processed, the finite state machine corresponding to the functional module in the data to be processed includes:
acquiring state information of a functional module in the data to be processed, wherein the state information comprises an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action;
judging whether the functional module in the data to be processed meets the condition of describing by using a finite state machine or not according to the state information of the functional module in the data to be processed;
and if the judgment result is satisfied, determining the finite state machine corresponding to the functional module in the data to be processed.
Further, the determining a finite state machine corresponding to a functional module in the data to be processed includes:
analyzing an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action of a functional module in the data to be processed, and determining at least one strip-shaped path corresponding to the functional module in the data to be processed, wherein each state path in the at least one state path corresponds to one functional module;
and determining a finite state machine corresponding to the functional module in the data to be processed according to at least one strip state path corresponding to the functional module in the data to be processed.
Further, the analyzing the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the functional module in the data to be processed to determine at least one strip-shaped path corresponding to the functional module in the data to be processed includes:
analyzing the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed, and determining the incidence relation among the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed;
and determining at least one strip state path corresponding to the functional module in the data to be processed according to the incidence relation among the initial state, the target state, the current state, the conversion condition, the transition state and/or the conversion action.
Further, the comparing the test case of the data to be processed with the finite state machine to determine whether there are missing functional modules in the test case of the data to be processed includes:
acquiring a test case of the data to be processed, wherein the test case comprises at least one state path determined by a specified initial state and a specified current state;
comparing at least one state path determined by a specified initial state and a specified current state in the test case with at least one strip state path corresponding to the specified initial state and the specified current state in the finite state machine;
and if the comparison result is inconsistent, determining that the test case of the data to be processed has the missing functional module.
Further, if the comparison result is inconsistent, determining that there are missing functional modules in the test case of the data to be processed includes:
and if the comparison result is that the finite state machine comprises at least one missing state path which does not exist in the test case, determining a missing functional module corresponding to the at least one missing state path, wherein the at least one missing state path is a state path corresponding to the specified initial state and the specified current state.
Further, the adding the missing functional module to the test case includes:
adding at least one missing state path that does not exist in the test cases included in the finite state machine to the test cases;
after the adding the missing functional modules to the test case, the method further includes:
comparing the test case added with the at least one missing state path with the finite-state machine;
and if the comparison result is consistent, determining that no missing functional module exists in the test case of the data to be processed.
In a second aspect, an embodiment of the present invention provides a data detection apparatus, which includes a unit configured to perform the data detection method of the first aspect.
In a third aspect, an embodiment of the present invention provides a server, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program that supports a data detection device to execute the above method, and the computer program includes a program, and the processor is configured to call the program to execute the method of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, where the computer program is executed by a processor to implement the method of the first aspect.
The embodiment of the invention can analyze the requirement document of the data to be processed to obtain the functional module, determine the finite-state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed, compare the test case of the data to be processed with the finite-state machine, determine whether the test case of the data to be processed has the missing functional module, and if the test case of the data to be processed has the missing functional module, add the missing functional module into the test case. By the implementation mode, the test cases can be automatically supplemented, and the accuracy and efficiency of data detection are 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 are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a data detection method provided by an embodiment of the present invention;
FIG. 2a is a diagram of a finite state machine according to an embodiment of the present invention;
FIG. 2b is a diagram of another finite state machine according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a data detection apparatus provided by an embodiment of the present invention;
fig. 4 is a schematic block diagram of a server according to an embodiment of the present 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 data detection method provided by the embodiment of the invention can be executed by a data detection device, wherein the data detection device can be arranged on a server. In some embodiments, the data detection device may be installed on a server; in some embodiments, the data detection device may be spatially independent of the server; in some embodiments, the data detection device may be a component of the server, i.e. the server comprises a data detection device.
In the embodiment of the invention, data detection equipment can acquire a requirement document of data to be processed, analyze the requirement document to obtain a function module in the data to be processed, determine a finite state machine corresponding to the function module in the data to be processed according to state information of the function module in the data to be processed, compare a test case of the data to be processed with the finite state machine, determine whether a missing function module exists in the test case of the data to be processed, and add the missing function module to the test case if the missing function module exists in the test case of the data to be processed. By the implementation mode, the missing functional modules in the test case can be automatically supplemented, the effectiveness of detecting the data to be processed is improved, and the expense of detecting the data to be processed is saved.
The data detection method according to the embodiment of the present invention is schematically described below with reference to the drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data detection method according to an embodiment of the present invention, and as shown in fig. 1, the method may be executed by a data detection device, and a specific explanation of the data detection device is as described above, which is not repeated herein. Specifically, the method of the embodiment of the present invention includes the following steps.
S101: acquiring a requirement document of data to be processed, and analyzing the requirement document to obtain a functional module in the data to be processed.
In the embodiment of the invention, the data detection equipment can acquire the requirement document of the data to be processed and analyze the requirement document to obtain the functional module in the data to be processed.
In some embodiments, the data to be processed includes, but is not limited to, data of various functional modules, in some embodiments, the functional modules include, but are not limited to, an operation entry of the data to be processed, and in one example, the functional modules include a sharing, lottery, etc. functional module of a marketing campaign. In some embodiments, the requirement document of the to-be-processed data may include, but is not limited to, functional description information of each functional module in the to-be-processed data, and in one example, the requirement document includes, but is not limited to, description information of an activity flow, an activity rule, and the like of a marketing activity.
In an embodiment, when the data detection device parses the requirement document to obtain the functional module in the to-be-processed data, the data detection device may use a deep learning model to parse the requirement document of the to-be-processed data to obtain the functional module in the to-be-processed data.
S102: and determining a finite state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed.
In the embodiment of the present invention, the data detection device may determine, according to the state information of the functional module in the data to be processed, the finite state machine corresponding to the functional module in the data to be processed. In some embodiments, the finite state machine is used to represent a mathematical model of the finite number of states and the behavior of transitions and actions between these states.
In an embodiment, when determining a finite state machine corresponding to a function module in the to-be-processed data according to state information of the function module in the to-be-processed data, the data detection device may acquire state information of the function module in the to-be-processed data, where the state information includes an initial state, a target state, a current state, a transition condition, a transition state, and/or a transition action, and determine whether the function module in the to-be-processed data satisfies a condition described using the finite state machine according to the state information of the function module in the to-be-processed data, and if the determination result is satisfied, may determine the finite state machine corresponding to the function module in the to-be-processed data.
In some embodiments, the initial state in the finite state machine refers to a state in which a starting position is located; the target state in the finite state machine is the state of the cut-off position; the current state of the finite state machine refers to the current state; the transition condition of the finite state machine is also called an event, when a transition condition is met, a transition action can be triggered, or state transition can be executed once; the migration state of the finite state machine is a new state to be migrated after the transition condition is met; the transition action of the finite state machine refers to an action which can be executed after a transition condition is satisfied. In some embodiments, the transition condition refers to a condition for switching between states.
In an embodiment, when determining whether the function module in the data to be processed satisfies the condition described by using the finite state machine according to the state information of the function module in the data to be processed, the data detection device may determine whether the function module in the data to be processed satisfies the condition described by using the finite state machine according to an initial state, a target state, a current state, a transition condition, a transition state, and/or a transition action of the function module in the data to be processed.
In an embodiment, when the state information of the functional module in the data to be processed includes an initial state and a target state, it may be determined that the functional module in the data to be processed satisfies a condition described using a finite state machine.
In one example, assuming that the state information of the functional module in the data to be processed includes an initial state 1 and a target state 2, it may be determined that the finite state machine is: start → State 1 → State 2 → end, where start is used to denote the beginning and end is used to denote the end.
In an embodiment, when the state information of the functional module in the data to be processed includes an initial state, a current state and a target state, it may be determined that the functional module in the data to be processed satisfies a condition described using a finite state machine.
In one example, assuming that the state information of the functional module in the data to be processed includes an initial state 1, a current state being a state 2, and a target state being a state 3, it may be determined that the finite state machine is: start → state 1 → state 2 → state 3 → end.
In one embodiment, the state information of the functional module in the data to be processed includes an initial state, a current state, a transition state, a target state, and a transition condition, and it may be determined that the functional module in the data to be processed satisfies a condition described by using a finite state machine.
In an example, assuming that the state information of the functional module in the to-be-processed data includes an initial state 1, a current state being a state 2, a transition state being a state 3, a target state being a state 4, and a transition condition, it may be determined that the finite state machine is: start → state 1 → state 2 → state 3 → state 4 → end, where state 3 transitions to state 4 through a transition condition.
In one embodiment, when the state information of the functional module in the data to be processed includes an initial state, a current state, a transition state, a target state, a transition condition, and a transition action, it may be determined that the functional module in the data to be processed satisfies a condition described using a finite state machine.
In one example, assuming that the state information of the functional module in the data to be processed includes an initial state 1, a current state being a state 2, a transition state being a state 3, a target state being a state 4, a transition condition, and a transition action, it may be determined that the finite state machine is: start → state 1 → state 2 → state 3 → state 4 → end, where state 3 transitions to state 4 by a transition condition and performs the transition action.
In an embodiment, when determining a finite state machine corresponding to a function module in the to-be-processed data, the data detection device may analyze an initial state, a target state, a current state, a transition condition, a transition state, and/or a transition action of the function module in the to-be-processed data, determine at least one bar-shaped path corresponding to the function module in the to-be-processed data, where each state path in the at least one state path corresponds to one function module, and determine the finite state machine corresponding to the function module in the to-be-processed data according to the at least one bar-shaped path corresponding to the function module in the to-be-processed data.
In some embodiments, the state path refers to a path traversed when switching from one state to another; in some embodiments, the one state path corresponds to one functional module; in some embodiments, the states in the state path refer to nodes in the data to be processed, and in one example, the states in the state path may refer to nodes of various processes in the marketing campaign.
In one example, it is assumed that the determining, by the data detection device, at least one bar-shaped path corresponding to a functional module in the to-be-processed data includes: the 3 state paths may determine the finite state machine corresponding to the function module in the data to be processed as shown in fig. 2a according to the 3 state paths, where fig. 2a is a schematic diagram of the finite state machine according to the embodiment of the present invention.
For example, an old-fashioned new marketing campaign requires users to share with friends, friends to complete registration, after friends complete registration, old users may be rewarded, users newly registered may be rewarded, and the various states may include: the state of the user not sharing, the user sharing, the friend not registering, the friend registered, the user reward not issued, the user reward issued, the friend reward not issued, the friend reward issued, and the like. The status path may be divided into two status paths according to whether each status is completed and the function of bonus award delivery, and one status path may be: start → user not shared → user shared → friend unregistered → friend registered → end; another state path may be: start → friend unregistered → friend award not issued → user award not issued → end.
In one embodiment, when analyzing the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the function module in the data to be processed and determining at least one bar-shaped path corresponding to the function module in the data to be processed, the data detection device may analyze the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the function module in the data to be processed, determine an association relationship among the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the function module in the data to be processed, and according to the association relationship among the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action, and determining at least one strip state path corresponding to the functional module in the data to be processed.
In an example, taking fig. 2b as an example, fig. 2b is a schematic diagram of another finite state machine according to an embodiment of the present invention, as shown in fig. 2b, the finite state machine includes a state 1, a state 2, a state 3, and a state 4, transition conditions between the states include a transition condition 1, a transition condition 2, a transition condition 3, a transition condition 4, and a transition condition 5, and in some embodiments, the transition conditions may be the same or different. The association relationship between each state and the transition condition can be determined according to the finite state machine shown in fig. 2b, and a plurality of state paths corresponding to the finite state machine shown in fig. 2b can be determined as follows according to different current states and transition conditions:
start → State 1 → State 2 → State 4 → end (1)
start → State 1 → State 3 → State 4 → end (2)
start → State 1 → State 2 → State 3 → State 4 → end (3)
The state path (1) is determined according to the current state being the state 2 and the transition condition 2, the state path (2) is determined according to the current state being the state 3 and the transition condition 4, and the state path (3) is determined according to the current state being the state 2, the transition state being the state 3, the transition condition 5 and the transition condition 4.
S103: and comparing the test case of the data to be processed with the finite-state machine, and determining whether the test case of the data to be processed has a missing functional module.
In the embodiment of the present invention, the data detection device may compare the test case of the data to be processed with the finite state machine, and determine whether there are missing functional modules in the test case of the data to be processed, where the finite state machine is composed of at least one test case, and each test case in the at least one test case is composed of a functional module and a state path of the data to be processed.
In some embodiments, the data detection device compares the test case of the data to be processed with the finite-state machine, and when it is determined whether there are missing functional modules in the test case of the data to be processed, the test case of the data to be processed may be obtained, where the test case includes at least one state path determined by a specified initial state and a specified current state, and compares at least one state path determined by the specified initial state and the specified current state in the test case with at least one strip-shaped path corresponding to the specified initial state and the specified current state in the finite-state machine, and if the comparison result is inconsistent, determines that there are missing functional modules in the test case of the data to be processed.
In one example, taking fig. 2a as an example, assuming that the specified initial state in the test case is state 1 and the specified current state is state 2, if the state path included in the completed test case is: tart → State 1 → State 2 → State 4 → end, then the state path in the test case can be: tart → state 1 → state 2 → state 4 → end is compared with at least one strip state path corresponding to the specified initial state and the specified current state in the finite state machine described in fig. 2a, and if the comparison result is inconsistent, it can be determined that there is a missing functional module in the test case of the data to be processed.
In an embodiment, when determining that there are missing functional modules in a test case of the data to be processed, if a comparison result is that the finite state machine includes at least one missing state path that does not exist in the test case, the data detection device determines the missing functional modules corresponding to the at least one missing state path, where the at least one missing state path is a state path corresponding to the specified initial state and the specified current state.
In one example, assume that the state path in a finite state machine is: start → state 1 → state 2 → state 4 → end, start → state 1 → state 3 → state 4 → end, start → state 1 → state 2 → state 3 → state 4 → end, if the test case input specifies an initial state of state 1, the current state of state 2, and the test case is: start → state 1 → state 2 → state 4 → end, the state path in the test case can be compared with the state path in the finite state machine, and the state path missing in the test case can be obtained: start → state 1 → state 2 → state 3 → end, start → state 1 → state 2 → state 3 → state 4 → end, and therefore, it is possible to determine that start → state 1 → state 2 → state 3 → end and start → state 1 → state 2 → state 3 → state 4 → end is a missing state path, and thereby determine that the function module corresponding to the missing state path start → state 1 → state 2 → state 3 → end and start → state 1 → state 2 → state 3 → state 4 → end is a missing function module.
Therefore, by the implementation mode, the omitted state path in the test case can be automatically determined, the test case is automatically supplemented, and the accuracy and efficiency of data detection are improved.
S104: and if the missing functional modules exist in the test case of the data to be processed, adding the missing functional modules into the test case.
In the embodiment of the invention, if the missing functional modules exist in the test case of the data to be processed, the missing functional modules are added into the test case.
In an embodiment, when the data detection device adds the missing functional module to the test case, at least one missing state path corresponding to the specified initial state and the specified current state, which does not exist in the test case included in the finite state machine, may be added to the test case.
In one example, if it is determined that the missing state paths in the test case are: start → State 1 → State 2 → State 3 → State 4 → end, the missing state path can be added to the test case.
Therefore, the implementation mode can automatically complete the test cases, and improve the accuracy and efficiency of data detection.
In an embodiment, after the data detection device adds the missing functional module to the test case, the test case to which the at least one missing state path is added may be compared with the finite state machine, and if the comparison result is consistent, it may be determined that the missing functional module does not exist in the test case of the data to be processed.
Therefore, the integrity of the test case can be further confirmed by verifying the test case added with the state path, and the accuracy of the test result can be further improved.
In the embodiment of the invention, the data detection equipment can analyze the requirement document of the data to be processed to obtain the functional module, determine the finite-state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed, compare the test case of the data to be processed with the finite-state machine, determine whether the test case of the data to be processed has the missing functional module, and if the missing functional module is determined to exist in the test case of the data to be processed, add the missing functional module to the test case. By the implementation mode, the test cases can be automatically supplemented, and the accuracy and efficiency of data detection are improved.
The embodiment of the invention also provides data detection equipment, which is used for executing the unit of the method in any one of the preceding claims. Specifically, referring to fig. 3, fig. 3 is a schematic block diagram of a data detection apparatus according to an embodiment of the present invention. The data detection device of the present embodiment includes: an acquisition unit 301, a determination unit 302, a comparison unit 303, and an addition unit 304.
An obtaining unit 301, configured to obtain a requirement document of data to be processed, and analyze the requirement document to obtain a functional module in the data to be processed;
a determining unit 302, configured to determine, according to state information of a functional module in the to-be-processed data, a finite state machine corresponding to the functional module in the to-be-processed data;
a comparison unit 303, configured to compare the test case of the data to be processed with the finite state machine, and determine whether there are missing functional modules in the test case of the data to be processed, where the finite state machine is composed of at least one test case, and each test case in the at least one test case is composed of a functional module and a state path of the data to be processed;
an adding unit 304, configured to add a missing functional module to the test case if it is determined that the test case of the to-be-processed data has the missing functional module.
Further, when the determining unit 302 determines, according to the state information of the functional module in the data to be processed, the finite state machine corresponding to the functional module in the data to be processed, specifically configured to:
acquiring state information of a functional module in the data to be processed, wherein the state information comprises an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action;
judging whether the functional module in the data to be processed meets the condition of describing by using a finite state machine or not according to the state information of the functional module in the data to be processed;
and if the judgment result is satisfied, determining the finite state machine corresponding to the functional module in the data to be processed.
Further, when the determining unit 302 determines the finite state machine corresponding to the functional module in the to-be-processed data, it is specifically configured to:
analyzing an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action of a functional module in the data to be processed, and determining at least one strip-shaped path corresponding to the functional module in the data to be processed, wherein each state path in the at least one state path corresponds to one functional module;
and determining a finite state machine corresponding to the functional module in the data to be processed according to at least one strip state path corresponding to the functional module in the data to be processed.
Further, when the determining unit 302 analyzes the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the functional module in the to-be-processed data, and determines at least one bar-shaped path corresponding to the functional module in the to-be-processed data, it is specifically configured to:
analyzing the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed, and determining the incidence relation among the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed;
and determining at least one strip state path corresponding to the functional module in the data to be processed according to the incidence relation among the initial state, the target state, the current state, the conversion condition, the transition state and/or the conversion action.
Further, the comparing unit 303 compares the test case of the data to be processed with the finite state machine, and when determining whether there are missing functional modules in the test case of the data to be processed, is specifically configured to:
acquiring a test case of the data to be processed, wherein the test case comprises at least one state path determined by a specified initial state and a specified current state;
comparing at least one state path determined by a specified initial state and a specified current state in the test case with at least one strip state path corresponding to the specified initial state and the specified current state in the finite state machine;
and if the comparison result is inconsistent, determining that the test case of the data to be processed has the missing functional module.
Further, if the comparison result is inconsistent, the comparing unit 303 determines that there are missing functional modules in the test case of the data to be processed, and is specifically configured to:
and if the comparison result is that the finite state machine comprises at least one missing state path which does not exist in the test case, determining a missing functional module corresponding to the at least one missing state path, wherein the at least one missing state path is a state path corresponding to the specified initial state and the specified current state.
Further, when the adding unit 304 adds the missing functional module to the test case, it is specifically configured to:
adding at least one missing state path that does not exist in the test cases included in the finite state machine to the test cases;
after the adding unit 304 adds the missing functional module to the test case, the adding unit is further configured to:
comparing the test case added with the at least one missing state path with the finite-state machine;
and if the comparison result is consistent, determining that no missing functional module exists in the test case of the data to be processed.
In the embodiment of the invention, the data detection equipment can analyze the requirement document of the data to be processed to obtain the functional module, determine the finite-state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed, compare the test case of the data to be processed with the finite-state machine, determine whether the test case of the data to be processed has the missing functional module, and if the missing functional module is determined to exist in the test case of the data to be processed, add the missing functional module to the test case. By the implementation mode, the test cases can be automatically supplemented, and the accuracy and efficiency of data detection are improved.
Referring to fig. 4, fig. 4 is a schematic block diagram of a server according to an embodiment of the present invention. The server in this embodiment as shown in the figure may include: one or more processors 401; one or more input devices 402, one or more output devices 403, and memory 404. The processor 401, the input device 402, the output device 403, and the memory 404 are connected by a bus 405. The memory 404 is used for storing computer programs, including programs, and the processor 401 is used for executing the programs stored in the memory 404. Wherein the processor 401 is configured to invoke the program to perform:
acquiring a requirement document of data to be processed, and analyzing the requirement document to obtain a functional module in the data to be processed;
determining a finite state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed;
comparing the test case of the data to be processed with the finite-state machine, and determining whether the test case of the data to be processed has a missing functional module or not, wherein the finite-state machine consists of at least one test case, and each test case in the at least one test case consists of a functional module and a state path of the data to be processed;
and if the missing functional modules exist in the test case of the data to be processed, adding the missing functional modules into the test case.
Further, when the processor 401 determines, according to the state information of the functional module in the data to be processed, the finite state machine corresponding to the functional module in the data to be processed, the finite state machine is specifically configured to:
acquiring state information of a functional module in the data to be processed, wherein the state information comprises an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action;
judging whether the functional module in the data to be processed meets the condition of describing by using a finite state machine or not according to the state information of the functional module in the data to be processed;
and if the judgment result is satisfied, determining the finite state machine corresponding to the functional module in the data to be processed.
Further, when the processor 401 determines the finite state machine corresponding to the functional module in the data to be processed, it is specifically configured to:
analyzing an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action of a functional module in the data to be processed, and determining at least one strip-shaped path corresponding to the functional module in the data to be processed, wherein each state path in the at least one state path corresponds to one functional module;
and determining a finite state machine corresponding to the functional module in the data to be processed according to at least one strip state path corresponding to the functional module in the data to be processed.
Further, the processor 401 analyzes the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the functional module in the data to be processed, and when determining at least one bar-shaped path corresponding to the functional module in the data to be processed, is specifically configured to:
analyzing the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed, and determining the incidence relation among the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed;
and determining at least one strip state path corresponding to the functional module in the data to be processed according to the incidence relation among the initial state, the target state, the current state, the conversion condition, the transition state and/or the conversion action.
Further, the processor 401 compares the test case of the data to be processed with the finite state machine, and when determining whether there are missing functional modules in the test case of the data to be processed, is specifically configured to:
acquiring a test case of the data to be processed, wherein the test case comprises at least one state path determined by a specified initial state and a specified current state;
comparing at least one state path determined by a specified initial state and a specified current state in the test case with at least one strip state path corresponding to the specified initial state and the specified current state in the finite state machine;
and if the comparison result is inconsistent, determining that the test case of the data to be processed has the missing functional module.
Further, if the comparison result is inconsistent, the processor 401 determines that there are missing functional modules in the test case of the data to be processed, and specifically is configured to:
and if the comparison result is that the finite state machine comprises at least one missing state path which does not exist in the test case, determining a missing functional module corresponding to the at least one missing state path, wherein the at least one missing state path is a state path corresponding to the specified initial state and the specified current state.
Further, when the processor 401 adds the missing functional module to the test case, the processor is specifically configured to:
adding at least one missing state path that does not exist in the test cases included in the finite state machine to the test cases;
after the processor 401 adds the missing functional module to the test case, the processor is further configured to:
comparing the test case added with the at least one missing state path with the finite-state machine;
and if the comparison result is consistent, determining that no missing functional module exists in the test case of the data to be processed.
In the embodiment of the invention, the server can analyze the requirement document of the data to be processed to obtain the functional module, determine the finite-state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed, compare the test case of the data to be processed with the finite-state machine, determine whether the test case of the data to be processed has the missing functional module, and if the missing functional module is determined to exist in the test case of the data to be processed, add the missing functional module to the test case. By the implementation mode, the test cases can be automatically supplemented, and the accuracy and efficiency of data detection are improved.
It should be understood that, in the embodiment of the present invention, the Processor 401 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Input devices 402 may include a touch pad, microphone, etc., and output devices 403 may include a display (LCD, etc.), speakers, etc.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
In a specific implementation, the processor 401, the input device 402, and the output device 403 described in this embodiment of the present invention may execute the implementation described in the method embodiment shown in fig. 1 provided in this embodiment of the present invention, and may also execute the implementation of the data detection device described in fig. 3 in this embodiment of the present invention, which is not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for detecting data described in the embodiment corresponding to fig. 1 is implemented, and a data detecting device according to the embodiment corresponding to fig. 3 of the present invention may also be implemented, which is not described herein again.
The computer readable storage medium may be an internal storage unit of the data detection device according to any of the foregoing embodiments, for example, a hard disk or a memory of the data detection device. The computer readable storage medium may also be an external storage device of the data detection device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the data detection device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the data detection device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the data detection apparatus. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a computer-readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a part of the embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.
Claims (10)
1. A method for data detection, comprising:
acquiring a requirement document of data to be processed, and analyzing the requirement document to obtain a functional module in the data to be processed;
determining a finite state machine corresponding to the functional module in the data to be processed according to the state information of the functional module in the data to be processed;
comparing the test case of the data to be processed with the finite-state machine, and determining whether the test case of the data to be processed has a missing functional module or not, wherein the finite-state machine consists of at least one test case, and each test case in the at least one test case consists of a functional module and a state path of the data to be processed;
and if the missing functional modules exist in the test case of the data to be processed, adding the missing functional modules into the test case.
2. The method according to claim 1, wherein the determining, according to the state information of the functional module in the data to be processed, the finite state machine corresponding to the functional module in the data to be processed comprises:
acquiring state information of a functional module in the data to be processed, wherein the state information comprises an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action;
judging whether the functional module in the data to be processed meets the condition of describing by using a finite state machine or not according to the state information of the functional module in the data to be processed;
and if the judgment result is satisfied, determining the finite state machine corresponding to the functional module in the data to be processed.
3. The method of claim 2, wherein determining a finite state machine corresponding to a functional module in the data to be processed comprises:
analyzing an initial state, a target state, a current state, a conversion condition, a transition state and/or a conversion action of a functional module in the data to be processed, and determining at least one strip-shaped path corresponding to the functional module in the data to be processed, wherein each state path in the at least one state path corresponds to one functional module;
and determining a finite state machine corresponding to the functional module in the data to be processed according to at least one strip state path corresponding to the functional module in the data to be processed.
4. The method according to claim 3, wherein the analyzing the initial state, the target state, the current state, the transition condition, the transition state, and/or the transition action of the functional module in the data to be processed to determine at least one bar-state path corresponding to the functional module in the data to be processed comprises:
analyzing the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed, and determining the incidence relation among the initial state, the target state, the current state, the conversion condition, the migration state and/or the conversion action of the functional module in the data to be processed;
and determining at least one strip state path corresponding to the functional module in the data to be processed according to the incidence relation among the initial state, the target state, the current state, the conversion condition, the transition state and/or the conversion action.
5. The method according to claim 4, wherein comparing the test cases of the data to be processed with the finite state machine to determine whether there are missing functional modules in the test cases of the data to be processed comprises:
acquiring a test case of the data to be processed, wherein the test case comprises at least one state path determined by a specified initial state and a specified current state;
comparing at least one state path determined by a specified initial state and a specified current state in the test case with at least one strip state path corresponding to the specified initial state and the specified current state in the finite state machine;
and if the comparison result is inconsistent, determining that the test case of the data to be processed has the missing functional module.
6. The method according to claim 5, wherein the determining that there are missing functional modules in the test case of the data to be processed if the comparison result is inconsistent comprises:
and if the comparison result is that the finite state machine comprises at least one missing state path which does not exist in the test case, determining a missing functional module corresponding to the at least one missing state path, wherein the at least one missing state path is a state path corresponding to the specified initial state and the specified current state.
7. The method of claim 6, wherein said adding said missing functional module to said test case comprises:
adding at least one missing state path that does not exist in the test cases included in the finite state machine to the test cases;
after the adding the missing functional modules to the test case, the method further includes:
comparing the test case added with the at least one missing state path with the finite-state machine;
and if the comparison result is consistent, determining that no missing functional module exists in the test case of the data to be processed.
8. A data detection apparatus, characterized by comprising means for performing the method of any one of claims 1-7.
9. A server comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being interconnected, wherein the memory is configured to store a computer program, the computer program comprising a program, the processor being configured to invoke the program to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1-7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010262776.6A CN111552635A (en) | 2020-04-03 | 2020-04-03 | Data detection method, equipment, server and readable storage medium |
PCT/CN2020/103410 WO2021196454A1 (en) | 2020-04-03 | 2020-07-22 | Data detection method and device, and server and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010262776.6A CN111552635A (en) | 2020-04-03 | 2020-04-03 | Data detection method, equipment, server and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111552635A true CN111552635A (en) | 2020-08-18 |
Family
ID=71998203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010262776.6A Pending CN111552635A (en) | 2020-04-03 | 2020-04-03 | Data detection method, equipment, server and readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111552635A (en) |
WO (1) | WO2021196454A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114385475A (en) * | 2020-10-16 | 2022-04-22 | 腾讯科技(深圳)有限公司 | Test method and related device |
CN115174441A (en) * | 2022-09-06 | 2022-10-11 | 中国汽车技术研究中心有限公司 | State machine based TCP fuzzy test method, equipment and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115225551B (en) * | 2022-07-14 | 2024-03-29 | 北京邮电大学 | Fuzzy test method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140122043A1 (en) * | 2012-11-01 | 2014-05-01 | University Of Nebraska | Linking graphical user interface testing tools and human performance modeling to enable usability assessment |
CN105955882A (en) * | 2016-04-27 | 2016-09-21 | 南京大学 | Iterative learning model behavior similarity test case generation method and apparatus |
CN106706329A (en) * | 2015-07-31 | 2017-05-24 | 大陆汽车电子(长春)有限公司 | Method for testing automobile sunroof controller |
CN108595338A (en) * | 2018-05-08 | 2018-09-28 | 平安普惠企业管理有限公司 | Test case write method, device, computer equipment and storage medium |
CN108897695A (en) * | 2018-08-06 | 2018-11-27 | 中国电力科学研究院有限公司 | A kind of the interconnection test method and system of demand side apparatus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8972928B2 (en) * | 2011-08-30 | 2015-03-03 | Uniquesoft, Llc | System and method for generating application code |
-
2020
- 2020-04-03 CN CN202010262776.6A patent/CN111552635A/en active Pending
- 2020-07-22 WO PCT/CN2020/103410 patent/WO2021196454A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140122043A1 (en) * | 2012-11-01 | 2014-05-01 | University Of Nebraska | Linking graphical user interface testing tools and human performance modeling to enable usability assessment |
CN106706329A (en) * | 2015-07-31 | 2017-05-24 | 大陆汽车电子(长春)有限公司 | Method for testing automobile sunroof controller |
CN105955882A (en) * | 2016-04-27 | 2016-09-21 | 南京大学 | Iterative learning model behavior similarity test case generation method and apparatus |
CN108595338A (en) * | 2018-05-08 | 2018-09-28 | 平安普惠企业管理有限公司 | Test case write method, device, computer equipment and storage medium |
CN108897695A (en) * | 2018-08-06 | 2018-11-27 | 中国电力科学研究院有限公司 | A kind of the interconnection test method and system of demand side apparatus |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114385475A (en) * | 2020-10-16 | 2022-04-22 | 腾讯科技(深圳)有限公司 | Test method and related device |
CN115174441A (en) * | 2022-09-06 | 2022-10-11 | 中国汽车技术研究中心有限公司 | State machine based TCP fuzzy test method, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2021196454A1 (en) | 2021-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108090567B (en) | Fault diagnosis method and device for power communication system | |
CN110275958B (en) | Website information identification method and device and electronic equipment | |
US10243967B2 (en) | Method, apparatus and system for detecting fraudulant software promotion | |
CN111552635A (en) | Data detection method, equipment, server and readable storage medium | |
CN108427731B (en) | Page code processing method and device, terminal equipment and medium | |
CN108038130B (en) | Automatic false user cleaning method, device, equipment and storage medium | |
CN110704304B (en) | Application program testing method and device, storage medium and server | |
CN109408262B (en) | Service data processing method and related equipment | |
CN108282490B (en) | Processing method and device for abnormal registered user, computer equipment and storage medium | |
CN109901881B (en) | Plug-in loading method and device of application program, computer equipment and storage medium | |
CN108763071A (en) | A kind of webpage test method and terminal device | |
CN109375956B (en) | Method for restarting operating system, logic device and control device | |
CN108197002B (en) | Mobile device non-buried point data statistical method, system, terminal and medium | |
CN110808877A (en) | Statistical analysis method and device based on interface response duration and computer equipment | |
CN109634822B (en) | Function time consumption statistical method and device, storage medium and terminal equipment | |
CN111309622A (en) | Application program testing method and device, terminal equipment and storage medium | |
CN108923967B (en) | Duplication-removing flow recording method, duplication-removing flow recording device, server and storage medium | |
CN113254153A (en) | Process task processing method and device, computer equipment and storage medium | |
CN117495544A (en) | Sandbox-based wind control evaluation method, sandbox-based wind control evaluation system, sandbox-based wind control evaluation terminal and storage medium | |
CN112948224A (en) | Data processing method, device, terminal and storage medium | |
CN115858114A (en) | Scheduling method and device of idle task, electronic equipment and readable storage medium | |
CN111125193B (en) | Method, device, equipment and storage medium for identifying abnormal multimedia comments | |
CN109726550A (en) | Abnormal operation behavioral value method, apparatus and computer readable storage medium | |
CN109815083B (en) | Application crash monitoring method and device, electronic equipment and medium | |
CN108848183B (en) | Login method and device for simulation user |
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 | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20240227 |
|
AD01 | Patent right deemed abandoned |