Skip to content

Commit 06de560

Browse files
authored
chore: Clarify testing guide in DEVELOPMENT.md (#3087)
Clarify testing guide in DEVELOPMENT.md for code changes in `parser` module.
1 parent 250b26c commit 06de560

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

DEVELOPMENT.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Based on where the code changes are, we should add different tests, in general
5151
5252
- If the changes are in `gax` or `api-common` only, you _must_ add traditional unit tests, you _may_ add showcase integration tests if you are modifying a public setting.
5353
- If the changes are in `gapic-generator-java` only, showcase integration tests are most likely not needed
54-
- If it is in the `composer` module, you _must_ add golden unit tests, you _may_ add traditional unit tests for better coverage and easier testing.
55-
- If it is in the `parser` module, you _may_ add traditional unit tests with a test proto. For example, [routing_rule_parser_testing](https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java/src/test/proto/routing_rule_parser_testing.proto) that is only used for testing [RoutingRuleParser](https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/RoutingRuleParser.java).
56-
- If it is in `other modules(ast, model, writer etc.)`, you _must_ add traditional unit tests, you _may_ add golden unit tests to easily see the changes.
54+
- If they are in the `composer` module, you _must_ add golden unit tests, you _may_ add traditional unit tests for better coverage and easier testing.
55+
- If they are in the `parser` module, you _should_ add traditional unit tests with a test proto if possible, you _may_ add golden unit tests to easily see the changes. For example, [routing_rule_parser_testing](https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java/src/test/proto/routing_rule_parser_testing.proto) that is only used for testing [RoutingRuleParser](https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/RoutingRuleParser.java).
56+
- If they are in `other modules(ast, model, writer etc.)`, you _must_ add traditional unit tests, you _may_ add golden unit tests to easily see the changes.
5757
- If the changes are in both `gax` and `gapic-generator-java`, you _must_ add all test layers, including traditional unit tests, golden unit tests and showcase integration tests.
5858
5959
### How to run tests?
@@ -63,4 +63,4 @@ See the [Unit Tests](https://github.com/googleapis/sdk-platform-java/blob/main/g
6363
See [Running the Integration Tests](https://github.com/googleapis/sdk-platform-java/blob/main/showcase/README.md#running-the-integration-tests) and [Update the Golden Showcase Files](https://github.com/googleapis/sdk-platform-java/blob/main/showcase/README.md#update-the-golden-showcase-files) sections in showcase/README.md for how to run and update showcase integration tests.
6464
6565
See the [Integration Tests](https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java/DEVELOPMENT.md#integration-tests) section in gapic-generator-java/DEVELOPMENT.md for how to run golden integration tests.
66-
66+

0 commit comments

Comments
 (0)