I need to insert dummy data on test environtment so that I can run unit test on it but I don't know how to declare it on BootStrap (just for testing, not for all environtment)
can you help me ? thank you in advance
as noted, you can use the test fixture. you can also put code in bootstrap. if you are using junit 4, you might be able to use @BeforeClass. also, there is the build-test-data plugin that may be of interest.
if you really mean unit test (as opposed to integration test), take a look at the grails testing plugin (these run fast).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With