Skip to main content
This guide provides a streamlined setup process for integrating Cypress with Synpress to automate tests for Web3 dapps. While this covers the basic configuration, Synpress offers a wide range of advanced features for comprehensive testing.

Prerequisites

  • Node.js v18+
  • Basic knowledge of Cypress and TypeScript

Installation

Install Cypress and Synpress in your project:

Setup

  1. Create a Cypress configuration file (cypress.config.ts) in your project root:
  2. Create a support file (src/cypress/support/e2e.ts):
  3. Update your tsconfig.json to include Cypress types:

Writing Tests

Here’s an example of how to write tests using Cypress with Synpress:
  1. Create a test file (e.g., test/cypress/e2e/metamask.cy.ts):

Running Tests

To run your Cypress tests with Synpress:
  1. Start your local development server (if testing against a local app).
  2. Run the tests:
This will execute your tests using Cypress with Synpress integration.

Next Steps