Dependencies for Testing
You need to add the following dependencies if you want to develop tests for a job built with the DataStream API:
Maven
Open the file in your project directory and add the following in the dependencies block.
Copied to clipboard!
Check out Project configuration for more details.
Gradle
Copied to clipboard!
Note: This assumes that you have created your project using our Gradle build script or quickstart script.
Check out for more details.
Among the various test utilities, this module provides , a lightweight configurable Flink cluster runnable in a JUnit test that can directly execute jobs.
For more information on how to use these utilities, check out the section on DataStream API testing
Table API Testing
If you want to test the Table API & SQL programs locally within your IDE, you can add the following dependency, in addition to the aforementioned flink-test-utils
:
Maven
Copied to clipboard!
Check out Project configuration for more details.
Gradle
Open the build.gradle
file in your project directory and add the following in the dependencies block.
Copied to clipboard!
Note: This assumes that you have created your project using our Gradle build script or quickstart script.
Check out for more details.