Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hypermedia-app/hypertest-docker
Docker images for running tests against Hypermedia APIs
https://github.com/hypermedia-app/hypertest-docker
Last synced: 5 days ago
JSON representation
Docker images for running tests against Hypermedia APIs
- Host: GitHub
- URL: https://github.com/hypermedia-app/hypertest-docker
- Owner: hypermedia-app
- License: mit
- Created: 2019-12-01T18:59:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-11T17:34:32.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T14:46:06.303Z (over 1 year ago)
- Language: TypeScript
- Size: 1020 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hydrofoil-docker
Docker images for running tests against Hypermedia APIs
## `hydrofoil/hydra-analyser`
Wraps [hydra-validator-analyse](https://www.npmjs.com/package/hydra-validator-analyse) which runs static analysis
against [hydra-powered](http://www.hydra-cg.com) APIs.### Usage
This docker can be simply used directly by passing the APIs entrypoint URL:
```bash
docker run -it --rm --network host hydrofoil/hydra-analyser http://localhost:12345/
```The entrypoint URL can also be passed in as an environment variable, for example in a `docker-compose.yml` file
```yml
version: "3"services:
analyzer:
image: "hydrofoil/hydra-analyser"
network_mode: "host"
environment:
ENTRYPOINT_URL: "http://localhost:12345/"
```Note the use of `--network host` and `network_mode: "host"` in both examples to have the container access an app running
locally. Naturally, that won't be needed if analysing a remote, publicly available service.## `hydrofoil/hypertest`
Compiles and runs [hypertest][hypertest] test scenarios.
### Usage
The easiest way is to use docker-compose to mount a directory containing the test scenarios
as `/tests` in the container.```yml
version: "3"services:
e2e-tests:
image: "hydrofoil/hypertest"
network_mode: "host"
environment:
BASE_URI: "http://localhost:12345/"
volumes:
- ./tests:/tests
```The base URI can also be changed from the run command
```bash
docker-compose run e2e-tests --baseUri http://dev-env.my.app/
```#### Filtering tests to run
Tests can be filtered by a regular expression which is matched against the relative path to test files within
the `tests` directory.
For example, running from the above `docker-compose.yml`:```bash
docker-compose run e2e-tests --grep ^ProductsCollectionEndpoint/PostRequest_
```#### Compile scenarios in-place
By default the tests will be compiled in a temporary path. An optional flag
can be set to have the test JSON files generated adjacent to the input files.```
docker-compose run e2e-tests --compileInPlace
```[hypertest]: https://testing.hypermedia.app/dsl/