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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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).