phanisrikar
13 years agoContributor
Can we generate oauth header in REST test request itself ?
Hi,
I am testing the REST webservice methods wrapped with oath 1.0 authentication using Soapui4.0. In order to invoke the REST method successfully, we need to generate the Authorization header
Step 1: Using Key/Secret variables, generate Signature and append to Authorization header. (Using groovy/java)
Step 2 : REST method call by adding the "Authorization" header in the REST request step
Since there are 2 steps to complete the successfull REST method call, I am facing problem while load testing the REST services using loadui2.0 with higher loads. Some of the requests are failing because the oauth header generated based on the time stamp and if the header is used to invoke the method after 5 minutes it will fail.
Now I want to integrate the two steps, so that generation of header can be done in the REST request itself. Is there any "Script" kind tab included in the REST request step (as if there is "Setup Script" tab for test case and test suite) so that header generation and method invokation can be done in single step? or is there any other way to solve the problem ?
Thanks
Phani
I am testing the REST webservice methods wrapped with oath 1.0 authentication using Soapui4.0. In order to invoke the REST method successfully, we need to generate the Authorization header
Step 1: Using Key/Secret variables, generate Signature and append to Authorization header. (Using groovy/java)
Step 2 : REST method call by adding the "Authorization" header in the REST request step
Since there are 2 steps to complete the successfull REST method call, I am facing problem while load testing the REST services using loadui2.0 with higher loads. Some of the requests are failing because the oauth header generated based on the time stamp and if the header is used to invoke the method after 5 minutes it will fail.
Now I want to integrate the two steps, so that generation of header can be done in the REST request itself. Is there any "Script" kind tab included in the REST request step (as if there is "Setup Script" tab for test case and test suite) so that header generation and method invokation can be done in single step? or is there any other way to solve the problem ?
Thanks
Phani