Discrete testing of all Operations, pipe assemblies, and
applications is a must. The
cascading.CascadingTestCase provides a number of
When testing custom Operations, use the
When testing Flows, use the
validateLength() methods. There are quite a few
of them, and collectively they offer great flexibility. All of them read
the sink tap, validate that it is the correct length and has the correct
Tuple size, and check to see whether the values match a given regular
As of Cascading 2, it is possible to write tests that are
independent of the underlying platform or mode. Any unit test should
cascading.PlatformTestCase and apply the
For example, the annotation
HadoopPlatform.class}) causes the PlatformTestCase to run all
the unit tests defined on the subclass with the
HadoopPlatform platform instances.
See the Cascading unit tests for examples.
To use any of these helper classes, make sure that
cascading-test-x.y.z.jar is in your testing class
Copyright © 2007-2012 Concurrent, Inc. All Rights Reserved.