Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

feat(local): local runtime for testing and debugging business logic #87

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ryan-mars
Copy link
Owner

@ryan-mars ryan-mars commented Jul 6, 2021

Create a local runtime stochastic-local (as compared to stochastic-aws-serverless) that allows for fast in-memory testing of business logic, and experimentation for maintainers, without the complexity of infra and temporary uncertainty of eventual consistency.

Ideal use cases:

  • Explicitly test the behavior of "out of order", and duplicate (at least once delivery) events
  • Happy path for complete business acceptance tests
  • An alternative to completely mocking/stubbing the bounded context for the domain layer, graphql resolvers, or UI
  • Continuous integration

The unit and business acceptance tests should execute against stochastic-local in before commit, and in CI, providing faster feedback on business rules without requiring service deployment and endpoint discovery. Instead of mocking polyglot data sources the developer could opt to run a local instance of any collaborating databases (e.g. redis, dynamodb-local, sqlite, etc...).

@ryan-mars ryan-mars self-assigned this Jul 6, 2021
@ryan-mars ryan-mars added the enhancement New feature or request label Jul 6, 2021
@ryan-mars ryan-mars added this to the 1.0 milestone Jul 6, 2021
examples/fruit-stand/src/service.ts Show resolved Hide resolved
packages/stochastic-local/jest.config.js Show resolved Hide resolved
packages/stochastic-local/package.json Outdated Show resolved Hide resolved
packages/stochastic-local/src/index.ts Outdated Show resolved Hide resolved
packages/stochastic-local/src/index.ts Outdated Show resolved Hide resolved
packages/stochastic-local/src/index.ts Outdated Show resolved Hide resolved
@sam-goodwin
Copy link
Contributor

Please remember to provide useful descriptions in PR. It will serve as a form of documentation for developers browsing the changelog

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants