{"id":708,"date":"2011-10-19T10:41:19","date_gmt":"2011-10-19T14:41:19","guid":{"rendered":"http:\/\/www.pressleypress.com\/blog\/?p=708"},"modified":"2013-01-07T14:32:55","modified_gmt":"2013-01-07T18:32:55","slug":"property-expansion-in-soapui","status":"publish","type":"post","link":"https:\/\/www.pressleypress.com\/blog\/?p=708","title":{"rendered":"Property Expansion in SOAPUI"},"content":{"rendered":"<p>From <a href=\"http:\/\/groovyinsoapui.wordpress.com\/2008\/09\/16\/accessing-properties-in-soap-request\/\">groovyinsoapui.wordpress.com<\/a> :<\/p>\n<p>Accessing variable values on the go while sending SOAP request to some service, might solve many problems at times. In SOAP UI, there are two ways to accomplish this<\/p>\n<p>i) Using \u2018Property Transfer\u2019 step<\/p>\n<p>ii) Using \u2018Property Expansion\u2019 accordingly wherever required. Here I am explaining this procedure fo accesing properties.<\/p>\n<p>    ${#Scope#Property-name[#xpath-expression]}<\/p>\n<p>    ${Property-name} refers to a Global Property<br \/>\n    (example: ${UserName} to a global Property named \u201cUserName\u201d)<\/p>\n<p>    ${#Project#Property-name}refers to a Project Property<br \/>\n    (example: ${#Project#UserName} to a Property on Project level named \u201cUserName\u201d)<\/p>\n<p>    ${#TestSuite#Property-name} refers to a TestSuite Property<br \/>\n    (example: ${#TestSuite#UserName} to a Prop on TestSuite level named \u201cUserName\u201d)<\/p>\n<p>    ${#TestCase#Property-name} refers to a TestCase Property<br \/>\n    (example: ${#TestCase#UserName} to a Prop on TestCase level named \u201cUserName\u201d)<\/p>\n<p>    ${TestStep-name#Property-name} refers to a property in a named TestStep.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From groovyinsoapui.wordpress.com : Accessing variable values on the go while sending SOAP request to some service, might solve many problems at times. In SOAP UI, there are two ways to accomplish this i) Using \u2018Property &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[16],"class_list":["post-708","post","type-post","status-publish","format-standard","hentry","category-computers","tag-soapui"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p32FB4-bq","jetpack-related-posts":[{"id":609,"url":"https:\/\/www.pressleypress.com\/blog\/?p=609","url_meta":{"origin":708,"position":0},"title":"SOAPUI &#8211; Generating a Random Value","author":"Matt","date":"August 31, 2010","format":false,"excerpt":"By placing the following property expansion in your SOAP request in SOAPUI, a random number between 0 and 50,000 will be inserted in it's place. ${=(int)(Math.random()*50000)}","rel":"","context":"In &quot;Computers&quot;","block_context":{"text":"Computers","link":"https:\/\/www.pressleypress.com\/blog\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":781,"url":"https:\/\/www.pressleypress.com\/blog\/?p=781","url_meta":{"origin":708,"position":1},"title":"Need a UUID for use in SOAPUI?","author":"Matt","date":"May 11, 2012","format":false,"excerpt":"Create a property using a Groovy Script test step with the following line : def property = java.util.UUID.randomUUID() or let SOAPUI parse it in-line : ${=java.util.UUID.randomUUID()}","rel":"","context":"In &quot;Computers&quot;","block_context":{"text":"Computers","link":"https:\/\/www.pressleypress.com\/blog\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":649,"url":"https:\/\/www.pressleypress.com\/blog\/?p=649","url_meta":{"origin":708,"position":2},"title":"SOAPUI &#8211; Catching Test Case Completion Time","author":"Matt","date":"January 10, 2011","format":false,"excerpt":"To capture how long it took a particular test case to complete, use the following property expansion in your DataSink. ${=testRunner.TimeTaken} The result is in milliseconds. It is the sum of the time taken by all test steps during the execution of your test case.","rel":"","context":"In &quot;Computers&quot;","block_context":{"text":"Computers","link":"https:\/\/www.pressleypress.com\/blog\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":455,"url":"https:\/\/www.pressleypress.com\/blog\/?p=455","url_meta":{"origin":708,"position":3},"title":"Getting SOAPUI to Pass Back a Value froma Request Using a Mock Service","author":"Matt","date":"October 19, 2009","format":false,"excerpt":"If need a Mock Service to reply to a SOAP request with a value from that request, here's the Groovy script to do it. (Groovy is a scripting language that can be run in the Java JVM. SOAPUI has it built in.) 1) Select your Mock Service in SOAPUI 2)\u2026","rel":"","context":"In &quot;Computers&quot;","block_context":{"text":"Computers","link":"https:\/\/www.pressleypress.com\/blog\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":587,"url":"https:\/\/www.pressleypress.com\/blog\/?p=587","url_meta":{"origin":708,"position":4},"title":"Use Epoch Time in SOAPUI as a unique value","author":"Matt","date":"May 13, 2010","format":false,"excerpt":"Want SOAPUI to insert epoch time into your request to be used as a unique value when the request is submitted? Use the following string in your SOAP request and epoch time will be inserted in its place! ${= System.currentTimeMillis() }","rel":"","context":"In &quot;Computers&quot;","block_context":{"text":"Computers","link":"https:\/\/www.pressleypress.com\/blog\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":793,"url":"https:\/\/www.pressleypress.com\/blog\/?p=793","url_meta":{"origin":708,"position":5},"title":"SOAPUI Oracle Thin Client Format","author":"Matt","date":"October 3, 2012","format":false,"excerpt":"jdbc:oracle:thin:{schema name}\/{password}@{hostname}:1521:{instance name}","rel":"","context":"In &quot;Computers&quot;","block_context":{"text":"Computers","link":"https:\/\/www.pressleypress.com\/blog\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=708"}],"version-history":[{"count":2,"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/708\/revisions"}],"predecessor-version":[{"id":955,"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/708\/revisions\/955"}],"wp:attachment":[{"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pressleypress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}