soapUI ModelItems
ModelItems are the preliminary building blocks of a soapUI project. The elements such as projects, test suites, test cases, test steps, mock services, mock responses, and assertions are all implemented as ModelItems. The com.eviware.soapui.model.ModelItem
interface (http://www.soapui.org/apidocs/com/eviware/soapui/model/ModelItem.html) is the super interface which defines the general behavior of all soapUI model items.
When you get hold of a ModelItem in your script, you can use the corresponding getters to retrieve values such as id
, name
, and description
of a ModelItem.
getRoomDetailsTestCase.name
Also, ModelItems provide us with various methods to access parent and child entities.
Let's look at some methods in TestCase ModelItem that are frequently used to retrieve TestSteps in a TestCase:
getTestStepByName
(String stepName)
: To retrieve a specific test step inside a TestCasegetTestStepCount
()
: To get the TestStep count of a TestCasegetTestStepList()
: To get list of TestSteps...