SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Property Transfer

    Using SoapUI 4.5.1 (not SoapUI Pro). Need help figuring out the property transfer step. Need the response from step 1 to be inserted as the parameter for step 2. Do not know how how add xPath manually.

  2. #2
    Junior Member
    Join Date
    Jan 2008
    Location
    Colombo
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Property Transfer

    As you have mentioned you would have to access the correct xPath to retrieve the value that you need. For an example if you are accessing the post code from a web service response,you would have to mention the following in the "source" section by selecting your Test Request and by selecting the property value as "Response"

    //Address/BusinessAddress/Postcode

    And in the "Target" section you would have to select your target Test Request and select the property value as "Request" and probably enter something like the followingdepending on your xml node hierarchy of course)


    //Address/PersonalAddress/PostCode

    If you want to programmatically access a value in the response, something like the following would do

    def responseHolder = groovyUtils.getXmlHolder(testRunner.testCase.testS teps["Test Request - My Request"].testRequest.responseContent);

    myPostCode = responseHolder.getNodeValue("//Address/BusinessAddress/Postcode")

  3. #3
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Quote Originally Posted by qapkrmden View Post
    Using SoapUI 4.5.1 (not SoapUI Pro).

    I didn't think the property transfer was available in the free version of SoapUI?

    I'm using 2 method's for extracting data from one step and using in another step:

    The in-built property transfer which works for me most of the time, where that doesn't extract what I want I write some Groovy code to capture the necessary data, here's an example:

    // Get value from a node

    def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )

    // The param in the getXmlHolder is Test Step & Response
    def holder = groovyUtils.getXmlHolder ("Get-GUID#Response")

    //Get account ID from the response
    context.accountId = holder.getNodeValue ("//return")
    log.info ("@@@@ RESPONSE @@@=" + context.accountId );

    The param in the first step ("Get-GUID#Response") is the step name#and the returned data your string is contained in.

    The second step gets the data from the specific node where your required data resides in the response string.

    Here's how I would use the captured string in another step:

    <qds:RequestId>${Your_Step_name_where_data_capture d#accountId}</qds:RequestId>


    Hope this helps, Mark Smith.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:23 PM.

Copyright BetaSoft Inc.