CN113010429A - Method, device and equipment for testing flow calculation application - Google Patents

Method, device and equipment for testing flow calculation application Download PDF

Info

Publication number
CN113010429A
CN113010429A CN202110325528.6A CN202110325528A CN113010429A CN 113010429 A CN113010429 A CN 113010429A CN 202110325528 A CN202110325528 A CN 202110325528A CN 113010429 A CN113010429 A CN 113010429A
Authority
CN
China
Prior art keywords
test
test data
data packet
environment
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110325528.6A
Other languages
Chinese (zh)
Inventor
郑舒力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110325528.6A priority Critical patent/CN113010429A/en
Publication of CN113010429A publication Critical patent/CN113010429A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method, a device and equipment for testing flow calculation application, which are applied to the technical field of big data, wherein the method can acquire configuration parameters, the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when the stream computing application is run; according to the test data packet parameters, obtaining test data from the test data packet indicated by the test data packet parameters; and testing the streaming computing application based on the test data acquired from the test data packet, and outputting test result data obtained by the test. By the method, the device and the equipment for testing the flow calculation application, the testing efficiency of the flow calculation application can be improved.

Description

Method, device and equipment for testing flow calculation application
Technical Field
The invention relates to the technical field of big data, in particular to a method, a device and equipment for testing flow calculation application.
Background
Stream computation belongs to the technology of big data processing (computation), and is characterized by not being responsible for storing data, and stream computation application can be understood as application implemented by applying stream computation. Specifically, the stream computation application reads data from a read data source, processes the data, and then outputs the processed data to an output data source. This allows the stream computing application to rely on both read and output data sources when running or testing as a whole.
In the existing method, in the process of testing a stream computation application, a read data source and an output data source are both implemented by a distributed storage system, specifically, test data is prepared and stored in the read data source implemented by the distributed storage system, and after testing the stream computation application based on the test data, obtained test result data is output to the output data source implemented by the distributed storage system. It can be seen that, in the existing method, the stream computing application needs to interact with the distributed storage system respectively to read the test data and output the processed data, and the interaction with the distributed storage system is generally complex, which may make the testing efficiency for the stream computing application low.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device and equipment for testing flow calculation application, so as to improve the testing efficiency of the flow calculation application. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for testing a stream computing application, including:
acquiring configuration parameters, wherein the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when a stream computing application is run;
according to the test data packet parameters, obtaining test data from the test data packet indicated by the test data packet parameters;
and testing the streaming computing application based on the test data acquired from the test data packet, and outputting test result data obtained by the test.
Optionally, the outputting test result data obtained by the test includes:
outputting the test result data to a log; alternatively, the first and second electrodes may be,
printing the test result data in a standard output; alternatively, the first and second electrodes may be,
and displaying the test result data on a visual interface.
Optionally, the configuration parameters further include an environment parameter, where the environment parameter is used to indicate whether the current environment is a test environment or an online operating environment;
before the obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter, the method further includes:
judging whether the current environment is a test environment or not according to the environment parameters;
the obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter includes:
and when the environment parameter indicates that the current environment is a test environment, acquiring test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
Optionally, after determining whether the current environment is the test environment according to the environment parameter, the method further includes:
when the environment parameter indicates that the current environment is an online operating environment, reading test data from the specified read data source;
and running the stream calculation application based on the test data read from the read data source, and outputting a running result obtained by the running to an output data source.
Optionally, before the obtaining the configuration parameter, the method further includes:
providing a configuration parameter input interface;
the obtaining of the configuration parameters includes:
receiving the configuration parameters input through the configuration parameter input interface.
In a second aspect, an embodiment of the present invention provides a test apparatus for a flow computing application, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring configuration parameters, the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when a stream computing application is run;
the second obtaining module is used for obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter;
a first testing module for testing the streaming computing application based on the test data obtained from the test data packet;
and the first output module is used for outputting the test result data obtained by the test.
Optionally, the first output module is specifically configured to output the test result data to a log; or printing the test result data in a standard output; or displaying the test result data on a visual interface.
Optionally, the configuration parameters further include an environment parameter, where the environment parameter is used to indicate whether the current environment is a test environment or an online operating environment;
the device further comprises:
a judging module, configured to judge whether a current environment is a test environment according to the environment parameter before obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter;
the second obtaining module is specifically configured to, when the environment parameter indicates that the current environment is a test environment, obtain test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
Optionally, the apparatus further comprises:
the reading module is used for reading the test data from the specified read data source when the environment parameter indicates that the current environment is an online operating environment;
a second test module to run the stream computation application based on test data read from the read data source;
and the second output module is used for outputting the operation result obtained by operation to the output data source.
Optionally, the apparatus further comprises:
the providing module is used for providing a configuration parameter input interface before the configuration parameters are obtained;
the first obtaining module is specifically configured to receive the configuration parameter input through the configuration parameter input interface.
In a third aspect, an embodiment of the present invention provides a test device for a stream computing application, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the first aspect when executing the program stored in the memory.
The embodiment of the invention has the following beneficial effects:
the method, the device and the equipment for testing the stream computing application provided by the embodiment of the invention can acquire the configuration parameters, wherein the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating the test data packet corresponding to the specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when the stream computing application is run; according to the test data packet parameters, obtaining test data from the test data packet indicated by the test data packet parameters; and testing the streaming computing application based on the test data acquired from the test data packet, and outputting test result data obtained by the test. The test data in the text form can be acquired from the test data packet according to the configuration parameters, the streaming calculation application is tested based on the test data acquired from the test data packet, and test result data obtained by the test is output without performing complex interaction with a distributed storage system, so that the test efficiency of the streaming calculation application can be improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flow chart of a method for testing a flow computing application according to an embodiment of the present invention;
FIG. 2 is another flow chart of a method for testing a flow computing application provided by an embodiment of the present invention;
FIG. 3 is a flowchart of another method for testing a stream computing application according to an embodiment of the present invention;
fig. 4 is an interface diagram in a testing process by applying the testing method of the flow computing application according to the embodiment of the present invention;
FIG. 5 is a schematic diagram of an exemplary embodiment of a testing apparatus for flow computing applications;
FIG. 6 is a schematic diagram of another structure of a testing apparatus for flow computing applications according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another structure of a testing apparatus for flow computing applications according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of another exemplary embodiment of a testing apparatus for flow computing applications;
fig. 9 is a schematic structural diagram of a test apparatus for a flow computing application 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 embodiment of the invention provides a method for testing flow calculation application, which comprises the following steps:
acquiring configuration parameters, wherein the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when the stream computing application is run;
according to the test data packet parameters, obtaining test data from the test data packet indicated by the test data packet parameters;
and testing the streaming computing application based on the test data acquired from the test data packet, and outputting test result data obtained by the test.
In the embodiment of the invention, the test data in the text form can be acquired from the test data packet according to the configuration parameters, the streaming calculation application is tested based on the test data acquired from the test data packet, and the test result data obtained by the test is output without performing complex interaction with a distributed storage system, so that the test efficiency for the streaming calculation application can be improved.
The test mode of the stream computing application provided by the embodiment of the invention can be applied to electronic equipment, and the electronic equipment can be provided with a stream computing engine and the like which can test and/or run the stream computing application. Specifically, the electronic device may be a terminal, a server, or the like.
Fig. 1 is a flowchart of a method for testing a stream computing application according to an embodiment of the present invention. Referring to fig. 1, a method for testing a flow computing application according to an embodiment of the present invention may include:
s101, obtaining configuration parameters.
The configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to the specified read data source; the test data packet contains test data in text form; the specified read data source is the read data source that is needed when running the stream computation application.
The read data source required for running the stream computation application may be understood as an input source introduced in the code implementing the stream computation application, and the read data source may be understood as a real data source corresponding to the service. It is also understood that there is a correspondence, i.e., a "fixed binding" relationship, between the read data source and the operation of the stream computing application.
The stream computing application may be tested before running the stream computing application. In the embodiment of the invention, the reading data source required when the stream computing application is operated is replaced by the test data packet containing the test data in the text form, so that the stream computing application is tested before the stream computing application is operated.
In one implementation, at S101: before obtaining the configuration parameters, the method may further include:
a configuration interface is provided.
The configuration interface includes configuration parameter options.
The configuration interface may be a visualization interface.
For example, the configuration interface may include an option corresponding to the test packet parameter, and the user may select or input the test packet parameter, such as the name of the test packet, and the like, in the option.
S101, acquiring the configuration parameter may include:
receiving configuration parameters input through the configuration parameter options.
Thus, the test data packet parameters can be obtained through the configuration interface.
And S102, acquiring test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
The test packet parameters may include a test packet identification, such as a test packet name, etc.
And determining the corresponding test data packet according to the test data packet parameters, so that test data in a text form can be obtained from the test data packet.
The test data packet may be a test file that is uploaded to the local electronic device in advance, and the test file includes a plurality of lines of test data.
S103, testing the streaming computing application based on the test data acquired from the test data packet, and outputting test result data obtained by the test.
Specifically, the test may be understood as executing test data by the flow calculation application, and verifying whether the flow calculation application can achieve an intended function by the obtained test result data.
The outputting of the test result data obtained by the test may include: outputting the test result data to a log; or printing the test result data in the standard output; or displaying the test result data on a visual interface.
The test data in the text form can be acquired from the test data packet according to the configuration parameters, the streaming computing application is tested based on the test data acquired from the test data packet, the test result data is not required to be output to an output data source realized by the distributed storage system, the test result data obtained by the test is output, and the complex interaction with the distributed storage system is not required, so that the test efficiency of the streaming computing application can be improved.
Meanwhile, compared with the existing data source depending on the complex distributed system, in the process of testing the flow calculation application, the flow calculation test result is affected by the instability of the upstream and downstream data sources (the read data source and the output data source), so that the test cost is increased to test the instability of the upstream and downstream data sources, and the problem of low test efficiency is indirectly caused. And intuitively create the experience for the tester of the stability of the data source upstream and downstream of the test rather than the flow computation application (which equates to the computation logic in the middle of the flow computation). In the embodiment of the invention, the test data in the text form is acquired from the test data packet, so that the test data can be understood as a simpler data source (the stability of the data source in the type of a distributed system in a test environment is generally inferior to that of a simple data source in the text form), and the test of the stream computing application is performed based on the test data acquired from the test data packet, so that the test data can be understood as computing logic in the middle of a single test stream computing application.
In one implementation, the configuration parameters further include environmental parameters.
The environment parameter is used to indicate whether the current environment is a test environment or an online operating environment.
Fig. 2 is another flowchart of a method for testing a stream computing application according to an embodiment of the present invention. Referring to fig. 2, in the method for testing a stream computing application according to the embodiment of the present invention, in S102: before obtaining the test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter, the method may further include:
and S104, judging whether the current environment is a test environment or not according to the environment parameters.
In an implementation manner, the configuration interface may further include an option corresponding to the environmental parameter. Such as a "go unit test" button, or a "run" button.
When the button of 'performing unit test' is detected to be clicked, the current environment is a test environment; when the 'run' button is detected to be clicked, it indicates that the current environment is a run environment.
S102 may include:
and S1021, when the environment parameter indicates that the current environment is the test environment, obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
That is, the text-form data source is used to directly read the text-form data in the test data packet as the test data.
Meanwhile, the obtained test result data can pass through log form data. Alternatively, the test result data may be presented in the form of a visual interface, or printed in a standard output.
Fig. 3 is a flowchart of another method for testing a stream computing application according to an embodiment of the present invention. Referring to fig. 3, at S104: after judging whether the current environment is the test environment according to the environment parameters, the method may further include:
and S105, when the environment parameter indicates that the current environment is the online operating environment, reading the test data from the specified read data source.
And S106, running the flow calculation application based on the test data read from the read data source, and outputting a running result obtained by running to an output data source.
Therefore, under a test scene, the test data is read from the test data packet corresponding to the read data source required by the running stream computing application, and the test result data is output in a log mode, a visual page mode and the like. And under the online running environment, the read data source required by the running stream computing application is used, namely the real data source corresponding to the service. Namely, in the test process, the test data packet is used for replacing a read data source so as to improve the test efficiency. In the actual operation process, the read data source is still used, namely, the replacement of the data source in the test process does not affect the operation process, and the business code of the stream computing application is not intrusive.
In addition, it can be understood that in the test process for the stream computing application, the read data source is replaced by the test data packet, and the test result data is displayed in a log mode, a standard output mode or a visual interface mode, so that the replacement of the read data source and the output data source is realized, data printing to the test data source is not needed during testing, data cleaning and other work are performed after testing, the test efficiency can be improved, and the test cost can be reduced.
In one implementation, the stream computing application may abstract, that is, the read data source and the output data source are respectively abstracted into interfaces. And further, the corresponding realization of the interface under different scenes can be compiled. Meanwhile, when a stream calculation processing flow is constructed, the code is not directly output to a Sink (output data source) in terms of implementation, but is output to an interface. Specifically, the interface implementation may include: the test data packet under the test environment is used as a read data source, and the result output is realized in a log mode; in the online operating environment, a Kafka (Kaffia) data source is used as an input reading data source, and an elastic search is used as an output data source.
Wherein, what kind of implementation of the interface selection can be selected according to the configuration or the parameters on the visual interface. Such as parameters entered via the configuration interface, etc.
This is accomplished by a set of identical codes: and reading data in the text in a test environment, and outputting test result data to a log, wherein a real data source (namely a data source corresponding to a specific service) is used in an online environment scene (namely an online running environment).
In an alternative embodiment, the configuration parameters and the test result data can be input and displayed in a visual interface mode. Fig. 4 is an interface diagram in a testing process by applying the testing method for the flow calculation application provided by the embodiment of the present invention, and a specific application of the testing method for the flow calculation application provided by the embodiment of the present invention is described with reference to fig. 4.
The electronic device may provide a configuration interface, such as an interface corresponding to the test parameters of the configuration unit in fig. 4, where the interface may include options corresponding to the test data, such as an option corresponding to the test data packet in fig. 4 and an option corresponding to kafka source (specified read data source), and a test file substitute drop read data source kafka source _1604026069229 with a name zsl _ student is to be used, and the user may select or input a parameter corresponding to the test data packet (such as a name zsl _ student of the corresponding test file) and a parameter corresponding to the specified read data source (such as data source identification kafka source _1604026069229), where the read data source and the corresponding test data packet may be multiple. Thus, when the "perform unit test" button is clicked, the electronic device obtains test data in a text form from zsl _ student, tests the streaming computing application based on the test data obtained from zsl _ student, and may display the obtained test result data in a visual interface, such as the unit test result shown in the unit test result box in fig. 4: kafkassink: 1, aa, 2.200000000000000000; 2, bb, 5.500000000000000000.
Because a stream computation may have a scenario with dual stream input, i.e., two input sources (read input sources), it may be necessary to label the test data as to which input source to belong when processing the input sources. For example, the name of the test file corresponding to the test data packet and the identification of the read data source are selected or input in the option corresponding to the test data packet and the option corresponding to the kafka source (specified read data source).
In addition, the embodiment of the invention can support a delay data test function and an out-of-order data test function. Specifically, a "delayed data test" or an "out-of-order data test" is selected from options corresponding to test types included in the configuration interface, wherein the selection can be realized by checking "√" in a manner.
In addition, the configuration interface may further include corresponding options such as "select job version to be tested", "single sending interval", "out-of-order trigger ratio", "select resource group", "available/total resources", and "select resources", so as to enrich testing functions. For example, the test may be performed by combining parameters input through the configuration interface to enrich the test function by inputting parameter "7" in the option corresponding to "selection of job version to be tested", "input parameter" 10 "in the option corresponding to" single transmission interval (ms) "," input parameter "1" in the option corresponding to "disorder trigger ratio (%)," input parameter "default resource group (CU)" in the option corresponding to "selection resource group", "input parameter" 10.000/14 "in the option corresponding to" available/total resources ", and" input parameter "2" in the option corresponding to "selection resources".
Corresponding to the method for testing a flow calculation application provided in the foregoing embodiment, an embodiment of the present invention provides a device for testing a flow calculation application, as shown in fig. 5, where the device may include:
a first obtaining module 501, configured to obtain configuration parameters, where the configuration parameters include test data packet parameters, and the test data packet parameter packet parameters are used to indicate a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when the stream computing application is run;
a second obtaining module 502, configured to obtain, according to the test data packet parameter, test data from the test data packet indicated by the test data packet parameter;
a first testing module 503, configured to test the streaming computing application based on the test data obtained from the test data packet;
the first output module 504 is configured to output test result data obtained by the test.
Optionally, the first output module 504 is specifically configured to output the test result data to a log; or printing the test result data in the standard output; or displaying the test result data on a visual interface.
Optionally, the configuration parameters further include an environment parameter, where the environment parameter is used to indicate whether the current environment is a test environment or an online operating environment;
as shown in fig. 6, the apparatus further comprises:
a judging module 505, configured to judge whether the current environment is the test environment according to the environment parameter before obtaining the test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter;
the second obtaining module 502 is specifically configured to, when the environment parameter indicates that the current environment is the test environment, obtain the test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
As shown in fig. 7, the apparatus further comprises:
a reading module 506, configured to read the test data from the specified read data source when the environment parameter indicates that the current environment is an online operating environment;
a second test module 507 for running a stream computation application based on the test data read from the read data source;
and a second output module 508, configured to output an operation result obtained by the operation to an output data source.
As shown in fig. 8, the apparatus further comprises:
a providing module 509, configured to provide a configuration parameter input interface before obtaining the configuration parameter;
the first obtaining module 501 is specifically configured to receive a configuration parameter input through a configuration parameter input interface.
An embodiment of the present invention further provides a test apparatus for a stream computing application, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the method steps of the test method for the flow computation application when executing the program stored in the memory 903.
The communication bus mentioned in the test equipment of the above stream computing application may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the test equipment and other equipment of the stream computing application.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also 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.
In a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, which, when being executed by a processor, carries out the method steps of the testing method of the above-mentioned stream computing application.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of the method of testing a stream computing application described above.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A method of testing a flow computing application, comprising:
acquiring configuration parameters, wherein the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when a stream computing application is run;
according to the test data packet parameters, obtaining test data from the test data packet indicated by the test data packet parameters;
and testing the streaming computing application based on the test data acquired from the test data packet, and outputting test result data obtained by the test.
2. The method of claim 1, wherein outputting test result data from the test comprises:
outputting the test result data to a log; alternatively, the first and second electrodes may be,
printing the test result data in a standard output; alternatively, the first and second electrodes may be,
and displaying the test result data on a visual interface.
3. The method of claim 1, wherein the configuration parameters further include an environment parameter indicating whether a current environment is a test environment or an online running environment;
before the obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter, the method further includes:
judging whether the current environment is a test environment or not according to the environment parameters;
the obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter includes:
and when the environment parameter indicates that the current environment is a test environment, acquiring test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
4. The method of claim 3, wherein after said determining whether the current environment is a test environment according to the environment parameter, the method further comprises:
when the environment parameter indicates that the current environment is an online operating environment, reading test data from the specified read data source;
and running the stream calculation application based on the test data read from the read data source, and outputting a running result obtained by the running to an output data source.
5. The method of any of claims 1 to 4, wherein prior to said obtaining configuration parameters, the method further comprises:
providing a configuration parameter input interface;
the obtaining of the configuration parameters includes:
receiving the configuration parameters input through the configuration parameter input interface.
6. A test apparatus for flow computing applications, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring configuration parameters, the configuration parameters comprise test data packet parameters, and the test data packet parameter packet parameters are used for indicating a test data packet corresponding to a specified read data source; the test data packet contains test data in text form; the specified read data source is a read data source required when a stream computing application is run;
the second obtaining module is used for obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter;
a first testing module for testing the streaming computing application based on the test data obtained from the test data packet;
and the first output module is used for outputting the test result data obtained by the test.
7. The apparatus according to claim 6, wherein the first output module is specifically configured to output the test result data to a log; or printing the test result data in a standard output; or displaying the test result data on a visual interface.
8. The apparatus of claim 6, wherein the configuration parameters further comprise an environment parameter, the environment parameter being used to indicate whether a current environment is a test environment or an online running environment;
the device further comprises:
a judging module, configured to judge whether a current environment is a test environment according to the environment parameter before obtaining test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter;
the second obtaining module is specifically configured to, when the environment parameter indicates that the current environment is a test environment, obtain test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter.
9. The apparatus of claim 8, further comprising:
the reading module is used for reading the test data from the specified read data source when the environment parameter indicates that the current environment is an online operating environment;
a second test module to run the stream computation application based on test data read from the read data source;
and the second output module is used for outputting the operation result obtained by operation to the output data source.
10. The apparatus of any one of claims 6 to 9, further comprising:
the providing module is used for providing a configuration parameter input interface before the configuration parameters are obtained;
the first obtaining module is specifically configured to receive the configuration parameter input through the configuration parameter input interface.
11. The test equipment for the flow calculation application is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
CN202110325528.6A 2021-03-26 2021-03-26 Method, device and equipment for testing flow calculation application Pending CN113010429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110325528.6A CN113010429A (en) 2021-03-26 2021-03-26 Method, device and equipment for testing flow calculation application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110325528.6A CN113010429A (en) 2021-03-26 2021-03-26 Method, device and equipment for testing flow calculation application

