SoapUI Pro to SoapUI NG migration - afterLoadScript vs. beforeRunScript
We are in the process of upgrading from SoapUI Pro 5.1.2 to SoapUI NG Pro (Ready! API 1.4.1) and have come upon a key difference in how the project setup scripts work.
In SoapUIPro, the setup script for the Project was saved as an "afterLoadScript". This means that the script was run only after the project was loaded. However, in SoapUI NG Pro, the setup scripts entered for the project are saved as a "beforeRunScript". That means that the script is run each and every time before you run the project and not when the project is loaded.
This has created a few issues for us.
One, when opening the projects originally in SoapUI NG, the setup script appeared to be missing. It did not appear in the UI. When we added it again, we could see it but now it is in the project XML twice, once as an afterLoadScript and once as a beforeRunScript. So if we want to keep it as an afterLoadScript, we have to manually edit the XML since this script tag does not appear in the UI, that I have found.
Two, beforeRunScripts are causing issues with our implementation with the Maven plugin. We currently have SoapUI properties in the POM files for Maven that will overlay on each project after loading. This works properly using the afterLoadScript property, because the script loads the default properties and then Maven overwrites the specific environmental ones as necessary. However, this does not work with the beforeRunScript property, because the Maven will overwrite the specific properties and then the load script gets run again right before execution, meaning the necessary properties have been changed.
Is there any way to continue to use afterLoadScripts within the UI or are we now going to be forced to manage them within the XML directly? Or will there be an update to the Ready API plugin to put the properties into place after the beforeRunScript has been executed?
Thanks,
Adam
It looks, there is some confusion, could be because of UI changes?
Just tried in ReadyAPI 1.4.1 and I can see load script, then whatever you code there, it appears inside of afterLoadScript element of xml after saving the project. This looks normal and did not face the issue mentioned by you.
Please see if you followed the same as shown in the screen shot.