Skip to content

A plugin that enables data fixtures to be loaded by a dedicated controller

License

Notifications You must be signed in to change notification settings

energizedwork/grails-remote-fixtures

Repository files navigation

Remote Fixtures Plugin

This plugin depends on the Fixtures plugin. It provides a controller endpoint you can use to load fixtures. This is primarily useful for functional testing.

Loading fixtures

Simply hit /fixture/$fixtureName to load a fixture. A report page is displayed indicating the whether the fixture loaded successfully and what data it is composed of. The report output can be sent as JSON or XML instead by appending .json or .xml to the URL (assuming your application has grails.mime.file.extensions = true set in Config.groovy).

Destroying data

Since code can be executed in fixture files it is possible to create a fixture that tears down data. For example, you could create a fixtures/tearDown.groovy containing the following:

Ship.list()*.delete()
Pirate.list()*.delete()

About

A plugin that enables data fixtures to be loaded by a dedicated controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages