Skip to content

deriv-com/e2e-deriv-app

Repository files navigation

Cypress E2E Testing Project

This repository contains End-to-End (E2E) tests using Cypress for various features of the Deriv website in a staging environment.

Project Structure

The project structure includes the following files and directories:

  • cypress.config.js: Cypress configuration file.
  • package.json: Lists project dependencies, including Cypress.
  • cypress/support/e2e.js: Support file for common configurations and custom commands.
  • cypress/e2e/: Directory containing E2E test files for different features.

Getting Started

To set up and run the E2E tests, follow these steps:

  1. Clone this repository:

    git clone git@github.com:deriv-com/e2e-deriv-app.git
  2. Navigate to the project directory:

    cd e2e-deriv-app
  3. Install Project Dependencies:

    npm i
  4. Install Cypress:

    npm install cypress --save-dev
  5. Write e2e tests under cypress/e2e/

  6. To run the available test using Cypress APP UI

    npx cypress open
  7. To run the available test in terminal

    npx cypress run
    

Cypress Configuration

In cypress.config.js, the Cypress configuration includes settings such as:

  • baseUrl: The base URL for the staging environment.
  • supportFile: The support file that contains common configurations and custom commands.
  • env: Environment variables that can be used in your tests.

Make sure to adapt these settings according to your project's needs.

.env

Create a .env file within the e2e-deriv-app folder and save the following environment variables (where you see [abcd], add your own credentials; where empty, leave empty):
E2E_DERIV_LOGIN=[Your Deriv Login]
E2E_DERIV_PASSWORD=[Your Deriv Password]
E2E_MT5_LOGIN=[Your MT5 Login]
E2E_MT5_PASSWORD=[Your MT5 Password]
E2E_CONFIG_SERVER=[Your Server]
E2E_CONFIG_APPID=[Your AppId]
E2E_STD_CONFIG_SERVER=[Your Server]
E2E_STD_CONFIG_APPID=[Your AppId]
E2E_OAUTH_URL=
E2E_OAUTH_TOKEN=
E2E_HMAC_KEY=[Your Challenge Key]
E2E_MT5_BASEURL=https://mt5-demo-web.deriv.com

Contributing

Feel free to contribute to this project by submitting issues, pull requests, or adding new E2E tests for different features.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published