A method, device and equipment for testing stream computing applications

By obtaining configuration parameters, directly obtaining test data in text form from the test data packet, and performing test and output results of stream computing applications, the problem of low testing efficiency of stream computing applications in the existing technology is solved, and efficient testing process and cost reduction is achieved. .

CN113010429BActive Publication Date: 2024-11-12BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110325528.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2024-11-12
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

Existing stream computing application testing methods rely on complex distributed storage systems, resulting in inefficient testing.

Method used

By obtaining configuration parameters, including test packet parameters, we can directly obtain test data in text form from the test packet, and test and output test results of the streaming calculation application based on this data, avoiding complex interactions with distributed storage systems.

Benefits of technology

It improves the testing efficiency of stream computing applications, simplifies the testing process, reduces the testing cost, and tests the calculation logic of stream computing applications separately, avoiding the instability impact of upstream and downstream data sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113010429B_ABST
    Figure CN113010429B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device and equipment for testing a stream computing application, which is applied to the field of big data technology, wherein the method can obtain configuration parameters, the configuration parameters include test data packet parameters, the test data packet parameter packet parameters are used to indicate 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 the read data source required when running the stream computing application; according to the test data packet parameters, test data is obtained from the test data packet indicated by the test data packet parameters; the stream computing application is tested based on the test data obtained from the test data packet, and the test result data obtained by the test is output. The method, device and equipment for testing a stream computing application provided by the embodiment of the present invention can improve the test efficiency for testing stream computing applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a testing method, device and equipment for stream computing applications. Background Art

[0002] Stream computing belongs to the category of big data processing (computing) technology. Unlike storage, it is not responsible for storing data. Stream computing applications can be understood as applications that use stream computing. Specifically, stream computing applications read data from a read data source, process the data, and then output the processed data to an output data source. As a result, when running or testing the stream computing application as a whole, it will rely on the read data source and the output data source.

[0003] Stream computing is usually implemented based on distributed technology. In the existing method, during the testing of stream computing applications, both the reading data source and the output data source are implemented through a distributed storage system. Specifically, the test data is prepared and stored in the reading data source implemented by the distributed storage system. After the stream computing application is tested based on the test data, the 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 to read the test data and output the processed data, and the interaction with the distributed storage system is generally more complicated, which makes the testing efficiency of the stream computing application low. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device and equipment for testing stream computing applications to improve the testing efficiency of stream computing applications. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for testing a stream computing application, including:

[0006] Acquire configuration parameters, wherein the configuration parameters include test data packet parameters, wherein the test data packet parameters are used to indicate a test data packet corresponding to a specified read data source; the test data packet includes test data in text form; and the specified read data source is a read data source required when running a stream computing application;

[0007] According to the test data packet parameter, acquiring test data from the test data packet indicated by the test data packet parameter;

[0008] The stream computing application is tested based on the test data obtained from the test data packet, and test result data obtained by the test is output.

[0009] Optionally, the test result data obtained by the output test includes:

[0010] Output the test result data to a log; or,

[0011] printing said test result data on standard output; or,

[0012] The test result data is displayed on a visual interface.

[0013] Optionally, the configuration parameters also include environment parameters, and the environment parameters are used to indicate whether the current environment is a test environment or an online operation environment;

[0014] Before acquiring 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:

[0015] Determine whether the current environment is a test environment according to the environmental parameters;

[0016] The acquiring test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter comprises:

[0017] When the environment parameter indicates that the current environment is a test environment, test data is acquired from the test data packet indicated by the test data packet parameter according to the test data packet parameter.

[0018] Optionally, after determining whether the current environment is a test environment according to the environmental parameters, the method further includes:

[0019] When the environment parameter indicates that the current environment is an online operation environment, reading the test data from the specified reading data source;

[0020] The stream computing application is run based on the test data read from the read data source, and the running result obtained by the running is output to the output data source.

[0021] Optionally, before obtaining the configuration parameters, the method further includes:

[0022] Provide configuration parameter input interface;

