You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently we can use the REPL to work with a specific context and toggle various settings, alter data, etc, while running our UI against the mock server so we can test various alternating scenarios. Think of an authentication endpoint that might have 3 or 4 different response types (invalid password, password change required, etc).
Ideally we could have a set of API calls to the Counterfact server that have nothing to do with the Open API spec, but are specific to controlling Counterfact. In a Playwright test I could have a UI test that exercises all the various paths of an auth scenario (see above) without having to "bake" into the mock logic special hardcoded values such as different usernames that exercise the various response paths. Instead we could just have our mock context expose functions that let us easily toggle back and forth between the various response states. Our E2E test could run a set of test, then hit the Counterfact command API to switch the response state, rerun the tests and have it exercise the other paths.
The text was updated successfully, but these errors were encountered:
We also need to break out the REPL server so it doesn't automatically start when we call counterfact(). We shouls configure and run the REPL server from the outside looking in, in ./bin/counterfact.js.
Presently we can use the REPL to work with a specific context and toggle various settings, alter data, etc, while running our UI against the mock server so we can test various alternating scenarios. Think of an authentication endpoint that might have 3 or 4 different response types (invalid password, password change required, etc).
Ideally we could have a set of API calls to the Counterfact server that have nothing to do with the Open API spec, but are specific to controlling Counterfact. In a Playwright test I could have a UI test that exercises all the various paths of an auth scenario (see above) without having to "bake" into the mock logic special hardcoded values such as different usernames that exercise the various response paths. Instead we could just have our mock context expose functions that let us easily toggle back and forth between the various response states. Our E2E test could run a set of test, then hit the Counterfact command API to switch the response state, rerun the tests and have it exercise the other paths.
The text was updated successfully, but these errors were encountered: