[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110597736A - Test data generation method and device - Google Patents

Test data generation method and device Download PDF

Info

Publication number
CN110597736A
CN110597736A CN201911056304.9A CN201911056304A CN110597736A CN 110597736 A CN110597736 A CN 110597736A CN 201911056304 A CN201911056304 A CN 201911056304A CN 110597736 A CN110597736 A CN 110597736A
Authority
CN
China
Prior art keywords
execution result
test
result data
data
unit
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
Application number
CN201911056304.9A
Other languages
Chinese (zh)
Other versions
CN110597736B (en
Inventor
李江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201911056304.9A priority Critical patent/CN110597736B/en
Publication of CN110597736A publication Critical patent/CN110597736A/en
Application granted granted Critical
Publication of CN110597736B publication Critical patent/CN110597736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

The embodiment of the invention discloses a test data generation method and a device, wherein the method comprises the following steps: monitoring at least one upstream unit for execution, and acquiring execution result data of the at least one upstream unit; at least one upstream unit has a calling relationship with a downstream unit; analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result; and storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information. By snooping upstream units having a call relationship with downstream units, corresponding execution result data can be acquired. The execution result data is used as the test data of the downstream unit, and the authenticity of the test data is guaranteed. And corresponding label information is set for the execution result data, so that the downstream unit can conveniently select the test data of the corresponding label information according to the test requirement to test when using the test data.

Description

Test data generation method and device
Technical Field
The embodiment of the invention relates to the field of testing, in particular to a method and a device for generating test data.
Background
At the time of testing, corresponding test data needs to be prepared. The test data affects the final test result. When test data is generated, the generation method generally adopted in the prior art includes the following steps:
1. and manually or automatically creating a service scene by a tester, and generating test data based on the service scene. However, this method is more dependent on the upstream unit, and after the downstream unit to be tested and the upstream unit are mutually debugged, test data is generated according to the upstream unit. However, in practical applications, the downstream unit is often not developed yet, and the upstream unit is already tested, so that the upstream unit and the downstream unit cannot be tested simultaneously. And the service scene is created manually or automatically by the tester, the tester needs to deeply understand the service scene of the upstream unit to generate high-quality test data, and the requirement on the tester is high.
2. The test data is manually constructed by a tester, such as by using mock technology to generate the test data. The test data generated in this way is not based on a real service scenario, and the generated test data is often not real and accurate enough. If more real and accurate test data needs to be generated, and the tester needs to understand the service scene deeply, test data with higher quality can be generated, and the requirement on the tester is higher.
Disclosure of Invention
In view of the above, embodiments of the present invention are proposed to provide a test data generation method and apparatus that overcome or at least partially solve the above problems.
According to an aspect of an embodiment of the present invention, there is provided a test data generation method, including:
monitoring at least one upstream unit for execution, and acquiring execution result data of the at least one upstream unit; wherein at least one upstream unit has a calling relationship with a downstream unit;
analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result;
and storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information.
Optionally, analyzing the execution result data, and setting at least one tag information corresponding to the execution result data according to the analysis result further includes:
analyzing the execution result data, and determining the analysis result of the service type, the scene type and/or the data range value contained in the execution result data;
and setting at least one piece of label information corresponding to the execution result data according to the analysis result.
Optionally, the monitoring at least one upstream unit of the execution, and the obtaining the execution result data of the at least one upstream unit further includes:
and monitoring at least one upstream unit for execution in the downstream unit, and acquiring execution result data of the at least one upstream unit.
Optionally, the method further comprises:
acquiring a test data acquisition request triggered by a downstream unit test page, wherein the test data acquisition request carries test designated label information;
acquiring execution result data corresponding to the test designated label information from a database as test data;
and returning the test data to the downstream unit test page.
Optionally, the method further comprises:
and transmitting the test data to an interface corresponding to the downstream unit aiming at the test trigger request of any test data in the downstream unit test page so as to start the test of the downstream unit.
Optionally, the method is performed at a downstream unit.
According to another aspect of the embodiments of the present invention, there is provided a test data generating apparatus including:
the monitoring module is suitable for monitoring at least one executed upstream unit and acquiring execution result data of the at least one upstream unit; wherein at least one upstream unit has a calling relationship with a downstream unit;
the analysis module is suitable for analyzing the execution result data and setting at least one piece of label information corresponding to the execution result data according to the analysis result;
and the storage module is suitable for storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information.
Optionally, the parsing module is further adapted to:
analyzing the execution result data, and determining the analysis result of the service type, the scene type and/or the data range value contained in the execution result data;
and setting at least one piece of label information corresponding to the execution result data according to the analysis result.
Optionally, the listening module is further adapted to:
and monitoring at least one upstream unit for execution in the downstream unit, and acquiring execution result data of the at least one upstream unit.
Optionally, the apparatus further comprises:
the acquisition module is suitable for acquiring a test data acquisition request triggered by a downstream unit test page, wherein the test data acquisition request carries test designated tag information; acquiring execution result data corresponding to the test designated label information from a database as test data; and returning the test data to the downstream unit test page.
Optionally, the apparatus further comprises:
and the starting module is suitable for transmitting the test data to an interface corresponding to the downstream unit aiming at the test trigger request of any test data in the downstream unit test page so as to start the test of the downstream unit.
Optionally, the apparatus is implemented in a downstream unit.
According to still another aspect of an embodiment of the present invention, there is provided a computing device including: the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the test data generation method.
According to a further aspect of the embodiments of the present invention, there is provided a computer storage medium, in which at least one executable instruction is stored, and the executable instruction causes a processor to perform operations corresponding to the above-mentioned test data generation method.
According to the test data generation method and device provided by the embodiment of the invention, at least one executed upstream unit is monitored, and execution result data of the at least one upstream unit is obtained; wherein at least one upstream unit has a calling relationship with a downstream unit; analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result; and storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information. In the embodiment of the invention, the execution result data of the upstream unit can be acquired by monitoring the upstream unit having a calling relationship with the downstream unit. The execution result data of the upstream unit is used as the test data of the downstream unit, so that the authenticity of the test data is guaranteed, and the test data is more reliable compared with the test data generated in the prior art. The test data acquired by the embodiment of the invention does not depend on the completion degree of the downstream unit and does not depend on joint debugging between the downstream unit and the upstream unit. After the execution result data is obtained, corresponding label information is set for the execution result data, so that the downstream unit can conveniently select the test data of the corresponding label information according to the test requirement to test when using the test data. At this time, the test of the downstream unit can be directly performed according to the test data, and the test of the downstream unit is asynchronously completed without depending on the execution of the upstream unit.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the embodiments of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the embodiments of the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow diagram of a test data generation method according to one embodiment of the invention;
FIG. 2 shows a flow diagram of a test data generation method according to another embodiment of the invention;
FIG. 3 is a block diagram showing the structure of a test data generating apparatus according to an embodiment of the present invention;
FIG. 4 shows a schematic structural diagram of a computing device according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a schematic flow chart of a test data generation method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, at least one upstream unit for execution is monitored, and execution result data of the at least one upstream unit is obtained.
The downstream unit in this embodiment may be a developed downstream unit that has not been subjected to a test or a joint debugging test, or may be an undeveloped downstream unit that has only realized an interface function and cannot test the function of the downstream unit. That is, the downstream unit has not reached a condition under which it can be tested directly with the upstream unit, and the upstream unit can invoke the downstream unit to complete testing of the upstream unit itself. The method of the present embodiment is performed in a downstream unit. Preferably, when the upstream unit is executed and the downstream unit has not reached the point where the downstream unit can be executed together for testing, if the execution link of the upstream unit is long, the downstream unit needs to be called after passing through a plurality of execution links. If the development time of the upstream unit is different from that of the downstream unit and the developers are different, the downstream unit is not developed when the upstream unit is tested independently after the development is finished. When the downstream unit is tested after being developed, the upstream unit is already tested, the upstream unit is reconciled to build a test environment suitable for the downstream unit, and the test data wastes much coordination cost. Therefore, in the embodiment, when the upstream unit executes, a functional module for monitoring execution of at least one upstream unit, such as a stub module, may be arranged in the downstream unit, and when the downstream unit is called by the upstream unit, the stub module may intercept the call of the upstream unit to obtain execution result data of the upstream unit.
The downstream unit and the upstream unit have a calling relationship, and the downstream unit can correspond to the calling of a plurality of different upstream units. At least one upstream unit which calls the upstream unit is monitored in the downstream unit, the currently executed upstream unit is monitored, and the execution result data of the upstream unit is obtained. The execution result data of the upstream unit includes, for example, corresponding parameters when the downstream unit is called, related information (e.g., method name, context, etc.) of the upstream unit, a result return value of executing the upstream unit, and the like.
And step S102, analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result.
When analyzing the obtained execution result data, the corresponding analysis result may be obtained from a plurality of aspects, such as a service type, a scene type, and a data range value, included in the execution result data. When the execution result data is analyzed, the corresponding analysis result may also be obtained by analyzing according to the analysis rule, for example, different service type tag information corresponding to each field value in the preset field, different scene type tag information corresponding to each field value in the preset field, and the like, for example, according to a field value "XXX" of a certain field in the execution result data, the service type contained in the execution result data is obtained by analyzing as aggregated payment, and the like. And label information corresponding to different data range values can be set for specific data during analysis. Such as parsing according to the payment data range value, setting "large payment" label information, etc. The parsing rule may include a plurality of parsing rules, and different parsing rules are set from different aspects such as a service type, a scene type, a data range value, and the like. Corresponding to the execution result, when the execution result meets a plurality of analysis rules, a plurality of label information can be set for the execution result, so that the downstream unit can conveniently screen the test data, and different test requirements can be met.
Step S103, storing the execution result data and the at least one piece of label information into a database so that a downstream unit can test by using the execution result data and the at least one piece of label information.
After the execution result data and the corresponding tag information are set, the execution result data and at least one tag information may be stored in the database. When the subsequent downstream unit development is finished and the test is required, the execution result data in the database is directly and asynchronously acquired without depending on the upstream unit and is used as the test data of the downstream unit, and the test of the downstream unit is finished.
According to the test data generation method provided by the embodiment of the invention, at least one executed upstream unit is monitored, and execution result data of the at least one upstream unit is obtained; wherein at least one upstream unit has a calling relationship with a downstream unit; analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result; and storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information. In the embodiment of the invention, the execution result data of the upstream unit can be acquired by monitoring the upstream unit having a calling relationship with the downstream unit. The execution result data of the upstream unit is used as the test data of the downstream unit, so that the authenticity of the test data is guaranteed, and the test data is more reliable compared with the test data generated in the prior art. The test data acquired by the embodiment of the invention does not depend on the completion degree of the downstream unit and does not depend on joint debugging between the downstream unit and the upstream unit. After the execution result data is obtained, corresponding label information is set for the execution result data, so that the downstream unit can conveniently select the test data of the corresponding label information according to the test requirement to test when using the test data. At this time, the test of the downstream unit can be directly performed according to the test data, and the test of the downstream unit is asynchronously completed without depending on the execution of the upstream unit.
Fig. 2 is a flowchart illustrating a test data generating method according to another embodiment of the present invention, and as shown in fig. 2, the method includes the following steps:
step S201, at least one upstream unit that is executed is monitored, and execution result data of the at least one upstream unit is obtained.
Monitoring of at least one executed upstream unit is set in the downstream unit, when the at least one executed upstream unit is monitored, whether the execution result data of the at least one upstream unit needs to be analyzed and stored can be judged according to the actual situation of the downstream unit, and if the execution result data of the at least one upstream unit needs to be analyzed and stored, the subsequent steps are executed. If not, the execution result data of at least one upstream unit can be directly processed without ground, and the execution result data is irrelevant to the test data required by the downstream unit.
Step S202, analyzing the execution result data, and setting at least one label information corresponding to the execution result data according to the analysis result.
When the execution result data is analyzed, the analysis result is determined based on different meanings represented by each field and the field value in the execution result data, and then corresponding label information is set for the execution result data.
Step S203, storing the execution result data and the at least one tag information into a database for a downstream unit to perform a test by using the execution result data and the at least one tag information.
When the execution result data and at least one piece of label information are stored in the database, the execution result data can be respectively stored into a plurality of pieces according to the label information, so that the execution result data can be directly acquired according to the label information in the follow-up process, and also a plurality of pieces of label information corresponding to one piece of execution result data can be stored in one piece of execution result data, indexes and the like are established for the label information, so that the acquisition of the follow-up test data is facilitated, and the method is not limited herein.
Step S204, a test data acquisition request triggered by the downstream unit test page is acquired.
In step S205, execution result data corresponding to the test designation label information is acquired from the database as test data.
Step S206, the test data is returned to the downstream unit test page.
When the downstream unit acquires the test data, the test data may be screened through the downstream unit test page. Specifically, test designation label information required by the test can be set in the downstream unit test page according to the test requirement.
The received test data acquisition request triggered by the downstream unit test page carries test appointed label information so as to inquire execution result data corresponding to the test appointed label information from a database according to the test appointed label information. And the acquired execution result data is used as the test data of the downstream unit and is returned and displayed in the test page of the downstream unit. When there are a plurality of pieces of execution result data corresponding to the test designation tag information queried from the database according to the test designation tag information, the plurality of pieces of execution result data may be displayed in the downstream unit test page one by one.
Step S207, transmitting the test data to an interface corresponding to the downstream unit according to the test trigger request of any test data in the downstream unit test page, so as to start the test of the downstream unit.
Aiming at the test data displayed in the test page of the downstream unit, one piece of test data can be selected at a time, the test data is transmitted to the corresponding interface of the downstream unit, and the test of the downstream unit is started; or selecting a plurality of test data at one time, sequentially transmitting the plurality of test data to the corresponding interfaces of the downstream units, and sequentially testing the downstream units by using the plurality of test data. The test on the downstream unit can be directly finished by using the test data without constructing the upstream unit cooperative test, thereby reducing the dependence on the upstream unit.
The test triggering request of any test data in the test page of the downstream unit can be obtained by using the script file, the test data is transmitted to the corresponding interface of the downstream unit, and the test of the downstream unit is started through the script file.
According to the test data generation method provided by the embodiment of the invention, the execution of the upstream unit is monitored, and the execution result data of the upstream unit is obtained. The execution result data of the upstream unit is used as the test data required by the downstream unit, so that the test data can be directly acquired when the downstream unit tests, the test environment and the test data do not need to be built with the upstream unit again, and the dependence on the upstream unit is greatly reduced. And the authenticity and the reliability of the test data of the downstream unit are guaranteed by using the execution result data of the upstream unit.
Fig. 3 is a block diagram showing a configuration of a test data generating apparatus according to an embodiment of the present invention, and as shown in fig. 3, the apparatus includes:
the listening module 310 is adapted to: monitoring at least one upstream unit for execution, and acquiring execution result data of the at least one upstream unit; wherein at least one upstream unit has a calling relationship with a downstream unit;
the parsing module 320 is adapted to: analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result;
the storage module 330 is adapted to: and storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information.
Optionally, the parsing module 320 is further adapted to: analyzing the execution result data, and determining the analysis result of the service type, the scene type and/or the data range value contained in the execution result data; and setting at least one piece of label information corresponding to the execution result data according to the analysis result.
Optionally, the listening module 310 is further adapted to: and monitoring at least one upstream unit for execution in the downstream unit, and acquiring execution result data of the at least one upstream unit.
Optionally, the apparatus further comprises: the acquisition module 340 is adapted to: acquiring a test data acquisition request triggered by a downstream unit test page, wherein the test data acquisition request carries test designated label information; acquiring execution result data corresponding to the test designated label information from a database as test data; and returning the test data to the downstream unit test page.
Optionally, the apparatus further comprises: the initiation module 350 is adapted to: and transmitting the test data to an interface corresponding to the downstream unit aiming at the test trigger request of any test data in the downstream unit test page so as to start the test of the downstream unit.
The descriptions of the modules refer to the corresponding descriptions in the method embodiments, and are not repeated herein.
According to the test data generation device provided by the embodiment of the invention, at least one executed upstream unit is monitored, and execution result data of the at least one upstream unit is obtained; wherein at least one upstream unit has a calling relationship with a downstream unit; analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to the analysis result; and storing the execution result data and the at least one piece of label information into a database so as to be used by a downstream unit for testing by using the execution result data and the at least one piece of label information. In the embodiment of the invention, the execution result data of the upstream unit can be acquired by monitoring the upstream unit having a calling relationship with the downstream unit. The execution result data of the upstream unit is used as the test data of the downstream unit, so that the authenticity of the test data is guaranteed, and the test data is more reliable compared with the test data generated in the prior art. The test data acquired by the embodiment of the invention does not depend on the completion degree of the downstream unit and does not depend on joint debugging between the downstream unit and the upstream unit. After the execution result data is obtained, corresponding label information is set for the execution result data, so that the downstream unit can conveniently select the test data of the corresponding label information according to the test requirement to test when using the test data. At this time, the test of the downstream unit can be directly performed according to the test data, and the test of the downstream unit is asynchronously completed without depending on the execution of the upstream unit.
The embodiment of the invention also provides a nonvolatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the executable instruction can execute the test data generation method in any method embodiment.
Fig. 4 is a schematic structural diagram of a computing device according to an embodiment of the present invention, and a specific embodiment of the present invention does not limit a specific implementation of the computing device.
As shown in fig. 4, the computing device may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein:
the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with network elements of other devices, such as clients or other servers.
The processor 402 is configured to execute the program 410, and may specifically perform relevant steps in the above-described test data generation method embodiment.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may specifically be configured to cause the processor 402 to execute the test data generation method in any of the above-described method embodiments. For specific implementation of each step in the program 410, reference may be made to corresponding steps and corresponding descriptions in units in the above test data generation embodiment, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of embodiments of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best modes of embodiments of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that is, the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of an embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of and form different embodiments of the invention. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention. Embodiments of the invention may also be implemented as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing embodiments of the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the embodiments of the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A method of test data generation, comprising:
monitoring at least one upstream unit for execution, and acquiring execution result data of the at least one upstream unit; wherein the at least one upstream element has a calling relationship with a downstream element;
analyzing the execution result data, and setting at least one piece of label information corresponding to the execution result data according to an analysis result;
and storing the execution result data and the at least one piece of label information into a database so that the downstream unit can test by using the execution result data and the at least one piece of label information.
2. The method of claim 1, wherein the parsing the execution result data, and setting at least one tag information corresponding to the execution result data according to a parsing result further comprises:
analyzing the execution result data, and determining the analysis result of the service type, the scene type and/or the data range value contained in the execution result data;
and setting at least one piece of label information corresponding to the execution result data according to the analysis result.
3. The method of claim 1, wherein the listening for at least one upstream unit of execution, the obtaining execution result data of the at least one upstream unit further comprises:
and monitoring at least one upstream unit in the downstream units for execution, and acquiring execution result data of the at least one upstream unit.
4. The method according to any one of claims 1-3, wherein the method further comprises:
acquiring a test data acquisition request triggered by a downstream unit test page, wherein the test data acquisition request carries test designated label information;
acquiring execution result data corresponding to the test designated label information from a database as test data;
and returning the test data to the downstream unit test page.
5. The method of claim 4, wherein the method further comprises:
and transmitting the test data to an interface corresponding to the downstream unit aiming at the test trigger request of any test data in the downstream unit test page so as to start the test of the downstream unit.
6. The method according to any of claims 1-5, wherein the method is performed at the downstream unit.
7. A test data generation apparatus, comprising:
the monitoring module is suitable for monitoring at least one upstream unit to be executed and acquiring the execution result data of the at least one upstream unit; wherein the at least one upstream element has a calling relationship with a downstream element;
the analysis module is suitable for analyzing the execution result data and setting at least one piece of label information corresponding to the execution result data according to an analysis result;
the storage module is suitable for storing the execution result data and the at least one piece of label information into a database so that the downstream unit can test by using the execution result data and the at least one piece of label information.
8. The apparatus of claim 7, wherein the parsing module is further adapted to:
analyzing the execution result data, and determining the analysis result of the service type, the scene type and/or the data range value contained in the execution result data;
and setting at least one piece of label information corresponding to the execution result data according to the analysis result.
9. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the test data generation method of any one of claims 1-6.
10. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the test data generation method of any one of claims 1-6.
CN201911056304.9A 2019-10-31 2019-10-31 Test data generation method and device Active CN110597736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911056304.9A CN110597736B (en) 2019-10-31 2019-10-31 Test data generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911056304.9A CN110597736B (en) 2019-10-31 2019-10-31 Test data generation method and device

Publications (2)

Publication Number Publication Date
CN110597736A true CN110597736A (en) 2019-12-20
CN110597736B CN110597736B (en) 2023-01-17

Family

ID=68852394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911056304.9A Active CN110597736B (en) 2019-10-31 2019-10-31 Test data generation method and device

Country Status (1)

Country Link
CN (1) CN110597736B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114036053A (en) * 2021-11-12 2022-02-11 北京字跳网络技术有限公司 Test method, test device, readable medium and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641601A (en) * 2004-01-04 2005-07-20 华为技术有限公司 Software unit measuring method
US20060156288A1 (en) * 2005-01-11 2006-07-13 Jones Rodney G Extensible execution language
CN105335284A (en) * 2014-08-07 2016-02-17 腾讯科技(深圳)有限公司 Data processing method and apparatus for continuous integration system
CN106708719A (en) * 2015-08-04 2017-05-24 阿里巴巴集团控股有限公司 Business function testing method and apparatus
CN106951369A (en) * 2017-03-15 2017-07-14 微梦创科网络科技(中国)有限公司 The management method and device of a kind of joint debugging test
CN107203471A (en) * 2017-05-24 2017-09-26 腾讯科技(深圳)有限公司 Joint debugging method, service platform and computer-readable storage medium
CN107797918A (en) * 2017-03-13 2018-03-13 平安科技(深圳)有限公司 Method of testing and test device
CN107908553A (en) * 2017-11-02 2018-04-13 平安科技(深圳)有限公司 Correlation testing method, application server and computer-readable recording medium
CN107957952A (en) * 2017-12-18 2018-04-24 马上消费金融股份有限公司 Interface test method, device and medium
CN108255717A (en) * 2018-01-10 2018-07-06 链家网(北京)科技有限公司 Interface automatic test optimization method, system, electronic equipment and storage medium
CN108304321A (en) * 2018-01-10 2018-07-20 链家网(北京)科技有限公司 A kind of method, system and device creating front and back end exploitation joint debugging environment
CN108427644A (en) * 2018-03-27 2018-08-21 深圳市买买提信息科技有限公司 Service test method, service testing system and service testing device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641601A (en) * 2004-01-04 2005-07-20 华为技术有限公司 Software unit measuring method
US20060156288A1 (en) * 2005-01-11 2006-07-13 Jones Rodney G Extensible execution language
CN105335284A (en) * 2014-08-07 2016-02-17 腾讯科技(深圳)有限公司 Data processing method and apparatus for continuous integration system
CN106708719A (en) * 2015-08-04 2017-05-24 阿里巴巴集团控股有限公司 Business function testing method and apparatus
CN107797918A (en) * 2017-03-13 2018-03-13 平安科技(深圳)有限公司 Method of testing and test device
CN106951369A (en) * 2017-03-15 2017-07-14 微梦创科网络科技(中国)有限公司 The management method and device of a kind of joint debugging test
CN107203471A (en) * 2017-05-24 2017-09-26 腾讯科技(深圳)有限公司 Joint debugging method, service platform and computer-readable storage medium
CN107908553A (en) * 2017-11-02 2018-04-13 平安科技(深圳)有限公司 Correlation testing method, application server and computer-readable recording medium
CN107957952A (en) * 2017-12-18 2018-04-24 马上消费金融股份有限公司 Interface test method, device and medium
CN108255717A (en) * 2018-01-10 2018-07-06 链家网(北京)科技有限公司 Interface automatic test optimization method, system, electronic equipment and storage medium
CN108304321A (en) * 2018-01-10 2018-07-20 链家网(北京)科技有限公司 A kind of method, system and device creating front and back end exploitation joint debugging environment
CN108427644A (en) * 2018-03-27 2018-08-21 深圳市买买提信息科技有限公司 Service test method, service testing system and service testing device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佟海: "基于C/S体系结构的软件测试方法", 《今日科苑》 *
王敏等: "数据驱动测试在Nunit框架中的应用", 《微型机与应用》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114036053A (en) * 2021-11-12 2022-02-11 北京字跳网络技术有限公司 Test method, test device, readable medium and electronic equipment

Also Published As

Publication number Publication date
CN110597736B (en) 2023-01-17

Similar Documents

Publication Publication Date Title
CN109558313B (en) Method and device for constructing abnormal test scene
CN107729255B (en) Software testing method, device and system
CN110955409B (en) Method and device for creating resources on cloud platform
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN111858296A (en) Interface test method, device, equipment and storage medium
CN111831542B (en) API application debugging method and device and storage medium
CN110059003B (en) Automatic test method, device, electronic equipment and readable storage medium
CN109992511B (en) Device and method for obtaining code test coverage rate
CN110597736B (en) Test data generation method and device
CN115391228A (en) Precise test method, device, equipment and medium
CN112416762A (en) API test method and device, equipment and computer readable storage medium
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN117707946A (en) Test script generation method and device for browser
CN112015436A (en) Short message platform deployment method and device, computing equipment and computer storage medium
CN106951236B (en) Plug-in development method and device
CN111338928A (en) Chrome-based browser testing method and device
CN109408063B (en) Instruction pile inserting method and device based on virtual machine
CN109902004B (en) Method and device for testing application program link channel
CN111638905A (en) Version number generation method and device, electronic equipment and readable storage medium
US11816022B2 (en) Snapshot simulation of service module responses
CN112035356A (en) Automatic testing method and system for web application compatibility
CN106844188A (en) A kind of test agent method, device and test system
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium
CN111444057A (en) Page performance data acquisition method and device and computing equipment
CN114416585A (en) Automatic testing method and device

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