Transfer property value to request header in next step.
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Transfer property value to request header in next step.
Hi all,
I'm trying to transfer one property from one test step response to next step request.
I have managed to extract the property in a property called myproperty but now I need to use this property in an authentication header but using $myproperty in header value the value is not correctly set during testing.
please can you help me to set the header with the property value.
thanks in advance, Pablo.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure doing it thru Property Transfer. It can be done using Script Assertion.
If you provide the response of the first request step, and which value needs to be set as header, that would be helpful to offer any help.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi rao,
thanks for the update.
I have never used scripts in soap iu .. planning to do using gui as relly straight forward but it in my case it does not work ... the authetification header is not replaced with the property value.
I'm trying to set the authetification header with the vakue if the property / response tag.
thanks for your help.
best regards, Pablo.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Transfer the property to test case level, say DYNAMIC_AUTH as property name and store the value.
In the next request, add header with required header name and value as ${#TestCase#DYNAMIC_AUTH}
Hope the above should help.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rao,
thanks so much for your help and support, really appreciated.
I have tried with the following value:
${#LoginStep#myproperty}
at authetification headers and the value is empty.
attached the config done and the test results where you can see that myproerty is correctly assigned but the auht header value no :-(.
any idea ???
best regards, Pablo.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi rao,
thanks for your help.
I have only created a tranfer step and and a property to store the value, this seems to work fine.
On the other side only assiged the value as suggested (${#LoginStep#myproperty}).
Sorry bu I can not see extra steps in my project.
can you help me ??
best regards, pablo.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am reiterating that you do not need 3rd step (Properties) & just follow the instructions as it is mentioned in my 2nd reply.
Select the test case, In the below you see two tabs, select custom properties tab, add DYNAMIC_AUTH property and value is empty.
In the property transfer step, store the value at test case level for the above property.
In the next request, add the header; use the header name as needed and value as ${#TestCase#DYNAMIC_AUTH} (no replacement here, TestCase is predefined, you were replacing with your test case name from the screen shot, that is not suggested)
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi rao,
thanks so much for your help and support, really appreciated.
followed the steps suggested and you can see that DYNAMIC_AUTH is set with original value but the header is empty:
GETxxxx/SecApi_v5/customers HTTP/1.1
Accept-Encoding: gzip,deflate
myheader:
Authorization:
Host: xxxx:8001
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
any ideas ??
best regards, Pablo.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please show the Property Transfer screen shot? Have you selected the Target as TestCase and DYNAMIC_AUTH?
Remove unwanted header myheader.
Otherwise, please show the response and what value do need to extract from it.
Regards,
Rao.
