I have a scripted assertion step that is common to all the models within the project.
Every time I create a new service, I'm adding this scripted assertion step manually to all the model.
Sometimes, I make some changes to the script, I need to manually update the changes to ALL the models (vsm) in the project.
Is there a way to make this scripted assertion step global to the entire project (changes at one place and it applies the changes to all the vsm's)
Appreciate your help/advise.
The most elegant solution would be to create a custom assertion using the SDK:
That will put all of your logic into a jar file - no need to copy/paste a script. Any changes you make to the code would automatically update all of your assertion instances as soon as the new jar is deployed.
Alternatively, if you're not comfortable using the DevTest API, you can create a Java method outside of the SDK framework. If you put it in a jar and drop it into hotDeploy, you can invoke the method from anywhere. You'd still use a scripted assertion, but it'd simply look like this:
You'd get the same benefits as extending the DevTest API - it's just not quite as pretty.
wow, thats so cool idea.
Thank you, Mike
What Mike has suggested is a perfect way to do it, but I think there is an easy workaround for this.
You can do this by creating a "sub-process".
In the sub-process add a "Do-Nothing-Step", and add your scripted assertion to your do-nothing-step, now, all you need to do is just add this sub-process to your newly generated models every time you create a new service.
The only single place where you need to change your script is in that sub-process.
Hope this helps.
Correct me if I have missed something Mike_Gavaghan
Thank you, Shubam..