I'm wondering what the best way to test the entire stack of a dapp is?

From UI -> to wallet connection -> web3.js and interacting with the smart contract?

In web2 we could just use something like puppeteer, but extensions can't run inside headless chrome. So I'm not sure the best way to go about automating full workflows with Metamask.

If there is a framework or service for this, I'd love to know, as I'd rather not roll my own solution as described here

If you have any suggestions I would love to hear them!

2 Answers 2


This should solve your problem!


  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – thefett
    Mar 15, 2022 at 14:42
  • Yes! I discovered synpress--very cool repo! Mar 16, 2022 at 22:25

You can test Metamask interactions with Synpress, e.g check if you can connect with the metamask wallet from your DApp with the following test case:

describe('Test User Login', () => {

    it('Connects with Metamask', () => {
        // find "Connect Wallet" button and click it
        cy.contains('Connect Wallet').click();
        // assuming there is only metamask popping up 
        // always important to switch between metamask and 
        // cypress window
        // connect to dapp
        // switch back to cypress window (your dApp)
        // check UI change

For more details on how to use Synpress check this tutorial.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.