[0023] The obtaining of configuration parameters includes:

[0024] The configuration parameters input through the configuration parameter input interface are received.

[0025] In a second aspect, an embodiment of the present invention provides a testing device for a stream computing application, including:

[0026] A first acquisition module is used to acquire configuration parameters, wherein 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 includes test data in text form; and the specified read data source is a read data source required when running a stream computing application;

[0027] A second acquisition module, configured to acquire test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter;

[0028] A first testing module, configured to test the stream computing application based on the test data obtained from the test data packet;

[0029] The first output module is used to output the test result data obtained by the test.

[0030] Optionally, the first output module is specifically used to output the test result data to a log; or, to print the test result data in a standard output; or, to display the test result data in a visual interface.

[0031] Optionally, the configuration parameters also include environment parameters, and the environment parameters are used to indicate whether the current environment is a test environment or an online operation environment;

[0032] The device also includes:

[0033] A judging module, configured to judge whether the current environment is a test environment according to the environment parameters before obtaining the test data from the test data packet indicated by the test data packet parameters according to the test data packet parameters;

[0034] The second acquisition module is specifically configured to acquire test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter when the environment parameter indicates that the current environment is a test environment.

[0035] Optionally, the device further comprises:

[0036] A reading module, configured to read test data from the specified reading data source when the environment parameter indicates that the current environment is an online operation environment;

[0037] A second testing module, configured to run the stream computing application based on the test data read from the read data source;

[0038] The second output module is used to output the operation result obtained by the operation to the output data source.

[0039] Optionally, the device further comprises:

[0040] Providing a module, used for providing a configuration parameter input interface before obtaining the configuration parameters;

[0041] The first acquisition module is specifically configured to receive the configuration parameters input through the configuration parameter input interface.

[0042] 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, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0043] Memory, used to store computer programs;

[0044] The processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.

[0045] Beneficial effects of the embodiments of the present invention:

[0046] The test method, device and equipment for stream computing applications provided by the embodiments of the present invention can obtain configuration parameters, wherein the configuration parameters include test data packet parameters, the test data packet parameter packet parameters are used to indicate 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 the read data source required when running the stream computing application; according to the test data packet parameters, test data is obtained from the test data packet indicated by the test data packet parameters; the stream computing application is tested based on the test data obtained from the test data packet, and the test result data obtained by the test is output. Test data in text form can be obtained from the test data packet according to the configuration parameters, the stream computing application is tested based on the test data obtained from the test data packet, and the test result data obtained by the test is output, without the need for complex interaction with the distributed storage system, so that the test efficiency for the stream computing application can be improved.

[0047] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A flow chart of a method for testing a stream computing application provided by an embodiment of the present invention;

[0050] Figure 2 Another flow chart of a method for testing a stream computing application provided by an embodiment of the present invention;

[0051] Figure 3 Another flow chart of a method for testing a stream computing application provided by an embodiment of the present invention;

[0052] Figure 4 An interface diagram of a test process using a test method for a stream computing application provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of a structure of a testing device for a stream computing application provided by an embodiment of the present invention;

[0054] Figure 6 Another structural schematic diagram of a testing device for a stream computing application provided by an embodiment of the present invention;

[0055] Figure 7 A schematic diagram of another structure of a testing device for a stream computing application provided by an embodiment of the present invention;

[0056] Figure 8 A schematic diagram of another structure of the testing device for the stream computing application provided by the embodiment of the present invention;

[0057] Fig. 9 A schematic diagram of the structure of a test device for a stream computing application provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] An embodiment of the present invention provides a method for testing a stream computing application, which may include:

[0060] Get configuration parameters, including test data packet parameters, which are used to indicate 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 the read data source required when running the stream computing application;

[0061] According to the test data packet parameters, obtaining test data from the test data packet indicated by the test data packet parameters;

[0062] The stream computing application is tested based on the test data obtained from the test data packet, and the test result data obtained by the test is output.

