Creating Properties in SOAPUI (Different level of properties in SOAPUI) - Bug Reaper

                  Bug Reaper

Lean about Automation Testing,Selenium WebDriver,RestAssured,Appium,Jenkins,JAVA,API Automation,TestNG,Maven, Rest API, SOAP API,Linux,Maven,Security Testing,Interview Questions

Saturday, 6 September 2014

Creating Properties in SOAPUI (Different level of properties in SOAPUI)


Properties are one of the most widely and flexible utility provided by soapUI that can make test suites more flexible and modular. 

Properties are available at multiple levels in soapUI, including the Environment, System, Global, Project, Test Suite, Test Case, and Test Step levels.

System properties are visible in the Help - System Properties window.  


Global properties can be viewed or set in the File - Preferences window.  





Properties at a project: Properties can be defined at project and these are available for all the test suites and all test cases.

Properties for other levels are visible in the Navigator panel when you click on the relevant node.

 To reference a property, the general syntax is "${#PropertyScope#PropertyName}".  

PropertyScope can be "Env", "System", "Global", "Project", "TestSuite", and "TestCase"

Why to Use Properties...?

Instead of hard-coding an element into our requests, we can define a test suite level property and then use that property in all three of our test requests.


How to pass parameters to tags

Values for the tags in the SOAP request can be hard coded or parameterized. 

There are two ways of doing passing parameters/values 

1) Creating properties to transfer values 
2) Data driven by external files (Can be done using Groovy Script or using SoapUI Pro)

1) Creating properties to transfer values: Properties can be used to store data. These can act as variables which can be passed to the SOAP requests.


Various Ways to create Properties at different levels:

Creating Project Level Property

1.) Click on Project.
2.)Go to Property Navigation window, Click on  Custom Properties tab.(Refer below screen)

3.)Click on + button, to add a Project Level Property.(Refer below screen)
4.)Provide the Name and Value of the Property.(Refer below screen)




5.)Now as you have created a Project Level property, you can use it in your SoapUI Request.
6.)Right click on any xml tag where you want to use the Project Level property created above.

7.)Follow the step according to below Screenshot. i.e.  Get Data>> Project>>Property(projectlevel)



8.)Once you have created a Project Level property it should be shown in the SoapUI request as below.



Note:In the same way, we Can create TestSuite ,TestCase , Test Step Level properties

Sample: TestSuite Level Property




 (TestSuite Property Created)

                                            (Getting TestSuite Level Property in SOAP XML Request)


Sample Request



Test Case Property
         (TestCase Level property Created)


Sample Request


TestStep Level Property

1.)Right Click on TestStep and Click on Add Step>> Properties


2.Provide the name of Test Step Property and Value.
3.Once you created TestStep Property , you can Get the Property by Right Clicking in XML Tag of Soap UI Request.

Sample















No comments:

Post a Comment