metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

E2e json rpc coverage tool

Open tmashuang opened this issue 10 months ago • 4 comments

*Description

json rpc testing with open-rpc-coverage-tool. Method checking, confirmations,, rejects, response, errors, etc.

https://github.com/MetaMask/MetaMask-planning/issues/2238

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • [ ] I’ve followed MetaMask Coding Standards.
  • [ ] I've completed the PR template to the best of my ability
  • [ ] 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.

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.

tmashuang avatar Apr 22 '24 18:04 tmashuang

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.

github-actions[bot] avatar Apr 22 '24 18:04 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

tmashuang avatar Apr 22 '24 18:04 tmashuang

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@mantine/[email protected], npm/@open-rpc/[email protected], npm/@open-rpc/[email protected], npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

socket-security[bot] avatar May 17 '24 05:05 socket-security[bot]

@shanejonas @adonesky1 I take it that we intend on including this as part of our test pipeline? If so, we should add the tests to the smoke pipeline. So that you know, our CI platform (bitrise) operates slightly differently than circleCI.

Here is a visual representation of what our smoke pipeline looks like on bitrise: Screen Shot 2024-06-05 at 4 35 45 PM

Now here are the steps we can do for now just as a proof of concept and iterate in the future:

  • we can duplicate this workflow and call it a different name (ios_rpc_coverage_e2e). then change the test script to run your tests:

  • we then can create a separate workflow that we will add in the run_smoke_e2e_ios_android_stage basically, duplicate https://github.com/MetaMask/metamask-mobile/blob/main/bitrise.yml#L471, call it whatever you want

  • make sure the workflow you created above to the run_smoke_e2e_ios_android_stage : https://github.com/MetaMask/metamask-mobile/blob/main/bitrise.yml#L118

  • You can rinse and repeat for Android

Feel free to reach out if anything.

cortisiko avatar Jun 05 '24 22:06 cortisiko

@shanejonas nice work on this! Just curious, were you ever able to get the mock server working?

Cal-L avatar Jun 18 '24 16:06 Cal-L

@Cal-L mock server stuff is working now, but an unrelated android e2e suite is failing.

shanejonas avatar Jun 20 '24 15:06 shanejonas

@SocketSecurity ignore npm/[email protected] @SocketSecurity ignore npm/@mantine/[email protected] @SocketSecurity ignore npm/@open-rpc/[email protected] @SocketSecurity ignore npm/@open-rpc/[email protected]

shanejonas avatar Jun 24 '24 20:06 shanejonas

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 576cb10488ec68722455c14d8e72b729aa17e690 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ee977b50-594a-488d-8dfd-52eddb5421be

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

github-actions[bot] avatar Jun 24 '24 20:06 github-actions[bot]