[0063] In an embodiment of the present invention, test data in text form can be obtained from a test data packet according to configuration parameters, a stream computing application can be tested based on the test data obtained from the test data packet, and test result data obtained from the test can be output without complex interaction with a distributed storage system. In this way, the test efficiency of the stream computing application can be improved.

[0064] The test method of the stream computing application provided by the embodiment of the present invention can be applied to electronic devices, and the electronic devices can be installed with a stream computing engine capable of testing and / or running the stream computing application. Specifically, the electronic device can be a terminal, a server, and the like.

[0065] Figure 1 A flow chart of a method for testing a stream computing application provided by an embodiment of the present invention. Figure 1 The test method of the stream computing application provided by the embodiment of the present invention may include:

[0066] S101, obtaining configuration parameters.

[0067] The configuration parameters include test data packet parameters, which are used to indicate 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 the read data source required when running the stream computing application.

[0068] The read data source required when running a stream computing application can be understood as the input source introduced in the code that implements the stream computing application. The read data source can be understood as the real data source corresponding to the business. It can also be understood that there is a corresponding relationship between the read data source and the operation of the stream computing application, that is, a "fixed binding" relationship.

[0069] Before running the stream computing application, the stream computing application can be tested. In the embodiment of the present invention, a test data packet containing text-based test data is used to replace the data source required for running the stream computing application, so as to test the stream computing application before running the stream computing application.

[0070] In one possible implementation, before S101: obtaining configuration parameters, the following steps may also be included:

[0071] Provides a configuration interface.

[0072] The configuration interface contains configuration parameter options.

[0073] The configuration interface may be a visual interface.

[0074] For example, the configuration interface may include options corresponding to test data packet parameters, and the user may select or input test data packet parameters in the options, such as the name of the test data packet, and so on.

[0075] S101, obtaining configuration parameters may include:

[0076] Accepts configuration parameters entered via the Configuration Parameters option.

[0077] In this way, the test data packet parameters can be obtained through the configuration interface.

[0078] S102: According to the test data packet parameters, obtain test data from the test data packet indicated by the test data packet parameters.

[0079] The test data packet parameters may include a test data packet identifier, such as a test data packet name, etc.

[0080] The corresponding test data packet can be determined according to the test data packet parameters, so that the test data in text form can be obtained from the test data packet.

[0081] The test data packet may be a test file pre-uploaded to the local electronic device, and the test file includes multiple lines of test data.

[0082] S103: Test the stream computing application based on the test data obtained from the test data packet, and output test result data obtained by the test.

[0083] Specifically, the test can be understood as executing test data through the stream computing application, and verifying whether the stream computing application can achieve the expected function through the obtained test result data.

[0084] Among them, outputting 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 a standard output; or, displaying the test result data in a visual interface.

[0085] Test data in text form can be obtained from the test data packet according to the configuration parameters, and the stream computing application can be tested based on the test data obtained from the test data packet. There is no need to output the test result data to the output data source implemented by the distributed storage system. The test result data obtained by the output test does not require complex interaction with the distributed storage system. In this way, the testing efficiency of the stream computing application can be improved.

[0086] At the same time, compared with the existing data sources that rely on complex distributed systems, in the process of testing stream computing applications, the upstream and downstream data sources (reading data sources and output data sources) will actually be tested together. The instability of the upstream and downstream data sources will affect the test results of the stream computing, which will increase the test cost. Testing the instability of the upstream and downstream data sources will indirectly cause the problem of low test efficiency. And it will intuitively make the testers feel that they are testing the stability of the upstream and downstream data sources instead of the stream computing application (the stream computing application is equal to the calculation logic in the middle of the stream computing). In the embodiment of the present invention, the test data in text form is obtained from the test data packet, which can be understood as a relatively simple data source (the stability of the data source of the distributed system type in the test environment is usually not as good as the simple data source of the text type). Testing the stream computing application based on the test data obtained from the test data packet can be understood as a separate test of the calculation logic in the middle of the stream computing application.

[0087] In one possible implementation, the configuration parameters also include environment parameters.

[0088] The environment parameter is used to indicate whether the current environment is a test environment or an online operation environment.

