This project demonstrates how to use the Arazzo specification to generate end-to-end API tests with Deno.
The project consists of three main packages:
arazzo-test-gen
: Test generation engine that convertsarazzo.yaml
configurations into executable test casessdk
: Generated API client SDK for interacting with the robot-building APIserver
: Test server implementation for running the tests
- Deno runtime
- Node.js (for npm dependencies)
- Clone the repository
- Install dependencies:
deno install
# Run the test generator in watch mode
deno task dev
# Start the test server
deno task server
# Run the test suite
deno task test
The runtime expression parser is used to evaluate expressions in the test cases. We need to convert ANBF expressions into a parser that can be used in Deno. The Peggy parser generator uses Node modules that are not compatible with Deno. To work around this, we generate the parser using Node.js.
To generate the parser, run the following commands:
cd packages/arazzo-test-gen
npm install
npm run gen