Publications (1)

Publication Number Publication Date
CN113010429A true CN113010429A (en) 2021-06-22

Family

ID=76407669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110325528.6A Pending CN113010429A (en) 2021-03-26 2021-03-26 Method, device and equipment for testing flow calculation application

Country Status (1)

Country Link
CN (1) CN113010429A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649119A (en) * 2016-12-28 2017-05-10 深圳市华傲数据技术有限公司 Stream computing engine testing method and device
CN109446075A (en) * 2018-09-30 2019-03-08 北京金山安全软件有限公司 Interface testing method and device
CN110059001A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 The automatic upgrade control method of program, device, computer equipment and storage medium
US10404787B1 (en) * 2015-04-06 2019-09-03 EMC IP Holding Company LLC Scalable distributed data streaming computations across multiple data processing clusters
CN110908641A (en) * 2019-11-27 2020-03-24 中国建设银行股份有限公司 Visualization-based stream computing platform, method, device and storage medium
CN112199300A (en) * 2020-11-13 2021-01-08 新华三大数据技术有限公司 Interface testing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10404787B1 (en) * 2015-04-06 2019-09-03 EMC IP Holding Company LLC Scalable distributed data streaming computations across multiple data processing clusters
CN106649119A (en) * 2016-12-28 2017-05-10 深圳市华傲数据技术有限公司 Stream computing engine testing method and device
CN109446075A (en) * 2018-09-30 2019-03-08 北京金山安全软件有限公司 Interface testing method and device
CN110059001A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 The automatic upgrade control method of program, device, computer equipment and storage medium
CN110908641A (en) * 2019-11-27 2020-03-24 中国建设银行股份有限公司 Visualization-based stream computing platform, method, device and storage medium
CN112199300A (en) * 2020-11-13 2021-01-08 新华三大数据技术有限公司 Interface testing method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MIIKA KOMU .ETAL: "Power consumption in remote gaming: An empirical evaluation", IEEE, 31 December 2016 (2016-12-31) *
张静瑜 等: "基于DCOM实现的紧缩场测试系统数据自动录取与生成", 自动化技术与应用, no. 04, 30 April 2015 (2015-04-30) *
腾讯技术工程: "Oceanus:基于Apache Flink的一站式实时计算平台", pages 2 - 8, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/5334287> *

