E2E Test API #20382
Labels
feature/web3/wallet/core
feature/web3/wallet
Integrating Ethereum+ wallet support
OS/Android
Fixes related to Android browser functionality
OS/Desktop
priority/P4
Planned work. We expect to get to it "soon".
Transferring a discussion from the Brave public forum per @bbondy 's request.
https://community.brave.com/t/e2e-testing-for-web3-app-interactions-with-brave-wallet/318181/4
The Web3 Frontend Brittleness Problem
Many of today's web3 apps feel brittle, partially because there is no robust e2e test framework API officially supported by MetaMask.
There are frequent ongoing UI flow breaks and misplacement or misrepresentation of user's crypto funds due to subpar UX. This is true even for top web3 apps like Uniswap, Axie and Sandbox. As users navigate between different web3 apps and interact with multiple blockchain networks and wallets, these web3 apps often get out of sync with the state of the current wallet and as a result, the user ends up looking at unexpected content.
Given web3's promise to better protect user's identity, privacy and provide more control over user's own assets, it is imperative to offer superior, trustworthy UX. That in turn requires improving on test automation practices and infrastructure.
Current Workarounds
Test frameworks like dappeteer and synpress are trying to bridge the gap, but they feel brittle as they are constantly chasing MetaMask's changing front end code. This test framework brittleness frustrates web3 developers who are used to sophisticated web2 tooling. Writing web3 e2e tests that frequently break due to underlying base layer problems, results in postponing these test automation initiatives, which then results in brittle web3 frontend apps and subpar web3 UX.
The following snippet is an example of web3 e2e test frameworks "screen scraping" metamask code.
and another example:
While web3 app test developers are looking for reliable API that looks like this:
This MetaMask test-dapp repo could be a starting point for standardizing web3 e2e testing by documenting and providing test-spec examples for the interaction between its page components and the metamask wallet in various browsers through a cross browser e2e framework such as playwright.
This issue was also reported in MetaMask's repo:
MetaMask/test-dapp#147
The text was updated successfully, but these errors were encountered: