Groovy and Java scripts in one project
Id welcome an answer to this too!
Would welcome any guidance on this please!
If you provide more details, then it may help to see if the same can be achieved in groovy itself.
1. My pre setup script has some JS code that needs to run and do some initial setup
2. My actual project is Rest based and has some assertions via groovy asserts
Can this be done in one project how would I do this ?
Here is some of the JS code in this postman collection in the pre setup script
It basically takes postman variables like host , keys etc and does some stripping or modfications to it
It was basically meant for pre setup before the test
I am looking to convert this to groovy so that it will work in my existing soap ui project
I had a search for this about 2 years ago and couldnt find anything. I just searched and it appears there may be a couple of js to groovy converters but i doubt you can just paste the js code in, hit convert and out comes some spffy groovy code that works right away.
I had a quick look at the js and it doesnt look that complicated (well...i could read it, which should tell you how basic it appears).
If i were you id try and identify what is going on (e.g. "vars attribute" is defining new variable in js, which is like "def attribute" in groovy) and then search for the groovy equivalent.
Im even tempted to have a go at this myself, but i dont want you to rely on me cos my coding bites, so i suggest having a to yourself unless one of the scripters has js AND groovy