Similar Documents

Publication Publication Date Title
CN110798380B (en) Data acquisition method, system, device, test equipment and test server
CN106294120B (en) Method, apparatus and computer program product for testing code
CN109446075B (en) Interface testing method and device
CN105099811A (en) Interface testing method and device
WO2018184361A1 (en) Application test method, server, terminal, and storage media
CN109815119B (en) APP link channel testing method and device
CN107562637B (en) Method, device, system and storage medium for software testing
CN108073506B (en) Test method and device
CN106550038B (en) Data configuration diagnosis system and method of digital control system
US10671580B2 (en) Data stream quality management for analytic environments
CN112199300B (en) Interface testing method and device, electronic equipment and storage medium
CN107784205B (en) User product auditing method, device, server and storage medium
CN109344066B (en) Method, system and terminal for testing browser page
CN111324526A (en) Interface test system, method and server
JP2017516202A (en) Promotion status data monitoring method, apparatus, device, and non-executable computer storage medium
CN104216820A (en) Browser performance testing method and device and server
CN112965711A (en) Job test method and apparatus, electronic device, and storage medium
CN113010429A (en) Method, device and equipment for testing flow calculation application
CN109376285B (en) Data sorting verification method based on json format, electronic device and medium
CN108829590B (en) Software testing method, device and system
CN109472012A (en) A kind of management method and device of electronization test report
CN112860562B (en) Automatic test method and device
CN111125605B (en) Page element acquisition method and device
CN106294104B (en) Test case execution method and mobile terminal
CN113806231A (en) Code coverage rate analysis method, device, equipment and medium

Legal Events

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