[0089] Figure 2 Another flow chart of a method for testing a stream computing application provided by an embodiment of the present invention. Figure 2 In the test method for stream computing applications provided by the embodiment of the present invention, before S102: obtaining test data from a test data packet indicated by the test data packet parameter according to the test data packet parameter, the method may further include:

[0090] S104: Determine whether the current environment is a test environment according to the environment parameters.

[0091] In one possible implementation, the configuration interface may further include options corresponding to the environment parameters, such as a "perform unit test" button or a "run" button.

[0092] When it is detected that the "Perform Unit Test" button is clicked, it means that the current environment is a test environment; when it is detected that the "Run" button is clicked, it means that the current environment is a running environment.

[0093] S102 may include:

[0094] S1021, when the environment parameter indicates that the current environment is a test environment, obtaining test data from a test data packet indicated by the test data packet parameter according to the test data packet parameter.

[0095] That is, a data source in text form is used to directly read the data in text form in the test data packet as test data.

[0096] At the same time, the obtained test result data can be displayed in the form of log data, or displayed in the form of a visual interface, or printed in the standard output.

[0097] Figure 3 Another flow chart of a method for testing a stream computing application provided by an embodiment of the present invention. Figure 3 After S104: determining whether the current environment is a test environment according to the environment parameters, the following steps may also be included:

[0098] S105: When the environment parameter indicates that the current environment is an online operation environment, test data is read from a specified reading data source.

[0099] S106: Run the stream computing application based on the test data read from the read data source, and output the running result obtained by the running to the output data source.

[0100] In this way, in the test scenario, test data can be read from the test data package corresponding to the read data source required to run the stream computing application, and the test result data can be output through logs, visualization pages, etc. In the online operation environment, the read data source required to run the stream computing application is used, that is, the real data source corresponding to the business. That is, during the test process, the test data package is used instead of the read data source to improve the test efficiency. In the actual operation process, the read data source is still used, that is, the replacement of the data source during the test process does not affect the operation process, and there is no intrusion to the business code of the stream computing application.

[0101] It can be understood that, in the test process for stream computing applications, the embodiments of the present invention replace the reading of data sources with test data packets, print the test result data in logs and standard outputs, or display the test result data in a visual interface, thereby realizing the replacement of the reading data source and the output data source, so that there is no need to print data to the test data source during testing, and to perform data cleaning after testing, etc., which can improve testing efficiency and reduce testing costs.

[0102] In one possible implementation, the stream computing application can be abstracted, that is, the reading data source and the output data source are abstracted into interfaces respectively. Then, the implementation corresponding to the interface in different scenarios can be written. At the same time, when building the stream computing processing flow, the code implementation is no longer directly output to a certain Sink (output data source), but to a certain interface. The specific interface implementation may include: in the test environment, the test data packet is used as the reading data source, and the result output is realized in the log mode; in the online operation environment, the Kafka data source is used as the input reading data source, and Elasticsearch is used as the output data source.

[0103] The specific interface implementation can be selected based on the configuration or parameters passed on the visual interface, such as the parameters input in the configuration interface.

[0104] This is achieved through the same set of code: in the test environment, the data in the text is read and the test result data is output to the log, while in the online environment scenario (i.e. the online running environment), the real data source (i.e. the data source corresponding to the specific business) is used.

[0105] In an optional embodiment, configuration parameters may be input and test result data may be displayed through a visual interface. Figure 4 This is an interface diagram of the test process of the stream computing application test method provided by the embodiment of the present invention, refer to Figure 4 , the specific application of the testing method for the stream computing application provided by the embodiment of the present invention is described.

