Index Page

Saturday, 11 April 2020

Add Custom Property in Project, TestSuite, TestCase and TestStep Level in SOAPUI tool.

Add Custom Property in Project, TestSuite, TestCase and TestStep Level in SOAPUI tool.


We can add custom properties in Project, TestSuite, TestCase and TestStep Level in SOAPUI tool.

Why we add Custom Property?

In API automation custom property pay the important role, suppose we want to use some data in the entire project like DataBase details, Server URL then we will store information at the Project level.
That means which data we want to use globally we will store in the Project level custom Property.


1. Add Custom Property in Project Level:

a. Click on Project > Go to Custom Property > Click on plus icon > enter Department name.
b. In the add employee request body replace IT with ${#Project#department} as per the below image.
note - 
If we want to use Custom Property in our body then we write the following syntax:
${#PropertLevel i.e. ProjectORTestSuiteORTestCase#CustomPropertName}



2. Add Custom Property in TestSuite Level:

a. Click on TestSuite > Go to Custom Property > Click on plus icon > enter id.
b. In the add employee request body replace id with ${#TestSuite#id} as per the below image.




3. Add Custom Property in TestCase Level:

a. Click on TestCase > Go to Custom Property > Click on plus icon > enter age.
b. In the add employee request body replace age with ${#TestSuite#id} as per the below image.


4. Add Custom Property in TestStep Level:


a. Right-click on TestStep > Select Properties > Enter Properties name.

b. Open new added Properties > Enter employeeName name inside the new create Properties as per the below image.

c. In the add employee request body replace employeeName with ${Properties#employeeName} as per the below image.









Interview Questions from this Page:

a. How to add Custom Property in Project, TestSuite, TestCase and TestStep Level in SOAPUI tool?
b.
Q. We don’t have # keyword at start why in properties?

A. Because, Properties is not a generic keyword. Test Suite, Test Cases are the generic keywords that’s why we use #.


No comments:

Post a Comment