Forum Discussion
Hi,
Please see if my answer to your other post helps:
Using a custom Groovy lib jar works OK as a means to centralise and reuse scripts across SoapUI.
Regards,
Rupert
I guess there is two issues here... firstly how to centralise common functionality, secondly how to run code independent of services called on deployment of the generated war.
The first part has been resolved, the second hasn't been.
There are ways I can initiate on demand for everything, but I would rather have a central initiation point that I can expect to be run on deployment.
- rupert_anderson9 years agoValued Contributor
Hi,
Ok, can you say why it wouldn't be enough to call Groovy lib code from the startup script of the mock? This is run when the mock is deployed.
Can you say exactly how you would like the fictionality to work?
Sorry if I missed something,
Regards,
Rupert
- Lavalyte9 years agoOccasional Contributor
I am looking at implementing dozens of mock services, which will all access common initialised code/singletons.
It is clunky to have to have initialisation code that needs to be added to every mocked service rather than called once, seperate and before all the mock calls.
On top of that the code will need a flag to ensure it is not initiated more than once.