Every now and then we have to bootstrap data in our application. It takes lot of time thinking what name to give, what description to add and other stuff.
To overcome this, we can use faker plugin which can generate random tokens as per your need.
To use this, add following in BuildConfig.groovy
And in BootStrap.groovy(or wherever we want to use it), just inject fakerservice:
It gives us options to generate name, city, zip code, sentences with given word count, paragraphs with predefined sentence count and a lot more.
fakerService.name() — Santos Koelpin
fakerService.city() — West Domenic fort
fakerService.zipCode() — 60985
fakerService.sentence(10) — Et quod expedita in qui eligendi est error quos eos aperiam quia libero
It saves a lot of time that we spend while bootstrapping data.
It helped me a lot.
Hope it helps you too.
Twitter : @vivek_sach