Skip to content
masterclass Buddy

Cypress · Function

cy.fixture

cy.fixture() loads stable test data from a file in Cypress’s fixtures folder. It can provide data for assertions, form input, network stubs, and file uploads.

Last updated

Syntax

cy.fixture(filePath)
cy.fixture(filePath, encoding)
cy.fixture(filePath, options)
cy.fixture(filePath, encoding, options)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • cy.readFile()
  • cy.intercept()
  • cy.selectFile()
  • cy.task()
  • fixturesFolder

Source: cy.fixture() | Cypress API Documentation. Checked 2026-11-03.