“Default” & “Custom” Properties – soapUI

Posted: February 24, 2011 in Assertion in soapUI, Properties in soapUI
Tags: , ,

In soapUI, we have different levels at which we can define or find the properties. User defined properties can be used to make the testing simpler and less time consuming by directly updating the property values without (resulting in changed request) updating each individual request. We can broadly categorize properties as # “Default” and “User-Defined” properties. Now when these properties are associated in soapUI at different level they provide different details.

Default properties : These are the set of properties which comes by default with every soapUI installation. We can change the values of these properties (not in every case) & consume as when needed.

User-Defined properties : These are the set of properties which the end user defines as per his requirement. It can be used a temporary storage for validating the end result of any test (like in assertion).  

Below is the list of different level of properties :

# Global Properties : specify/define the properties associated with installed version of soapUI. These properties can be access across the project/test suites/ test cases and so on.

# Project Properties : specify the properties associated with the current project. This property can be used by all the subset (test suite, test case, test step, script) of the project.

# Test Suite Properties : specify the properties associated with the current test suite. This property can be used by all the subset (test case, test step, script) of the test suite.

# Test Cases properties : specify the properties associated with the current test case. This property can be used by all the subset (test step, script) of the test cases.

# Test Step properties : specify the properties associated with the current test step. This property can be used by all the subset (test step, property transfer, script) of the test steps.

The expression to be used in the web service request (xml view) for the consuming any properties are :

OR just open the web service request where you want to call the available property & right click on the screen. Then navigate to Get Data… item in context menu and select the required property. Attached is image:

Will cover some real time examples in the upcoming videos only for user-defined properties.

Advertisements
Comments
  1. jatinder kaur says:

    Hi
    I need to know about how to do dynamic assertion. I mean i have some dynamic values in my response ,those are changing on every run.Can you tell me any method for this.Like i have URL (//cdc310-acw.sciencedirect.com/SSOCore/update?acw=cfa12ad118721411d641794dd1657d8c943b340%7C%24%7Cq%2B6VEm2fL543vlT1Box3I8WnibXdM0qVvWIYAheBe5p1r%2B9TjSD28V%2FJd6PrZZXD4bPXKf5C4ejYcDadVxTqmLVfPNU6BcB%2B). I want to only assert a part of this URL (//cdc310-acw.sciencedirect.com/SSOCore/update?) this part is not changing it is static for every run but acw does change for every run which i can ignore but i dnt know how to do it . Please let me know if u can help. Other case would be if complete url is changing for every run how to assert that.
    Thanks

    • Hi,

      How about using the split string function? Normally the “?” is only used once when we start passing argument to the GET endpoint. So in your case you can split that string based on “?”.

      output = “//cdc310-acw.sciencedirect.com/SSOCore/update?acw=cfa12ad118721411d641794”.split(“?”)

      console.log output[0], output[1]

      I hope that will solve the issue.

      Regards,
      {Pradeep}

  2. Avinash Pagunta says:

    Hi Pradeep,

    I have a question and i am not able to find it in google,

    I want to automate my suite, where i want everything to be fetched from the Excel like the MEthiod type(POSt or GET) and Endpoint and Versions and Environemnts. and Request string all form the external file and fetch it to Soaop UI and run the query from Soapui and fetch the results for loggin.

    Can you please tell me if this is feasible and can u please suggest best method.

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s