Package org.apache.beam.sdk.testing
@DefaultAnnotation(org.checkerframework.checker.nullness.qual.NonNull.class)
package org.apache.beam.sdk.testing
Defines utilities for unit testing Apache Beam pipelines. The tests for the
PTransforms
and examples included in the Apache Beam SDK provide examples of using these utilities.-
ClassDescriptionProperties for use in
Codertests.AnElementByteSizeObserverthat records the observed element sizes for testing purposes.Utilities for testingCombineFns.APipelineRunnerthat applies no overrides and throws an exception on calls toPipeline.run().Matcher to verify checksum of the contents of anShardedFilein E2E test.Category tag for tests that use aFlattenwhere the inputPCollectionListcontainsPCollectionsheterogeneouscoders.JsonMatcher<T>Matcher to compare a string or byte[] representing a JSON Object, independent of field order.Category tags for tests which validate that a Beam runner can handle keys up to a given size.Tests if a runner supports 100KB keys.Tests if a runner supports 100MB keys.Tests if a runner supports 10KB keys.Tests if a runner supports 10MB keys.Tests if a runner supports 1MB keys.Category tag for validation tests which utilizeTestPipelinefor execution and expect to be executed by aPipelineRunner.An assertion on the contents of aPCollectionincorporated into the pipeline.Default transform to check that a PAssert was successful.A transform that applies an assertion-checking function over iterables ofActualTto the entirety of the contents of its input.A transform that applies an assertion-checking function to the sole element of aPCollection.Builder interface for assertions applicable to iterables and PCollection contents.Check that the passed-in matchers match the existing data.PAssert.OneSideInputAssert<ActualT>An assertion checker that takes a singlePCollectionView<ActualT>and an assertion overActualT, and checks it within a Beam pipeline.Track the place where an assertion is defined.AnPAssert.IterableAssertabout the contents of aPCollection.An assert about the contents of eachPCollectionin the givenPCollectionList.Builder interface for assertions applicable to a single value.Hamcrest matcher to assert a string matches a pattern.AMatcherthat is alsoSerializable.Static class for building and usingSerializableMatcherinstances.Helper functions and test harnesses for checking correctness ofSourceimplementations.Expected outcome ofBoundedSource.BoundedReader.splitAtFraction(double).Deprecated.Output ofPAssert.A creator of test pipelines that can be used inside of tests that can be configured to run locally or against a remote pipeline runner.An exception thrown in case an abandonedPTransformis detected, that is, aPTransformthat has not been run.An exception thrown in case a test finishes without invokingPipeline.run().Implementation detail ofTestPipeline.newProvider(T), do not use.TestPipelineOptionsis a set of options for test pipelines.Matcher which will always pass.Factory forPipelineResultmatchers which always pass.TestStream<T>A testing input that generates an unboundedPCollectionof elements, advancing the watermark and processing time as elements are emitted.An incompleteTestStream.ATestStream.Eventthat produces elements.An event in aTestStream.The types ofTestStream.Eventthat are supported byTestStream.ATestStream.Eventthat advances the processing time clock.Coder forTestStream.ATestStream.Eventthat advances the watermark.Category tag for validation tests which utilizeMetrics.Category tag for validation tests which utilize splittableParDowith aDoFn.BoundedPerElementDoFn.Category tag for validation tests which utilizeBoundedTrie.Category tag for validation tests which useDoFn.BundleFinalizer.Category tag for validation tests which utilizeMetrics.Category tag for validation tests which utilizeCounter.Category tag for validation tests which utilize custom window merging.Category tag for validation tests which utilizeDistribution.Category tag for tests which relies on a pre-defined port, such as expansion service or transform service.Category tag for tests which validate that currect failure message is provided by failed pipeline.Category tag for validation tests which utilizeGauge.Category for tests that useImpulsetransformations.Category tag for tests which use the expansion service in Java.Category tag for validation tests which use key.Category tag for validation tests which utilize --tempRoot fromTestPipelineOptionsand and expect a default KMS key enable for the bucket specified.Category tag for validation tests which utilize looping timers inParDo.Category tag for validation tests which utilizeMapState.Category tag for validation tests which utilize the metrics pusher feature.Category tag for validation tests which utilizeMultimapState.Category tag for validation tests which utilizeDoFn.OnWindowExpiration.Category tag for validation tests which utilizeOrderedListState.Category tag for the ParDoLifecycleTest for exclusion (BEAM-3241).Category tag for validation tests which rely on a runner providing per-key ordering.Category tag for validation tests which rely on a runner providing per-key ordering in between transforms in the same ProcessBundleRequest.Category tag for validation tests which utilize timers inParDo.Category tag for tests which use the expansion service in Python.Category tag for validation tests which utilizeDoFn.RequiresTimeSortedInputin statefulParDo.Category tag for validation tests which utilize schemas.Category tag for tests which validate that the SDK harness executes in a well formed environment.Category tag for validation tests which utilizeSetState.Category tag for validation tests which use sideinputs.Category tag for validation tests which use multiple side inputs with different coders.Category tag for validation tests which utilize statefulParDo.Category for tests that enforce strict event-time ordering of fired timers, even in situations where multiple tests mutually set one another and watermark hops arbitrarily far to the future.Category tag for validation tests which utilizeStringSet.Category tag for tests that use System metrics.Category tag for tests that useTestStream, which is not a part of the Beam model but a special feature currently only implemented by the direct runner and the Flink Runner (streaming).Subcategory forUsesTestStreamtests which useTestStream# across multiple stages.Category tag for validation tests which use outputTimestamp.Subcategory forUsesTestStreamtests which use the processing time feature ofTestStream.Category tag for validation tests which use timerMap.Category tag for validation tests which utilize timers inParDo.Category tag for validation tests which use triggered sideinputs.Category tag for validation tests which utilize at least one unboundedPCollection.Category tag for validation tests which utilize splittableParDowith aDoFn.UnboundedPerElementDoFn.Category tag for tests which validate that a Beam runner is correctly implemented.A utility class for testingWindowFns.
UsesUnboundedPCollections.