Fixtures
Fixtures are mock data for testing and development. They are stored in the data/fixtures directory. Fixtures are meant to be loaded after seed data, and can depend on seed data records.
Syntax
$ vela fixtures <action> The action can be one of the following:
generate- Generate fixture files from the database schemaload- Load fixtures into the databaseclear- Clear loaded fixturesreset- Clear and reload fixturesregen- Clear, regenerate the files, and reload them
Fixtures vs seeds
Seeds are real data your application needs to function, kept in version control and loaded into production. Fixtures are throwaway mock data for development and tests. Fixture records are given ids prefixed with vela, which is how clear knows what to remove — data you created yourself is never touched.
In tests
vela test:server loads fixtures, after seeds, into its throwaway database before every run. Tests share that database, so treat fixture records as read-only and create your own for anything a test changes.