title: Define variables in cypress.env.json
body: <p>I want to define global variables for my tests of the selected application. I want to input them into one file - after reading the documentation I decided to use <code>cypress.env.json</code>.  </p>
  
  <p><a href="https://docs.cypress.io/guides/guides/environment-variables.html#Option-1-cypress-json" rel="noreferrer">https://docs.cypress.io/guides/guides/environment-variables.html#Option-1-cypress-json</a></p>
  
  <p>As I see variables are imported correctly, but during the test, I get the error:</p>
  
  <pre><code>"TypeError: Cannot read property 'env' of undefined"
  </code></pre>
  
  <p>Any suggestions on how to fix that problem? </p>
  
  <p><a href="https://i.imgur.com/uEVg24I.png" rel="noreferrer">https://i.imgur.com/uEVg24I.png</a></p>
  
  <p>Test file:</p>
  
  <pre><code>describe('/register', () =&gt; {
      beforeEach(() =&gt; {
          cy.visit('/#/register')
      })
  
      it.only('requires username', () =&gt; {
          cy.get('input[type="email"]').Cypress.env('correctEmail')
          cy.get('input[type="password"]').Cypress.env('correctPassword')
          cy.get('button').contains('Sign in').click()
          cy.get('.error-messages').should('contain', 'username can\'t be blankis too short (minimum is 1 character)')
      })
  </code></pre>
  
  <p>cypress.env.json:</p>
  
  <pre><code>{
      "correctName": "Bob Ross",
      "incorrectName": "Bobbbbb",
      "correctEmail": "bob@ross.eu",
      "incorrectEmail": "b@bbb",
      "correctPassword": "bobrosss",
      "incorrectPassword": "Oooooo" 
  }
  </code></pre>