What does HackerNews think of scientist?
:microscope: A Ruby library for carefully refactoring critical paths.
- Write your service wrapper (eg your logic to interact with Twilio)
- Call the service and record API outputs, save those responses as fixtures that will be returned as response body in your tests without hitting the real thing (eg VCR, WebMock)
- You can now run your tests against old responses (this runs your logic except for getting a real response from the 3rd party; this approach leaves you exposed to API changes and edge cases your logic did not handle)
For the last part, two approaches to overcome this:
- Wrap any new logic in try/catch and report to Sentry: you avoid breaking prod and get info on new edge cases you didn't cover (this may not be feasible if the path where you're inserting new logic into does not work at all without the new feature; address this with thoughtful design/rollout of new features)
- Run new logic side by side to see what happens to the new logic when running in production (https://github.com/github/scientist)
I use the first approach bc small startup.
Great support and functionality for testing differences between two systems of record.
reminds me a lot of how github's scientist works. https://github.com/github/scientist
Indeed; from README:
> Python library that makes testing refactored code super simple. Inspired by scientist from github.