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

fix(cypress): address cypress skipping tests #5046

Merged
merged 15 commits into from
Jun 20, 2024
Merged

Conversation

pixincreate
Copy link
Member

@pixincreate pixincreate commented Jun 19, 2024

Type of Change

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

Description

This PR fixes error introduced in commit 24217d1 (#4904) of PR #4904 which led to tests getting skipped on single test failure which went unnoticed (After this change, when I ran the tests, things were working fine, not sure what went down the line). But that commit seems to fix it.

Additional Changes

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

Motivation and Context

Closes #5047

How did you test it?

Wrote below script to run tests in parallel (parallel tests require a lot of resource, else, tests become flaky):

#! /bin/bash

# DECLARATIONS
export DEBUG=cypress:cli

# Set the environment variables for the tests before running them
export CYPRESS_BASEURL="http:https://localhost:8080"
export CYPRESS_ADMINAPIKEY='test_admin'
export CYPRESS_CONNECTOR_AUTH_FILE_PATH='${HOME}/creds.json'
CONNECTORS=("adyen" "bankofamerica" "bluesnap" "cybersource" "nmi" "paypal" "stripe" "trustpay")
export CYPRESS_HS_EMAIL='[email protected]'
export CYPRESS_HS_PASSWORD='secret_password'

mkdir -p results

for connector in "${CONNECTORS[@]}"; do
  CYPRESS_CONNECTOR="${connector}" npm run cypress:ci > results/${connector}.txt 2>&1 &
done

wait

ETA:

image

Parallel Tests

(Ran it after PC cooled down and had available resources)

Adyen Bank of America Bluesnap Cybersource
image image image image
NMI PayPal Stripe Trustpay
image image image image

Important

When running in parallel, Bluesnap and NMI have higher failure rates compared to other connectors. RCA has to be done. It is not a priority as of now.

One test at a time

Adyen Bank of America Bluesnap Cybersource
image image image image
NMI PayPal Stripe Trustpay
image image image image

Important

Trustpay failing is server side issue.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

- Add 2 more payout connectors:
  - Adyen Platform
  - Wise
- Add Bank Transfers
  - SEPA

- Refactor Payouts to accommodate these changes
…outs

* 'main' of github.com:juspay/hyperswitch:
  feat(router): include the pre-routing connectors in Apple Pay retries (#4952)
  fix(cypress): Add `jwt_token` and `cookie` for routing test (#4953)
  feat(connectors): [Iatapay] add payment methods (#4968)
  chore(version): 2024.06.13.0
  feat(payouts): make payout_type optional in payouts table (#4954)
  feat(connector): [BOA/CYB] Make billTo fields optional (#4951)
  fix(core): fix the multitenancy prefix  in routing cache (#4963)
  refactor(connector): [Mifinity]Move destination_account_number from pmd to Mifinity Metadata (#4962)
  refactor(payment_methods): Enable deletion of default Payment Methods (#4942)
prettier config have been added to maintain consistency across all
environments.

can be run using `prettier . --write` in `cypress-tests` directory
we will getting back to this later in future
…asting. A bit of correction"

This reverts commit 24217d1.
@pixincreate pixincreate requested review from a team as code owners June 19, 2024 16:36
@pixincreate pixincreate requested review from Sakilmostak, Gnanasundari24 and likhinbopanna and removed request for a team June 19, 2024 16:36
@pixincreate pixincreate self-assigned this Jun 19, 2024
@pixincreate pixincreate added A-CI-CD Area: Continuous Integration/Deployment S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jun 19, 2024
@pixincreate pixincreate added this to the June 2024 Release milestone Jun 19, 2024
@pixincreate pixincreate linked an issue Jun 19, 2024 that may be closed by this pull request
@pixincreate pixincreate changed the title fix(cypress): adress cypress skipping tests fix(cypress): address cypress skipping tests Jun 19, 2024
…cypress-address-skip

* 'cypress-payouts' of github.com:juspay/hyperswitch:
  chore: future proofing
SamraatBansal
SamraatBansal previously approved these changes Jun 20, 2024
Gnanasundari24
Gnanasundari24 previously approved these changes Jun 20, 2024
Base automatically changed from cypress-payouts to main June 20, 2024 09:44
@Gnanasundari24 Gnanasundari24 dismissed stale reviews from SamraatBansal and themself June 20, 2024 09:44

The base branch was changed.

…ress-skip

* 'main' of github.com:juspay/hyperswitch: (27 commits)
  feat(cypress): add 2 more payout connectors and bank transfer support for payout (#4993)
  chore(version): 2024.06.20.0
  Refactor(core): reverts the payment method list filtering using constraint graph (#5044)
  feat(router): add payment method type duplication check for `google_pay` (#5023)
  refactor(storage): remove `id` from payment intent, attempt and remove datamodel ext from payment intent (#4923)
  fix(events): Correct parsing of API events with user event_type for Clickhouse (#5022)
  fix(connector):  add local bank redirect type in compatibility layer, default the country to AT for Local Bank Redirect and add creds_identifier in access token  (#5038)
  refactor(connector): add amount conversion framework for noon (#4843)
  fix(logging): fix stack overflow on recording restricted keys (#4423)
  feat(core): Add logger for sessions call failure (#5036)
  chore(version): 2024.06.19.0
  fix(opensearch): handle index not present errors in search api (#4965)
  feat(multitenancy): add tenant_id as a field for data pipeline and support individual database for clickhouse  (#4867)
  refactor: add basic counter metrics for IMC (#5006)
  fix(payment_methods): populate card fields while saving card again during metadata change condition (#5019)
  feat(router): Override the `setup_future_usage` to `on_session` based on the merchant config (#5016)
  chore(docker-compose): pass correct configuration values for running SDK demo app  (#5012)
  refactor: Move trait ConnectorIntegration to crate hyperswitch_interfaces (#4946)
  chore(version): 2024.06.17.0
  chore(process_tracker): use `const` instead of `String` for `business_status` (#4849)
  ...
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jun 20, 2024
Merged via the queue into main with commit 973ecbf Jun 20, 2024
11 checks passed
@Gnanasundari24 Gnanasundari24 deleted the cypress-address-skip branch June 20, 2024 10:12
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cypress tests are being skipped
3 participants