diff --git a/rules_java_gapic/java_gapic.bzl b/rules_java_gapic/java_gapic.bzl index d9ea0eb48a..3a4c494113 100644 --- a/rules_java_gapic/java_gapic.bzl +++ b/rules_java_gapic/java_gapic.bzl @@ -156,3 +156,17 @@ def java_gapic_library( deps = [":%s" % name] + actual_test_deps, **kwargs ) + +def java_gapic_test(name, runtime_deps, test_classes, **kwargs): + for test_class in test_classes: + native.java_test( + name = test_class, + test_class = test_class, + runtime_deps = runtime_deps, + **kwargs + ) + native.test_suite( + name = name, + tests = test_classes, + **kwargs + )