Select the project, and below you find Custom Properties tab. Add property there (name value pair). But the name should be SERVICE_HOST_PORT and value is your server address with port.
You only need to add a test suite, a test case, and a test step of groovy script and add the already provided content.
I don't think I can simplify more than this.
Hello @nmrao ,
I'm giving you the screenshots of every page with properties and testcases and script and webservice that I filled in and the error message. The error message I receive is now an internale service error, so I guess everything is ready to be copied in the other testcases. If you see somthing that is still not OK, please let me know.
I think you're getting there - but when @nmrao said 'select the project' - he doesn't mean in the 'Projects' tab in ReadyAPI!.
He means within the 'SoapUI' tab, click on the relevant project so focus is highlighting your project - you will see the 'Project properties' and 'custom properties' tabs.
add in 'SERVICE_HOST_PORT' as the name, 'http://10.9.12.23:8080' as the value
You should be good to go - unless there's a problem elsewhere.
finally - Is there any authorization on your project? I just noticed the value you inserted in your screenshot has the http protocol specified - are you sure it's not https?
If this doesn't work, there must be another problem - can you clear your logs (bottom left hand corner of your screen - click on the 'Show Logs' link to expand, then click 'clear all logs') and re-execute the test and upload your logs? (ReadyAPI! log, script log and chuck in the http log as well please fella,
Yes I've noticed that we ( Rao and me) misunderstood eachother. Thanks for your help. You seem to have good people management insights! 😉
For now on this project my architect has given me a mock server to test with as we are just creating the POC (Proof of concept). Meaning that we're not using Authorizations at this point. If the project is agreed (accepted by the client) we will for sure use Authorizations. 😉 I guess I need to come back ans ask Rao to adapt the script with authorizations as the testcases now only contain Groovy Script step?
I've cleared the logs and reran the script:
attached the errorlog
if you there's no authorization and authentication at the moment, I wouldn't worry about it - moving from POC to a real system under test takes time - and there's no point @Rao even thinking of altering the script until you know exactly how you're handling authorization/authentication - its too vast a subject with too many options to worry about it now.
You're getting a http 500 - thats an issue at the server (the app server wherever you're hitting) - thats not a problem at the client (your end).
Way to prove this - in your browser or postman or whatever - submit http://10.9.12.23:8080/agents/organizations?name=uneeq and see what happens.
Rao's script builds your request with the parms you want - but there's no reason you cant test whether the endpoint is working by just submitting the request in postman, browser (or using the ReadyAPI! OTB functionality for a single request)
So - submit the request in postman - does it work? yes - then try groovy script Rao's given you
cheers - I hope I've been clear,
Apparently it's already done. 😉 Indeed, I saw that later that the fact that I accepted your answer as a solution, it became a link under my question. I have accepted his solution also and as I see it now Rao's solution is the only one. Something to bare in mind for me in the futur 🙂
Hello @nmrao ,
Sorry to come back to you but I have one more question for you:
The Groovy Script you gave me only gives the header and query parameter defined on TestCase level in the log Output. How can I, with this Groovy Script, have access to the Endpoint to search those queries please?
thanks in advance.