How to Integrate E2E Testing
Use the scaffold command to greatly simplify integrating E2E testing!
Background
ScaffoldGetting Started
Create and run a bash script with the following contents:
stoobly-agent scaffold app create <APP-NAME>
stoobly-agent scaffold service create \
--hostname <SERVICE-HOSTNAME> \
--scheme <SERVICE-SCHEME> \
--port <SERVICE-PORT> \
--workflow mock \
--workflow record \
--workflow test \
<SERVICE-NAME>To learn about each individual command:
app create
service create
Example
stoobly-agent scaffold app create stoobly
stoobly-agent scaffold service create \
--hostname docs.stoobly.com \
--scheme https \
--port 443 \
--workflow mock \
--workflow record \
--workflow test \
docs.stoobly.comSaving the commands in a script will be useful for updating the scaffold in the future. To learn more:
How to Update a ScaffoldNext Steps
Save the app scaffold in version control
Check in 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 WorkflowRun record workflow
This allows you to check if all your scaffolded services run and can record requests.
Run mock workflow
This allows you to check if the previously recorded requests work are mocked. Your E2E tests or app should now be able to send requests to the mocked services.
Run test workflow
Finally, add a command to run the E2E tests to the entrypoint service as part of its custom docker compose file. Next, run the test workflow to check if tests pass locall. Once the test workflow passes, you can now use it in your CI pipelines.
Last updated
Was this helpful?