-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(cypress): update cypress documentation #6956
base: main
Are you sure you want to change the base?
Conversation
This is a comprehensive testing framework built with [Cypress](https://cypress.io) to automate testing for [Hyperswitch](https://github.com/juspay/hyperswitch/). The framework supports API testing with features like multiple credential management, configuration management, global state handling, and extensive utility functions. The framework provides extensive support for API testing with advanced features including: | ||
|
||
- Multiple credential management | ||
- Dynamic configuration management |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on what you mean here?
Can first explain here on this GitHub PR thread, then we can decide on how to include it in the doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- multiple credential support (mcs):
- we already support multiple connectors. recently, we introduced this feature
- mcs basically means a single connector can now support multiple api keys (
connector_1
andconnector_2
). max supported creds for a new connector cred is2
at present (it was restricted to 2 recently due to compatibility issues with stripe's ntid requirements)
- dynamic configuration management:
- we introduced a new field called as
Configs
. this is supposed to be passed in an exchange (with this, user, based on the need, can pass a configuration for a specific test and yes, this will affect everywhere for that connector. only 3 configs are supported at the moment of me writing this). for example, trustpay refunds, requires us to pass adelay
, with this config, we can passdelay
only torefund
- we introduced a new field called as
cypress-tests/README.md
Outdated
```shell | ||
npm run cypress:payouts | ||
``` | ||
Execution of Cypress tests can be done in two modes: Development mode (Interactive) and CI mode (Headless). The tests can be executed against a single connector or multiple connectors in parallel. Time taken to execute the tests will vary based on the number of connectors and the number of tests. For a single connector, the tests will take approximately 07-12 minutes to execute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a single connector, the tests will take approximately 07-12 minutes to execute.
This could also vary with hardware configuration though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to let the user know about the usual time taken for the test to run. I'll put a notification in the brackets about hardware configuration.
For more information on using Cypress and writing effective tests, refer to the official Cypress documentation: [Cypress Documentation](https://docs.cypress.io/) | ||
- [Cypress Documentation](https://docs.cypress.io/) | ||
- [API Testing Best Practices](https://docs.cypress.io/guides/end-to-end-testing/api-testing) | ||
- [Hyperswitch API Documentation](https://hyperswitch.io/docs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we wanna include the link to the API reference here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was added as an optional reference so that people who want to see how the request and response would be for a specific feature before adding a test might find it helpful. can be removed.
Type of Change
Description
Existing docs are outdated to an extent and miss many feature updates.
closes #6955
Additional Changes
Motivation and Context
Update.
How did you test it?
Nah!
Checklist
npm run format && npm run lint -- --fix
cargo clippy