Project Structure
Understand the organization of a Plyson project and its file conventions.
Top-level folders and files are used to organize your test suites, environments, and custom logic.
Top-level folders
environmentsRequired. Contains environment-specific configurations (*.env.json) like base URLs and variables.
suitesRequired. Where your declarative API test suites live (*.test.json) and where the generated Playwright entrypoints (plyson.spec.ts, plyson.setup.ts, plyson.teardown.ts) are stored.
schemasOptional. Stores JSON schemas (*.schema.json) for request auto-filling and response validation.
scriptsOptional. Reusable test case fragments (*.script.json) that can be shared across suites.
handlersOptional. TypeScript "escape hatches" (*.handler.ts) for custom logic after a request.
actionsOptional. TypeScript "actions" (*.action.ts) for custom logic as standalone test steps.
Top-level files
Top-level files are used to configure your project, manage global variables, and define Playwright settings.
project.jsonRequired. The root configuration for metadata, versioning, and global hooks.
variables.jsonOptional. Global defaults for your test project.
playwright.config.tsRequired. Playwright configuration file that handles reporting and worker settings.
The generated starter project also includes a small Playwright harness that bootstraps your suites and runs global setup/teardown hooks from your project configuration.
Next Steps
Now that you understand the layout, let's dive into writing your first test.