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

[FC] Add livetesting OAuth tests + some Maestro improvements #7514

Merged

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Oct 27, 2023

Summary

  • Adds FBank and MBank full flow tests
  • Also adds some minor optimizations: retry logic for maestro tests, and uses IDs for clicking.

Adds new parallel instance to run live tests

image

More info in this doc.

Motivation

📔  [Android] Add finbank / mxbank OAuth tests
🌐  BANKCON-8162

Testing

  • Added tests
  • Modified tests
  • Manually verified

@carlosmuvi-stripe carlosmuvi-stripe added the work-cli Added to pull requests created with #work-cli for usage tracking. label Oct 27, 2023
@carlosmuvi-stripe carlosmuvi-stripe self-assigned this Oct 27, 2023
@carlosmuvi-stripe carlosmuvi-stripe changed the title [FC] Add livetesting OAuth tests" [FC] Add livetesting OAuth tests Oct 27, 2023
@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review October 27, 2023 19:01
@carlosmuvi-stripe carlosmuvi-stripe requested review from a team as code owners October 27, 2023 19:01
@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as draft October 27, 2023 19:02
bitrise.yml Outdated
Comment on lines 8 to 9
- pull_request_source_branch: 'carlosmuvi/BANKCON-8162/fc-add-livetesting-oauth-tests'
pipeline: pipeline-connections-e2e-release-tests
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temp - revert once tests run.

Comment on lines +438 to +439
.semantics { testTagsAsResourceId = true }
.testTag("search_result_$index")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes result list clickable by index in tests.

Comment on lines +57 to +73
# Check if tags are present in the test file
if awk '/tags:/,/---/' "$TEST_FILE_PATH" | grep -q "$MAESTRO_TAGS"; then
# Execute Maestro test flow and retries if failed.
while [ "$RETRY_COUNT" -lt "$MAX_RETRIES" ]; do
maestro test -e APP_ID=com.stripe.android.financialconnections.example --format junit --output $TEST_FILE_PATH.xml "$TEST_FILE_PATH" && break
let RETRY_COUNT=RETRY_COUNT+1
echo "Maestro test attempt $RETRY_COUNT failed. Retrying..."
done
if [ "$RETRY_COUNT" -eq "$MAX_RETRIES" ]; then
echo "Maestro tests failed after $MAX_RETRIES attempts."
exit 1
else
RETRY_COUNT=0
fi
fi
done
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script runs Maestro tests on each .yaml file in a specified directory (with a given tag), retrying a set number of times if a test fails.

Maestro does not (yet) have built in support for retries.

@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review October 30, 2023 01:30
@carlosmuvi-stripe carlosmuvi-stripe changed the title [FC] Add livetesting OAuth tests [FC] Add livetesting OAuth tests + some Maestro improvements Oct 30, 2023
@carlosmuvi-stripe carlosmuvi-stripe merged commit 4c5c732 into master Oct 30, 2023
7 checks passed
@carlosmuvi-stripe carlosmuvi-stripe deleted the carlosmuvi/BANKCON-8162/fc-add-livetesting-oauth-tests branch October 30, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-cli Added to pull requests created with #work-cli for usage tracking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants