https://cypress.io logo
Create a file under fixtures like `/fixtures/env-d...
# e2e-testing
s
Create a file under fixtures like
/fixtures/env-data.json
with json structure using an object for each environment, such as:
Copy code
{
  "environments": [
    {
      "dev": [
        {
          "username": "mrdev",
          "password": "sjkdhdskfhaks$"
        }
      ]
    },
    {
      "qa": [
        {
          "username": "mrsqa",
          "password": "ahsgdshgsa$"
        }
      ]
    },
    {
      "prod": [
        {
          "username": "misterprod",
          "password": "asdiuayeg"
        }
      ]
    }
  ]
}
Depending on how you want to use the json data, there are different ways to require and import the json. But you can start with these docs https://docs.cypress.io/api/commands/fixture i.e.
cy.fixture('env-data').as('data');