Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pixincreate
Copy link
Member

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Existing docs are outdated to an extent and miss many feature updates.

closes #6955

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Update.

How did you test it?

Nah!

Checklist

  • I formatted the code npm run format && npm run lint -- --fix
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@pixincreate pixincreate added C-doc Category: Documentation updates S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Dec 28, 2024
@pixincreate pixincreate added this to the December 2024 Release milestone Dec 28, 2024
@pixincreate pixincreate self-assigned this Dec 28, 2024
@pixincreate pixincreate requested a review from a team as a code owner December 28, 2024 17:24
Copy link

Review changes with  SemanticDiff

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
Copy link
Member

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.

Copy link
Member Author

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 and connector_2). max supported creds for a new connector cred is 2 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 a delay, with this config, we can pass delay only to refund

cypress-tests/README.md Outdated Show resolved Hide resolved
cypress-tests/README.md Outdated Show resolved Hide resolved
```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.
Copy link
Member

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.

Copy link
Member Author

@pixincreate pixincreate Dec 29, 2024

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.

cypress-tests/README.md Show resolved Hide resolved
cypress-tests/README.md Show resolved Hide resolved
cypress-tests/README.md Outdated Show resolved Hide resolved
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)
Copy link
Member

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?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-doc Category: Documentation updates S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] update cypress docs
2 participants