Hi Pablo, Beam Java has unit tests, ValidatesRunner tests, and Integration (E2E) test.
If I understand correctly, unit tests test the functionality of a component and usually don't require a runner (is this true?); ValidatesRunner tests (marked with @ValidatesRunner annotation) require runners; and integration tests (named *IT.java) test an entire e2e pipeline. Best, Robin On Tue, Aug 14, 2018 at 3:39 PM Pablo Estrada <[email protected]> wrote: > Ah this is very helpful. I think this is missing in the testing guide. > I'll make a short PR to mention it. > Best > -P. > > On Tue, Aug 14, 2018 at 3:37 PM Anton Kedin <[email protected]> wrote: > >> IT tests exist in java, similar to unit tests and not marked in a special >> way, except they're called *IT.java instead of *Test.java. They're run from >> corresponding tasks: >> - >> https://github.com/apache/beam/blob/d6c5bf977fc688f289f1bb06e30f25b05bf987b2/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubReadIT.java#L33 >> >> - >> https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/build.gradle#L85 >> >> On Tue, Aug 14, 2018 at 3:27 PM Pablo Estrada <[email protected]> wrote: >> >>> Hello, >>> In Python, we tag some test methods with @attr('ValidatesRunner') and >>> @attr('IT'), which marks them to be run as pipeline tests. >>> >>> If I understand correctly: >>> - ValidatesRunner tests are more like a component tests[1] as explained >>> in Beam docs >>> - IT tests are more like a E2E test[2] as explained in the docs. Is >>> there an equivalent in Java? >>> - Finally, there's ValidatesContainer tests. What are these for? What's >>> the guidance for tagging our tests this way? >>> >>> Thanks! >>> -P. >>> >>> [1] https://beam.apache.org/contribute/testing/#validatesrunner >>> [2] https://beam.apache.org/contribute/testing/#e2e >>> -- >>> Got feedback? go/pabloem-feedback >>> <https://goto.google.com/pabloem-feedback> >>> >> -- > Got feedback? go/pabloem-feedback > <https://goto.google.com/pabloem-feedback> >
