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

test: flag Confirmations tests as Smoke tests #7710

Merged
merged 16 commits into from
Dec 4, 2023
Merged

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Nov 7, 2023

Description

In this PR we are flagging all the Confirmations tests as Smoke test. This includes the following spec files:

  • advanced-gas (the only one that was previously flagged as Smoke)
  • approve-default-erc
  • eth-sign
  • personal-sign
  • send-erc20
  • send-erc721
  • send-eth
  • typed-sign
  • typed-sign-v3
  • typed-sign-v4

Notice the amount of time added on the runs is not significant compared to the amount of scenarios we add, giving everyone more confidence on making changes in the Wallet. See numbers below.

Notice the tests are stable, being 100% Successful after several ci runs. This was achieved thanks to this fix by @vinistevam

Recent examples how Confirmations tests captured an error on main

  • Here is an example of how running all the Confirmations tests, would have captured and prevent an error in main. Luckily we were running them locally and could spot the error and connect the dots with the slack thread.

  • Here Signatures flow broken in main, that would have been captured by Confirmations tests if run as Smoke https://app.bitrise.io/build/fa65a941-6cd6-4b0c-9ece-151e76cdbb0d

Test Runs Data

Run #1 - Detox Build & Test

Run #2 - Detox Build & Test

Run #3 - Detox Build & Test

Run #4 - Detox Build & Test

Run #5 - Detox Build & Test

Related issues

Fixes: #

Manual testing steps

Trigger ci test runs from Bitrise and see that all tests are passing.

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@seaona seaona added the team-confirmations-secure-ux-PR PR from the confirmations team label Nov 7, 2023
Copy link
Contributor

github-actions bot commented Nov 7, 2023

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eb52137) 36.60% compared to head (9f996c5) 36.60%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7710   +/-   ##
=======================================
  Coverage   36.60%   36.60%           
=======================================
  Files        1092     1092           
  Lines       29178    29178           
  Branches     2678     2678           
=======================================
  Hits        10681    10681           
  Misses      17885    17885           
  Partials      612      612           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seaona seaona marked this pull request as ready for review November 17, 2023 15:59
@seaona seaona requested a review from a team as a code owner November 17, 2023 15:59
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e7e6164a-e4e8-4cce-8a08-5426e78286f3
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

Can we remove the type-sign test from the smoke tag? It takes 5 mins for that one spec file to run compared to the other tests which take ~1 minute.

@seaona
Copy link
Contributor Author

seaona commented Nov 23, 2023

Can we remove the type-sign test from the smoke tag? It takes 5 mins for that one spec file to run compared to the other tests which take ~1 minute.

thanks for your comment @cortisiko . It's true that typed signature spec took a bit longer. We've re-arranged the tests so we can benefit from the parallelization and increase the speed for those.
Having Signatures included in the Smoke test pipeline is really important for Confirmations, so we'll like to re-evaluate it with the new timings (once we have the data).
Currently Signatures are broken in main, and that's something that could have been captured by these tests. We can re-run the jobs once that issue is fixed (now tests will fail) and post the new results here.

@cortisiko
Copy link
Member

@seaona amazing, thanks for splitting the tests.

Currentlyhttps://github.com//issues/7920, and that's something that could have been captured by these tests.

Actually, the nightly regression test build (which includes these signature tests) caught the failing tests. They should be fixed in main now. Feel free to pull in main and rerun the tests.

@seaona
Copy link
Contributor Author

seaona commented Nov 28, 2023

After the test signatures change, all spec files are <= 2mins.

https://addons-testing.bitrise.io/builds/12a97b1c-bab3-4c01-9cbc-5b13e61eeb0a/testreport/2451de81-a95f-4afb-bfab-4e80fc52784b?status=passed

Screenshot from 2023-11-29 15-48-07

Run #7 - after Signatures Change - Detox Build & Test

Run #8 - after Signatures Change - Detox Build & Test

Run #9 - after Signatures Change - Detox Build & Test

cortisiko
cortisiko previously approved these changes Nov 30, 2023
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

PR looks good. Nit: Can you put the sign tests in a signatures folder?

Copy link

sonarqubecloud bot commented Dec 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@seaona seaona requested a review from cortisiko December 4, 2023 09:17
@seaona
Copy link
Contributor Author

seaona commented Dec 4, 2023

PR looks good. Nit: Can you put the sign tests in a signatures folder?

thank you @cortisiko done

@seaona seaona merged commit bc3ea74 into main Dec 4, 2023
26 checks passed
@seaona seaona deleted the e2e-confirmations-to-smoke branch December 4, 2023 16:06
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2023
@metamaskbot metamaskbot added the release-7.14.0 Issue or pull request that will be included in release 7.14.0 label Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.14.0 Issue or pull request that will be included in release 7.14.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants