Local
Stoobly Scaffold Local Runtime E2E Testing - Questions & Answers
This document covers local runtime-specific E2E testing customization options for Stoobly scaffold. For general E2E testing topics, see README.md. For Docker runtime E2E testing, see docker.md.
Local Initial Setup
Q: How do I scaffold an app for Playwright E2E testing with local runtime?
A: Create an app with the --plugin playwright option and --runtime local to set up Playwright-specific configurations.
Example:
# Create app with Playwright
stoobly-agent scaffold app create my-e2e-tests \
--plugin playwright \
--runtime localQ: How do I scaffold an app for Cypress E2E testing with local runtime?
A: Create an app with the --plugin cypress option and --runtime local to set up Cypress-specific configurations.
Example:
# Create app with Cypress
stoobly-agent scaffold app create my-cypress-tests \
--plugin cypress \
--runtime localNote: With local runtime, there's no entrypoint service, so you'll run your tests directly on your machine with proxy configuration.
Local Configuration Files
Q: What files should I modify to add my Playwright tests with local runtime?
A: Configure your Playwright tests to use Stoobly's proxy by setting environment variables or configuring the proxy in your Playwright config.
Example - Set proxy environment variables:
Example - Create Playwright config:
Q: What files should I modify to add my Cypress tests with local runtime?
A: Configure Cypress to use Stoobly's proxy by setting environment variables or configuring the proxy in your Cypress config.
Example - Set proxy environment variables:
Example - Create Cypress config:
Q: How do I pass environment variables to my local tests?
A: Set environment variables in your shell or use a .env file that your test framework reads.
Example:
Or use a .env file:
Running Local E2E Tests
Q: How do I record E2E test traffic with local runtime?
A: Use the record workflow to capture all HTTP requests made during your E2E tests.
Example:
Note: Make commands (e.g., make -f .stoobly/services/Makefile record) are Docker-specific. Local runtime uses stoobly-agent scaffold workflow up/down commands directly.
Q: How do I run E2E tests with mocked responses using local runtime?
A: Use the mock workflow to run tests against recorded responses without hitting real APIs.
Example:
Q: How do I run E2E tests with response validation using local runtime?
A: Use the test workflow to validate that responses match expected results.
Example:
Q: How do I run E2E tests with local runtime?
A: Start the Stoobly workflow using CLI commands (not Makefile), then run your tests directly with proxy environment variables set.
Q: How do I run specific test files or suites with local runtime?
A: Use your test framework's command-line options to target specific tests.
Example for Playwright:
Example for Cypress:
Local Debugging
Q: How do I view test output and logs with local runtime?
A: View logs from the workflow directory or check Stoobly agent logs directly.
Example:
Q: How do I debug failing local tests?
A: Enable debug mode in your test framework and increase logging verbosity.
Example for Playwright:
Example for Cypress:
Q: How do I save test artifacts (screenshots, videos) with local runtime?
A: Configure your test framework to save artifacts to a local directory.
Example for Playwright:
Example for Cypress:
Local Best Practices
Q: Should I record once and mock for all subsequent runs with local runtime?
A: Yes, this is the recommended approach for fast, reliable E2E tests that don't depend on external APIs.
Example:
Q: How do I organize E2E tests by feature with local runtime?
A: Create separate services or custom workflows for different test suites.
Example:
Local CI/CD Integration
Q: Can I use local runtime in CI/CD for E2E testing?
A: Yes, if your CI environment has Python and stoobly-agent installed, local runtime can be faster for E2E tests.
Example:
Q: How do I test with local runtime in CI/CD?
A: Install stoobly-agent and use CLI commands in your CI/CD pipeline.
Example:
Local Advanced Configuration
Q: How do I access test fixtures and data with local runtime?
A: Reference fixtures and test data using relative paths from your project root. No volume mounting is needed since everything runs on your local machine.
Example:
Last updated
Was this helpful?