Test Dependencies
This documentation is for an unreleased version of Apache Flink. We recommend you use the latest stable version.

テストの依存関係 #

Flinkは、依存関係として追加できるジョブをテストするためのユーティリティを提供します。

DataStream APIのテスト #

DataStream APIを使ってビルドされたジョブの照すtおを開発する場合は、次の依存関係を追加する必要があります:

Open the pom.xml file in your project directory and add the following in the dependencies block.
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-test-utils</artifactId>
    <version>1.19-SNAPSHOT</version>
    <scope>test</scope>
</dependency>
Check out Project configuration for more details.
Open the build.gradle file in your project directory and add the following in the dependencies block.
testCompile "org.apache.flink:flink-test-utils:1.19-SNAPSHOT"
Note: This assumes that you have created your project using our Gradle build script or quickstart script.
Check out Project configuration for more details.

様々なテストユーティリティの中で、このモジュールは、ジョブを直接実行できるJUnitテストで実行可能な軽量の設定可能なFlinkクラスタであるMiniClusterを提供します。

これらのユーティリティの使用方法の詳細については、DataStream APIのテストをご覧ください

Table APIのテスト #

Table API & SQL プログラムをIDE内でローカルにテストする場合は、前述のflink-test-utilsに加えて、以下の依存関係を追加できます:

Open the pom.xml file in your project directory and add the following in the dependencies block.
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-test-utils</artifactId>
    <version>1.19-SNAPSHOT</version>
    <scope>test</scope>
</dependency>
Check out Project configuration for more details.
Open the build.gradle file in your project directory and add the following in the dependencies block.
testCompile "org.apache.flink:flink-table-test-utils:1.19-SNAPSHOT"
Note: This assumes that you have created your project using our Gradle build script or quickstart script.
Check out Project configuration for more details.

これにより、クエリの計画と実行にそれぞれ必要なクエリプランナとランタイムが自動的に取り込まれます:

モジュールflink-table-test-utilsはFlink 1.15で導入され、実験的なものと見なされます。
inserted by FC2 system