Stoobly Docs
  • Introduction
  • Use Cases
    • Generate Mock APIs
      • Empower Development
      • Scale API Testing
    • Enable E2E Testing
  • FAQ
    • Recording
    • Mocking
    • Terminology
  • Getting Started
    • Installing the Agent
      • Installation with pipx
      • Installation with Docker
  • Core Concepts
    • Agent
      • Intercept Modes
        • Mocking
        • Recording
      • Lifecycle Hooks
      • Proxy Settings
        • Data Rules
        • Firewall Rules
        • Rewrite Rules
        • Match Rules
    • Context
    • Mock API
      • Request
        • Response
        • Replay History
      • Scenarios
      • Snapshots
      • Fixtures
      • Public Folder
    • Scaffold
      • Service
      • Validation
      • Workflow
  • Guides
    • How to Run the Agent
      • Run with CLI
      • Run with Docker
    • How to Configure the Agent
      • Forward Proxy
        • Enable HTTPS Traffic
      • Reverse Proxy
    • How to Record Requests
      • Recording from the UI
      • Recording from the CLI
      • How to Create Contexts
      • How to Create Scenarios
        • Creating from the UI
        • Creating from the CLI
      • How to Create Requests
      • How to Customize Recordings
        • Customizing with Lifecycle Hooks
    • How to Update Requests
      • Editing from the UI
      • Editing with Snapshots
      • How to Update Scenarios
        • Updating from the UI
        • Updating from the CLI
      • Updating with Replay
        • Replaying from the UI
        • Replaying from the CLI
        • How to Customize Replays
          • Customizing with Lifecycle Hooks
      • Updating with Open API
    • How to Mock APIs
      • How to Enable Mocking
        • Enabling from the UI
        • Enabling from the CLI
      • How to Snapshot Requests
        • Deleting Snapshots
        • Sharing Snapshots
      • How to Use Fixtures
      • How to Customize Mocking
        • Customizing with Lifecycle Hooks
        • Customizing with Request Headers
      • Troubleshooting
    • How to Replay Requests
      • Replay with the UI
      • Replay with the CLI
    • How to Integrate E2E Testing
      • How to Scaffold an App
        • Scaffolding a Service
        • Customizing a Workflow
          • Customizing Container Services
          • Customizing Lifecycle Hooks
          • Customizing Init Scripts
          • Customizing Configure Scripts
          • Customizing Makefile
        • Troubleshooting
      • How to Run a Workflow
        • Running with CLI command
        • Running with Make
        • Troubleshooting
          • Validating
      • How to Stop a Workflow
        • Stopping with CLI command
        • Stopping with Make
      • How to Update a Scaffold
        • Deleting a Service
      • FAQ
  • Developer Guide
    • Installation from Source
    • Submitting Change Requests
    • Releases
  • Experimental
    • Experimental Features
      • Aliases
      • Endpoints
      • API Testing
        • Getting Started
        • Configuration
          • Assign
          • Lifecycle Hooks
          • Trace
      • Optional Components
Powered by GitBook
On this page
  • Background
  • Getting Started
  • Example
  • Next Steps
  • Save the app scaffold in version control
  • Run workflows in the following order

Was this helpful?

  1. Guides

How to Integrate E2E Testing

PreviousReplay with the CLINextHow to Scaffold an App

Last updated 23 days ago

Was this helpful?

Use the scaffold command to greatly simplify integrating E2E testing!

Background

Getting 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.com

Saving the commands in a script will be useful for updating the scaffold in the future. To learn more:

Next 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:

Before running another workflow, it is recommended to stop the current workflow:

1

Run record workflow

This allows you to check if all your scaffolded services run and can record requests.

2

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.

3

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.

Scaffold
How to Scaffold an App
Scaffolding a Service
How to Update a Scaffold
How to Run a Workflow
How to Stop a Workflow