Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ be found for Mac or Windows.
> vendor/bin/phpunit
```

For Showcase Conformance testing and client generation, see [tests/Conformance/README.md](tests/Conformance/README.md).

4. Run static analysis tools

```sh
Expand Down
46 changes: 46 additions & 0 deletions Gax/tests/Conformance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# GAX Showcase Conformance Testing

This directory contains the integration conformance test suite (`ShowcaseTest.php`) and generated client SDK for `gapic-showcase`.

## Prerequisites

- **Protobuf Compiler (`protoc`)**: Ensure `protoc` is installed and available in your `$PATH`.
- **Dev Dependencies**: Ensure dev dependencies are installed:
```sh
composer install -d dev/
```

## Generating the Showcase Client

To generate or update the Showcase client SDK, message classes, and metadata using the PHP CLI tool:

```sh
# From the repository root, run the console command:
./dev/google-cloud showcase:generate
```

Options:
- `-o, --out-dir <dir>`: Output directory relative to repository root (defaults to `Gax`).
- `-p, --showcase-path <dir>`: Path to local `gapic-showcase` repository (defaults to installed vendor dependency).
- `-g, --generator-path <dir>`: Path to local `gapic-generator-php` (defaults to installed vendor dependency).
- `-a, --googleapis-path <dir>`: Path to `googleapis` repository (defaults to submodule in `gapic-generator-php`).

## Running Conformance Tests

1. Install and launch the matching `gapic-showcase` mock server in the background:
```sh
# Option 1 (curl)
curl -L https://github.com/googleapis/gapic-showcase/releases/download/v0.41.1/gapic-showcase-0.41.1-linux-amd64.tar.gz | tar -zx
Comment thread
cy-yun marked this conversation as resolved.
./gapic-showcase run &

# Option 2 (go install)
go install github.com/googleapis/gapic-showcase/cmd/gapic-showcase@latest
gapic-showcase run &
```

2. Run the PHPUnit conformance test suite:
```sh
vendor/bin/phpunit -c Gax/phpunit-conformance.xml.dist
# or from the Gax directory:
cd Gax && vendor/bin/phpunit tests/Conformance/ShowcaseTest.php
```
Binary file modified Gax/tests/Conformance/metadata/V1Beta1/Compliance.php
Binary file not shown.
Binary file modified Gax/tests/Conformance/metadata/V1Beta1/Identity.php
Binary file not shown.
Binary file modified Gax/tests/Conformance/metadata/V1Beta1/Messaging.php
Binary file not shown.
Binary file modified Gax/tests/Conformance/metadata/V1Beta1/PBEcho.php
Binary file not shown.
13 changes: 2 additions & 11 deletions Gax/tests/Conformance/metadata/V1Beta1/RestError.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 2 additions & 66 deletions Gax/tests/Conformance/metadata/V1Beta1/Sequence.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Gax/tests/Conformance/metadata/V1Beta1/Testing.php
Binary file not shown.
22 changes: 6 additions & 16 deletions Gax/tests/Conformance/src/V1beta1/AttemptSequenceRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions Gax/tests/Conformance/src/V1beta1/BlockRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Gax/tests/Conformance/src/V1beta1/BlockResponse.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading