Forum Discussion
Hi,
Thank you for the screenshots.
I think (I am not a ServiceV guru) that the script is not called because of the Route Non-Virtualized Request setting been set in the Route Options combo-box. (Though I am not 100% sure that I got description from the documentation right.)
What I would try is:
a) Add something like this as the first script line:
log.info 'DEBUG: Inside the script';
Just to check if the script is called at all;
b) Try to change the Route Non-Virtualized Request setting to Route to one and check if it changes something.
P.S. You may check not only the Script Log, but also the Error Log one - sometimes the latter contains script errors while the former remains empty.
Hi Alex,
Thank you for your response.
I have tried the options which you have suggested however, its not working as expected.
There are no error logs getting generated as well.
Thanks,
Vibhash
- AlexKaras5 years agoChampion Level 3
Hi Vibhash,
> There are no error logs getting generated as well.
And there is no record in the script log generated by the
log.info 'DEBUG: Inside the script';
line either. Is this correct?
I see this as either some mis-configuration of virtual web service or incorrect call of it.
Try to check the HTTP Log (and Transaction Log on the web service configuration page). The log should contain raw request - maybe you will see something wrong there.
Also, can you try to send the same request that you are sending from Postman but using ReadyAPI means (APIs node of your ReadyAPI project)? I would try this as well. If the call from ReadyAPI passes (at least there will be debug message in the script log) than this will mean that attention should be paid to Postman.
sonya_m : Sonya, could you please draw attention of someone from your team to this thread? Hopefully, your guys will spot some obvious thing that we are missing...
- Vib5 years agoOccasional Contributor
Hi Alex,
I tried to execute the same request from ReadyAPI and I see the same behavior as I was seeing from POSTMAN.
The additional parameter is not getting appended while routing the request to LIVE system. Even the transcationlog only shows the parameters which I am passing intially. The additional parameter is not getting appended.
Once again thank you for looking into it.
- TSanchez_15 years agoModerator
You can try to set "Route to" value to property expansion and then change it in your script. For example you can set "Route to" is set to ${#MockService#route_endpoint}, and then you can add to your script:
mockRunner.getMockContext().mockService.setPropertyValue("route_endpoint","http://smartbear.com")Let me know if this works.