Forum Discussion
Thanks for the quick response
a) I will have GUI for user to provide the URI / WADL as input. based on that it generates TestSuites,Testcase automatically.
b) Generate the new REST Project and override the endpoint/request params.
Ok, no problem.
for a) I take it you know how to get the GUI to generate a REST project / TestSuite / TestCase based on the WADL/URI? e.g. File New REST Project > Import WSDL (or use URI) etc and generate TestSuite, TestCase and REST Test Request Test Step? Sorry if this is not what you meant.
for b) You would need to parameterise (using property expansions) the enpoint / request params for the REST Test Request TestStep - to do this, have you seen this other questsion & answer that came up today it covers this topic:
Once parameterised, you can then provide the values for the endpoint/request from anywhere you like e.g. files, databases, other service responses, property files etc.
Is this the sort of thing you meant?
Cheers,
Rup
- BalamuruganRavi10 years agoOccasional Contributor
Hi Rup,
a) Yes i know this option avilable in soapUI GUI. But my question here is how i can do this using groovy script. (e.g ) just executing the .bat file will call the groovy script and create the project.xml in specified location. all the inputs (URI/WADL, project name, path) will be passed as parameters.
- rupert_anderson10 years agoValued Contributor
Hi,
Ok, sorry, I did wonder if that was what you meant i.e. generate the whole project etc from a command line.
Its definately an interesting question, but unfortunately apart from feeling that it is very doable with Groovy (as I have done / seen bits od scripts like this before), I don't have the script yet and it might take me a while - maybe someone else can jump in if they have such a script?
I did see this post where on page 2 the guy has a Groovy script to create the TestSteps dynamically (but not the project):
I must admit I am quite curious to know why you need to generate the whole thing? As I have always been able to simply create the project / TestSuite / TestCase / Steps manually, parameterise all the aspects that need to be dynamic as property expansions and then pass the poperty vales when running from the command like script - do you need to generate everything on the fly as part of some kind of CI process?
Sorry not to have a quick answer,
Cheers,
Rup
- BalamuruganRavi10 years agoOccasional Contributor
It’s ok Rup. Yes I need to generate the whole project from command line and execute as part of the CI process. If you can get me the code it will be very useful…
Related Content
- 9 years ago
Recent Discussions
- 18 hours ago