[0106] Electronic devices can provide configuration interfaces, such as Figure 4 The interface corresponding to the configuration unit test parameters in the configuration unit test parameters can contain options corresponding to the test data, such as Figure 4 In the options corresponding to the test data packet and the options corresponding to kafka source (specified reading data source), the test file named zsl_student will be used to replace the reading data source kafkasource_1604026069229. Users can select or enter the parameters corresponding to the test data packet (such as the name of the corresponding test file zsl_student) and the parameters corresponding to the specified reading data source (such as the data source identifier kafkasource_1604026069229) in this option, where the reading data source and the corresponding test data packet can be multiple. In this way, when the "Perform Unit Test" button is clicked, the electronic device obtains the test data in text form from zsl_student, and tests the stream computing application based on the test data obtained from zsl_student, and can display the obtained test result data in the form of a visual interface, such as Figure 4 The unit test results are displayed in the Unit Test Result box: kafkaSink: 1,aa,2.200000000000000000; 2,bb,5.5000000000000000000.

[0107] Because stream computing may have dual-stream input scenarios, that is, there are two input sources (read input sources), when processing input sources, it is necessary to mark which input source the test data belongs to. For example, in the options corresponding to the test data package and the options corresponding to the kafka source (specified read data source), select or enter the name of the test file corresponding to the test data package and the identifier of the read data source.

[0108] In addition, in the embodiment of the present invention, a delayed data test function and a disordered data test function can be supported. Specifically, in the options corresponding to the test type included in the configuration interface, "delayed data test" or "disordered data test" can be selected, wherein the selection can be achieved by checking "√".

[0109] In addition, the configuration interface may also include corresponding options such as "Select the version of the job to be tested", "Single sending interval", "Out of order trigger ratio", "Select resource group", "Available / all resources" and "Select resources" to enrich the test functions. For example, in the option corresponding to "Select the version of the job to be tested", enter the parameter "7", in the option corresponding to "Single sending interval (ms)", enter the parameter "10", in the option corresponding to "Out of order trigger ratio (%)", enter the parameter "1", in the option corresponding to "Select resource group", enter the parameter "Default resource grouping (CU)", in the option corresponding to "Available / all resources", enter the parameter "10.000 / 14", and in the option corresponding to "Select resources", enter the parameter "2". The parameters entered through the configuration interface can be combined for testing to enrich the test functions.

[0110] Corresponding to the test method of the stream computing application provided in the above embodiment, the embodiment of the present invention provides a test device for the stream computing application, such as Figure 5 As shown, it may include:

[0111] The first acquisition module 501 is used to acquire configuration parameters, which include test data packet parameters. The test data packet parameters are used to indicate the test data packet corresponding to the specified read data source; the test data packet includes test data in text form; the specified read data source is the read data source required when running the stream computing application;

[0112] A second acquisition module 502, configured to acquire test data from a test data packet indicated by the test data packet parameter according to the test data packet parameter;

[0113] A first testing module 503, configured to test the stream computing application based on the test data obtained from the test data packet;

[0114] The first output module 504 is used to output the test result data obtained by the test.

[0115] Optionally, the first output module 504 is specifically used to output the test result data to a log; or, to print the test result data in a standard output; or, to display the test result data in a visual interface.

[0116] Optionally, the configuration parameters also include environment parameters, which are used to indicate whether the current environment is a test environment or an online operation environment;

[0117] like Figure 6 As shown, the device also includes:

[0118] The judging module 505 is used to judge whether the current environment is a test environment according to the environment parameters before obtaining the test data from the test data packet indicated by the test data packet parameters according to the test data packet parameters;

[0119] The second acquisition module 502 is specifically configured to acquire test data from a test data packet indicated by the test data packet parameter according to the test data packet parameter when the environment parameter indicates that the current environment is a test environment.

[0120] like Figure 7 As shown, the device also includes:

[0121] The reading module 506 is used to read the test data from the specified reading data source when the environment parameter indicates that the current environment is an online operation environment;

[0122] A second test module 507, configured to run a stream computing application based on test data read from a read data source;

[0123] The second output module 508 is used to output the operation result obtained by the operation to the output data source.

[0124] like Figure 8 As shown, the device also includes:

[0125] A module 509 is provided, which is used to provide a configuration parameter input interface before obtaining the configuration parameters;

[0126] The first acquisition module 501 is specifically configured to receive configuration parameters input through a configuration parameter input interface.

