How to Integrate E2E Testing
Use the scaffold command to greatly simplify integrating E2E testing!
Background
ScaffoldGetting Started
Create a declarative scaffold config at .stoobly/scaffold.yml. This file maps 1:1 to scaffold CLI commands and can be applied, shared, and version-controlled:
# .stoobly/scaffold.yml
version: 1
commands:
- resource: app
action: create
options:
app_name: <APP-NAME>
# For E2E testing, add plugin: [playwright] or plugin: [cypress]
plugin: [playwright]
- resource: service
action: create
options:
service_name: <SERVICE-NAME>
hostname: <SERVICE-HOSTNAME>
scheme: <SERVICE-SCHEME>
port: <SERVICE-PORT>Then validate and apply the config:
For the full scaffold apply walkthrough and config schema:
To learn about the individual commands scaffold apply runs under the hood:
app create
service create
Example
Using the JavaScript Client Library
The JavaScript client library simplifies E2E testing by allowing you to:
Intercept requests automatically from Playwright or Cypress without manual proxy configuration
Control recording and mocking directly in your test code
Manage scenarios programmatically (create, switch, and manage test scenarios)
Configure URL filtering to specify which requests to intercept
Quick Start:
Install the library:
Use the interceptor in your tests:
For complete documentation on using the JavaScript client library:
JS ClientCheck in .stoobly/scaffold.yml to version control so you can re-apply or update the scaffold later. To learn more:
Next Steps
Save the app scaffold in version control
Check in .stoobly/scaffold.yml, the app, and all of its services into your version control such as Git.
Run workflows in the following order
First, to run a workflow:
How to Run a WorkflowBefore running another workflow, it is recommended to stop the current workflow:
How to Stop a WorkflowLast updated
Was this helpful?