[0127] The embodiment of the present invention also provides a test device for stream computing applications, such as Fig. 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0128] Memory 903, used for storing computer programs;

[0129] The processor 901 is used to implement the method steps of the above-mentioned test method for stream computing application when executing the program stored in the memory 903.

[0130] The communication bus mentioned in the test equipment of the above stream computing application can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0131] The communication interface is used for communication between the test device of the above stream computing application and other devices.

[0132] 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 storage device located away from the aforementioned processor.

[0133] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0134] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the method steps of the testing method of the above stream computing application are implemented.

[0135] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute the method steps of the above-mentioned method for testing stream computing applications.

[0136] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0137] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0138] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for testing a stream computing application, characterized in that: Used in electronic equipment, including: Acquire configuration parameters, wherein the configuration parameters include test data packet parameters, wherein the test data packet parameters are used to indicate a test data packet corresponding to a specified read data source; the test data packet is a test file pre-uploaded to the local electronic device, the test data packet parameters include a test data packet identifier, and the test data packet contains test data in text form; the specified read data source is a read data source required when running a stream computing application; According to the test data packet parameter, acquiring test data from the test data packet indicated by the test data packet parameter; Testing the stream computing application based on the test data obtained from the test data packet, and outputting the test result data obtained by the test; The configuration parameters also include environment parameters, which are used to indicate whether the current environment is a test environment or an online operation environment; Before acquiring 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: Determine whether the current environment is a test environment according to the environmental parameters; The acquiring test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter comprises: 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; After determining whether the current environment is a test environment according to the environmental parameters, the method further includes: When the environment parameter indicates that the current environment is an online operation environment, reading the test data from the specified reading data source; The stream computing application is run based on the test data read from the read data source, and the running result obtained by the running is output to the output data source.

2. The method according to claim 1, characterized in that: The test result data obtained by the output test includes: Output the test result data to a log; or, printing said test result data on standard output; or, The test result data is displayed on a visual interface.

3. The method according to claim 1 or 2, characterized in that: Before obtaining the configuration parameters, the method further includes: Provide configuration parameter input interface; The obtaining of configuration parameters includes: The configuration parameters input through the configuration parameter input interface are received.

4. A testing device for a stream computing application, characterized in that: Used in electronic equipment, including: A first acquisition module is used to acquire configuration parameters, wherein the configuration parameters include test data packet parameters, and the test data packet parameters are used to indicate a test data packet corresponding to a specified read data source; the test data packet is a test file pre-uploaded to the local electronic device, and the test data packet parameters include a test data packet identifier, and the test data packet contains test data in text form; the specified read data source is a read data source required when running a stream computing application; A second acquisition module, configured to acquire 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, configured to test the stream computing application based on the test data obtained from the test data packet; A first output module, used to output test result data obtained by the test; The configuration parameters also include environment parameters, which are used to indicate whether the current environment is a test environment or an online operation environment; The device also includes: A judging module, configured to judge whether the current environment is a test environment according to the environment parameters before obtaining the test data from the test data packet indicated by the test data packet parameters according to the test data packet parameters; The second acquisition module is specifically configured to acquire test data from the test data packet indicated by the test data packet parameter according to the test data packet parameter when the environment parameter indicates that the current environment is a test environment; A reading module, configured to read test data from the specified reading data source when the environment parameter indicates that the current environment is an online operation environment; A second testing module, configured to run the stream computing application based on the test data read from the read data source; The second output module is used to output the operation result obtained by the operation to the output data source.

5. The device according to claim 4, characterized in that The first output module is specifically used to output the test result data to a log; or, to print the test result data in a standard output; or, to display the test result data in a visual interface.

6. The device according to claim 4 or 5, characterized in that The device also includes: Providing a module, used for providing a configuration parameter input interface before obtaining the configuration parameters; The first acquisition module is specifically configured to receive the configuration parameters input through the configuration parameter input interface.

7. A test device for stream computing applications, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 3 when executing a program stored in a memory.